Zookeeper客户端不能启动问题

在尝试使用zookeeper客户端zkCli.sh连接到SLAVE:2181时遇到连接失败的问题,通过检查zoo.cfg配置文件发现clientPort设置错误,原本设置为4081,应更改为2181。修复配置后,客户端成功连接到localhost:2181。
摘要由CSDN通过智能技术生成

1, 安装完zookeeper后运行客户端:


root@MASTER opt]# zkCli.sh -server SLAVE:2181
Connecting to SLAVE:2181
2016-11-10 11:15:10,274 [myid:] - INFO  [main:Environment@100] - Client environment:zookeeper.version=3.4.9-1757313, built on 08/23/2016 06:50 GMT
2016-11-10 11:15:10,279 [myid:] - INFO  [main:Environment@100] - Client environment:host.name=MASTER
2016-11-10 11:15:10,279 [myid:] - INFO  [main:Environment@100] - Client environment:java.version=1.8.0_111
2016-11-10 11:15:10,282 [myid:] - INFO  [main:Environment@100] - Client environment:java.vendor=Oracle Corporation
2016-11-10 11:15:10,282 [myid:] - INFO  [main:Environment@100] - Client environment:java.home=/usr/java/jdk1.8.0_111/jre
2016-11-10 11:15:10,282 [myid:] - INFO  [main:Environment@100] - Client environment:java.class.path=/root/cluster/opt/zookeeper-3.4.9/bin/../build/classes:/root/cluster/opt/zookeeper-3.4.9/bin/../build/lib/*.jar:/root/cluster/opt/zookeeper-3.4.9/bin/../lib/slf4j-log4j12-1.6.1.jar:/root/cluster/opt/zookeeper-3.4.9/bin/../lib/slf4j-api-1.6.1.jar:/root/cluster/opt/zookeeper-3.4.9/bin/../lib/netty-3.10.5.Final.jar:/root/cluster/opt/zookeeper-3.4.9/bin/../lib/log4j-1.2.16.jar:/root/cluster/opt/zookeeper-3.4.9/bin/../lib/jline-0.9.94.jar:/root/cluster/opt/zookeeper-3.4.9/bin/../zookeeper-3.4.9.jar:/root/cluster/opt/zookeeper-3.4.9/bin/../src/java/lib/*.jar:/root/cluster/opt/zookeeper-3.4.9/bin/../conf:/usr/java/jdk1.8.0_111/lib
2016-11-10 11:15:10,282 [myid:] - INFO  [main:Environment@100] - Client environment:java.library.path=/opt/STM/ST40R5.1.0/lib:/usr/java/packages/lib/i386:/lib:/usr/lib
2016-11-10 11:15:10,282 [myid:] - INFO  [main:Environment@100] - Client environment:java.io.tmpdir=/tmp
2016-11-10 11:15:10,282 [myid:] - INFO  [main:Environment@100] - Client environment:java.compiler=<NA>
2016-11-10 11:15:10,282 [myid:] - INFO  [main:Environme

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值