报错:Cannot open channel to 2 at election address /192.168.135.133:3888
记录一个启动zookeeper集群报错,如果你的zookeeper启动失败,查看日志
报错:Cannot open channel to 2 at election address /192.168.135.133:3888
java.net.NoRouteToHostException: No route to host (Host unreachable)
由于zookeeper是集群搭建,配置如下:
是因为没有权限开启其他机器的端口,可以去开放指定端口,或者是关闭防火墙。
关闭防火墙:
systemctl stop firewalld.service
如果需要永久关闭,再执行下面命令:
sudo systemctl disable firewalld
sudo systemctl mask --now firewalld
关闭防火墙后,问题解决。