ITPub博客

首页 > 大数据 > Hadoop > zookeeper文件myid配置错误,报Session 0x0 for server null, unexpected error

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

原创 Hadoop 作者:javenzhen 时间:2015-08-21 16:10:32 0 删除 编辑
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博客 ” ,链接:https://blog.itpub.net/12219480/viewspace-1778740/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2011-01-27

  • 博文量
    41
  • 访问量
    124944