Spark --- zookeeper.ClientCnxn:服务器null的会话0x0,意外错误

时间:2017-12-28 01:41:28

标签: scala apache-spark hbase apache-zookeeper spark-submit

我正在尝试使用以下命令将Json加载到hbase

spark-shell --master local[*] --jars ./library/ejml-0.23.jar,library/jollyday.jar,library/protobuf.jar,library/stanford-corenlp-3.6.0-models.jar,library/stanford-english-corenlp-2016-01-10-models.jar,library/stanford-corenlp-3.6.0.jar,library/spark-corenlp-0.1.jar,library/target/scala-2.10/dlrl-library_2.10-1.0.jar,library/json4s.jar --driver-memory 5G -i $FILE_PATH

文件路径指向源文件,其中包含解析json和将数据加载到Hbase的逻辑。 但是当Spark-shell启动时,它会以下列方式抛出连续错误

17/12/27 18:20:17 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect

java.net.ConnectException: Connection refused

    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)

    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)

    at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350)

    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)

17/12/27 18:20:17 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect

java.net.ConnectException: Connection refused

    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)

    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)

    at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350)

    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)

请帮我纠正这个问题

1 个答案:

答案 0 :(得分:0)

听起来你没有在你的localhost中启动Zookeeper:2181 ......你使用Kafka或其他一些将Zookeeper作为注册表的框架吗?

相关问题