databricks / reference-apps

Spark reference applications
Other
656 stars 341 forks source link

WeatherApp #90

Open cwijayasundara opened 7 years ago

cwijayasundara commented 7 years ago

While running the sample WeatherApp I get the following exception while (embedded) Kafka is trying to connect to the ZooKeeper instance. Pls advice me to resolve this issue.

[INFO] [2016-11-28 17:53:49,727] [org.apache.zookeeper.ClientCnxn]: Opening socket connection to server 192.168.0.8/192.168.0.8:2181. Will not attempt to authenticate using SASL (unknown error) [INFO] [2016-11-28 17:53:55,834] [org.apache.zookeeper.ZooKeeper]: Session: 0x0 closed [INFO] [2016-11-28 17:53:55,834] [org.apache.zookeeper.ClientCnxn]: EventThread shut down [ERROR] [2016-11-28 17:53:55,838] [org.apache.zookeeper.server.NIOServerCnxnFactory]: Thread Thread[main,5,main] died org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server within timeout: 6000 at org.I0Itec.zkclient.ZkClient.connect(ZkClient.java:880) ~[zkclient-0.3.jar:0.3] at org.I0Itec.zkclient.ZkClient.(ZkClient.java:98) ~[zkclient-0.3.jar:0.3] at org.I0Itec.zkclient.ZkClient.(ZkClient.java:84) ~[zkclient-0.3.jar:0.3] at com.datastax.spark.connector.embedded.EmbeddedKafka.(EmbeddedKafka.scala:29) ~[spark-cassandra-connector-embedded_2.10-1.1.0.jar:1.1.0] at com.datastax.spark.connector.embedded.EmbeddedKafka.(EmbeddedKafka.scala:18) ~[spark-cassandra-connector-embedded_2.10-1.1.0.jar:1.1.0] at com.datastax.spark.connector.embedded.EmbeddedKafka.(EmbeddedKafka.scala:23) ~[spark-cassandra-connector-embedded_2.10-1.1.0.jar:1.1.0] at com.databricks.apps.WeatherApp$delayedInit$body.apply(WeatherApp.scala:46) ~[classes/:na] at scala.Function0$class.apply$mcV$sp(Function0.scala:40) ~[scala-library.jar:na] at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12) ~[scala-library.jar:na] at scala.App$$anonfun$main$1.apply(App.scala:71) ~[scala-library.jar:na] at scala.App$$anonfun$main$1.apply(App.scala:71) ~[scala-library.jar:na] at scala.collection.immutable.List.foreach(List.scala:318) ~[scala-library.jar:na] at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:32) ~[scala-library.jar:na] at scala.App$class.main(App.scala:71) ~[scala-library.jar:na] at com.databricks.apps.WeatherApp$.main(WeatherApp.scala:40) ~[classes/:na] at com.databricks.apps.WeatherApp.main(WeatherApp.scala) ~[classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_45] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_45] at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_45] at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) ~[idea_rt.jar:na]

tashoyan commented 7 years ago

A naive question: is Zookeeper running? I am starting to migrate Weather App to Spark 2. If I face this issue during migration, I will try to fix it.

cwijayasundara commented 7 years ago

Tx. Yeah Zookeeper is running. I fixed this issue by running a local Kafka with modified code. Looks like the embedded kafka server can not connect to Zookeper.