root@k8s-node01:~# curl 192.168.22.136:8080
curl: (7) Failed to connect to 192.168.22.136 port 8080: No route to host
root@k8s-node01:~# ping 192.168.22.136
PING 192.168.22.136 (192.168.22.136) 56(84) bytes of data.
64 bytes from 192.168.22.136: icmp_seq=1 ttl=60 time=34.5 ms
64 bytes from 192.168.22.136: icmp_seq=2 ttl=60 time=34.1 ms
192.168.22.136 是我的 archlinux,我能 ping 通,为啥 curl 会报错 no route to host 呢?
这个是 archlinux 的 route 表
$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.22.1 0.0.0.0 UG 100 0 0 enp3s0
10.0.0.0 192.168.22.1 255.0.0.0 UG 100 0 0 enp3s0
172.16.6.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet8
192.168.22.0 0.0.0.0 255.255.255.0 U 100 0 0 enp3s0
192.168.61.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet1
192.168.192.0 0.0.0.0 255.255.255.0 U 0 0 0 ztjlh3ajee
iptables 信息,已经关了防火墙了
$ sudo iptables -nL
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.