当前位置:   article > 正文

zookeeper文件myid配置错误,报Session 0x0 for server null, unexpected error

2023-06-15 16:47:41,733 [myid:] - warn [main-sendthread(0:0:0:0:0:0:0:1:2181
1、zookeeper配置完毕之候报错,信息如下:
  1. grid@master1:~$ zkCli.sh -server 10.10.10.70:2181
  2. ..............................
  3. 2015-08-21 06:29:48,412 [myid:] - INFO [main-SendThread(10.10.10.70:2181):ClientCnxn$SendThread@975] - Opening socket connection to server 10.10.10.70/10.10.10.70:2181. Will not attempt to authenticate using SASL (unknown error)
  4. Welcome to
  5. 2015-08-21 06:29:48,420 [myid:] - WARN [main-SendThread(10.10.10.70:2181):ClientCnxn$SendThread@1102] - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
  6. java.net.ConnectException: Connection refused
  7.         at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
  8.         at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
  9.         at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
  10.         at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
这是连接zookeeper的server一直不断的报错
2、查看zookeeper配置信息
  1. grid@master1:/usr/local/zookeeper/conf$ cat zoo.cfg
  2. # The number of milliseconds of each tick
  3. tickTime=2000
  4. # The number of ticks that the initial
  5. # synchronization phase can take
  6. initLimit=10
  7. # The number of ticks that can pass between
  8. # sending a request and getting an acknowledgement
  9. syncLimit=5
  10. # the directory where the snapshot is stored.
  11. # do not use /tmp for storage, /tmp here is just
  12. # example sakes.
  13. dataDir=/data/zk
  14. dataLogDir=/data/zk/logs
  15. # the port at which the clients will connect
  16. clientPort=2181
  17. # the maximum number of client connections.
  18. # increase this if you need to handle more clients
  19. #maxClientCnxns=60
  20. #
  21. # Be sure to read the maintenance section of the
  22. # administrator guide before turning on autopurge.
  23. #
  24. # http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
  25. #
  26. # The number of snapshots to retain in dataDir
  27. #autopurge.snapRetainCount=3
  28. # Purge task interval in hours
  29. # Set to "0" to disable auto purge feature
  30. #autopurge.purgeInterval=1

  31. server.70=10.10.10.70:2888:3888
  32. server.71=10.10.10.71:2888:3888
  33. server.72=10.10.10.72:2888:3888
  34. server.73=10.10.10.73:2888:3888
2、在每个服务器上更改myid文件,如10.10.10.70文件
  1. 70
之候启动zookeeper,服务正常



来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12219480/viewspace-1778740/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/12219480/viewspace-1778740/

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/菜鸟追梦旅行/article/detail/724373
推荐阅读
相关标签
  

闽ICP备14008679号