会话0x0表示服务器空,意外错误,关闭套接字连接并尝试重新连接

问题描述 投票:2回答:2

WARN  [org.apache.zookeeper.ClientCnxn] - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection timed out: no further information
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:744)
	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)

这个错误一直在重复。

java eclipse apache-zookeeper
2个回答
0
投票

命令中错误的Zookeeper服务器。试试这个:

  1. 转到Cloudera Manager - > Zookeeper - > Instances
  2. 检查服务器的主机
  3. 使用此命令检查连接: kafka-console-consumer --bootstrap-server:9092 --topic

0
投票

WARN会话0x0表示服务器空,意外错误,关闭套接字连接并尝试重新连接 不确定这是否适用于这种情况,但是 “server null”表示您在运行ZK CLI时忘记传递服务器参数。 你的命令应该是这样的: ./zkCli.sh -server hostname:port 如果您未指定端口,则将采用默认值2181。

© www.soinside.com 2019 - 2024. All rights reserved.