本质上还是防火墙的问题
参考: 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

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

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

centOS7的命令:
systemctl stop firewalld
 
centOS6及之前的命令:
service iptables stop

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-22
  • 2022-12-23
  • 2021-12-13
  • 2021-06-01
  • 2022-12-23
  • 2021-07-13
猜你喜欢
  • 2021-11-19
  • 2021-10-25
  • 2022-12-23
  • 2022-12-23
  • 2021-08-05
相关资源
相似解决方案