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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM