1、安装zookeeper时一直提示以下错误,无奈把防火墙关掉之后还是提示,最终发现,防火墙没关闭成功
WARN [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:21810:Learner@237] - Unexpected exception, tries=1, connecting to slave2/172.2.4.161:28880
java.net.ConnectException: 拒绝连接 (Connection refused)
WARN [WorkerSender[myid=4]:QuorumCnxManager@584] - Cannot open channel to 2 at election address slave1/172.2.1.175:38880
java.net.NoRouteToHostException: 没有到主机的路由 (Host unreachable)
2、先查看防火墙是否已关闭:
[root@slave2 bin]# firewall-cmd --state
not running
--永久关闭防火墙
systemctl disable firewalld.service
3、centos7,关闭防火墙
systemctl stop firewalld.service
成功了
[root@slave1 bin]# ./zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /usr/hadoop/zookeeper-3.4.12/bin/../conf/zoo.cfg
Mode: follower
期间测试过修改zookeeper的通信端口,无奈只是防火墙问题
留次文章做个警醒