zookeeper的Will not attempt to authenticate using SASL (无法定位登录配置)

今天不小心重启了一下zookeeper服务,发现跑的好好的系统神经了。

客户端连接zk,不停的报

 

2012-11-12 16:41:37,641 [myid:] - INFO  [main-SendThread(192.168.1.102:2181):ClientCnxn$SendThread@849] - Socket connection established to 192.168.1.102/192.168.1.102:2181, initiating session

2012-11-12 16:41:37,642 [myid:] - INFO  [main-SendThread(192.168.1.102:2181):ClientCnxn$SendThread@1085] - Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect

2012-11-12 16:41:39,099 [myid:] - INFO  [main-SendThread(192.168.1.102:2181):ClientCnxn$SendThread@966] - Opening socket connection to server 192.168.1.102/192.168.1.102:2181. Will not attempt to authenticate using SASL (无法定位登录配置)

 

google百度看好多hbase有相似的错误,但是没有回答。

郁闷中,有查看另外一机器,报

[zk: 192.168.1.101:2181(CONNECTING) 0] 2012-11-12 16:45:29,050 [myid:] - INFO  [main-SendThread(pay.chj360.com:2181):ClientCnxn$SendThread@966] - Opening socket connection to server xxxxxx.chj360.com/192.168.1.101:2181. Will not attempt to authenticate using SASL (无法定位登录配置)

 

觉得可能是hosts有问题,打开hosts文件,果然有xxxxxx.chj360.com域名的hosts,而zoo.cfg用的是ip,可能是这个问题。把zoo.cfg用域名映射,然后hosts,重启,好了。

 

反思自己的zk为啥重启就不行了呢,仔细看了一下zoo.cfg,把datadir设置在/tmp,真是该死了,最近看来是晕乎了!

你可能感兴趣的:(Java)