Zookeeper: java.net.NoRouteToHostException: No route to host (Host unreachable)

本质上还是防火墙的问题
参考: https://blog.csdn.net/qq_29301417/article/details/76033181

步骤

CentOS7执行如下指令可以开放指定端口号:

  • 添加要开放端口号
firewall-cmd --permanent --add-port=2181/tcp
firewall-cmd --permanent --add-port=2888/tcp
firewall-cmd --permanent --add-port=3888/tcp
  • 重新载入防火墙配置:
firewall-cmd --reload
  • 查看配置是否生效:
firewall-cmd --list-ports

也可以全部开放所有端口号去除防火墙

centOS7的命令:
systemctl stop firewalld
 
centOS6及之前的命令:
service iptables stop
posted @ 2021-08-12 11:00  Felix_Openmind  阅读(2138)  评论(0)    收藏  举报
*{cursor: url(https://files-cdn.cnblogs.com/files/morango/fish-cursor.ico),auto;}