欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  科技

Cannotopenchannelto3atelectionaddresshadoop03/192.168.1.82:3888

程序员文章站 2022-04-01 20:46:59
部署zookeeper集群时,3台以上 myid已经写好 防火墙关闭 虚拟机之间能相互ping通 zoo.cfg中的本机要用0.0.0.0,不能用ip地址,否则会出现下面的错误: H...

部署zookeeper集群时,3台以上
myid已经写好
防火墙关闭
虚拟机之间能相互ping通
zoo.cfg中的本机要用0.0.0.0,不能用ip地址,否则会出现下面的错误:

How have defined the ip of the local server in each node? If you have given the public ip, then the listener would have failed to connect to the port. You must specify 0.0.0.0 for the current node

server.1=0.0.0.0:2888:3888
server.2=192.168.10.10:2888:3888
server.3=192.168.2.1:2888:3888
This change must be performed at the other nodes too.

Step 1:
Node 1:
zoo.cfg
server.1= 0.0.0.0::
server.2= ::
.
.
.
server.n= ::

Node 2 :
server.1= ::
server.2= 0.0.0.0::
.
.
.
server.n= ::

Now in location defined by datadir on your zoo.cfg
Node 1:
echo 1 > /id

Node 2:
echo 2 > /id

.
.
.

Node n:
echo n > /id