zookeeper启动报错Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to.....

  今天在学习zookeeper的时候,在linux上搭建单机版伪分布式集群zookeeper,启动一个zookeeper的时候是成功的,但是连上客户端的时候报了如下图的错误:

Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)

经过百度查询得到了相关的解决办法,现在分享给大家:

1.进入到zookeeper的配置文件zoo.cfg中

2.下图是我配置的三个节点的信息,用的ip是阿里云的私有地址:

zookeeper启动报错Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to....._第1张图片

3.解决办法就是把阿里云的私有地址改为0.0.0.0,然后再重启zookeeper即可:

zookeeper启动报错Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to....._第2张图片

你可能感兴趣的:(大数据学习之zookeeper)