Unable to connect to remote host: No route to host(亲测解决)
程序员文章站
2024-03-13 23:53:04
...
最近运行Hadoop程序的时候遇到了这个Bug,很久才改好,做一些必要的笔记,一来是对自己学习的知识的巩固,二来对有同样问题的人有参考作用。
文章目录
一 问题描述
今天遇到了一个ip能ping通,但是telnet报错:
Unable to connect to remote host: No route to host
二 解决思路和步骤
看了下资料说是有可能是icmp(Internet Control Message Protocol)被禁用了导致的;
看下iptables是不是有防火墙的设置:
iptables -L INPUT --line-numbers
结果如下:
7 REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
解决方法,删除这条记录:
iptables -D INPUT 7
这个时候再执行telnet就通了。
三 修改完成后的结果
四 总结
如有错误恳请指正,如有侵权请联系我删除
推荐阅读
-
ssh: connect to host 192.168.1.20 port 22: No route to host解决方案
-
Unable to connect to remote host: No route to host(亲测解决)
-
Unable to connect to the server: dial tcp 192.168.0.132:16443: connect: no route to host解决
-
curl: (7) Failed connect to IP:port; No route to host解决方案
-
启动hadoop出现ssh: connect to host master port 22: No route to host 问题解决方案
-
kubectl get 报错:Unable to connect to the server: dial tcp 10.20.2.224:6443: connect: no route to host
-
解决ssh [email protected]<robot ip>时报错 ssh: connect to host <robot ip> port 22: No route to host
-
curl: (7) Failed connect to IP:port; No route to host解决方案