GCP VM - 能够 ping google.com 域,但使用 curl 和 wget 时会超时

GCP VM - 能够 ping google.com 域,但使用 curl 和 wget 时会超时

今天,我在中部地区的 GCP 上的一些虚拟机无法运行 YUM,进一步检查发现 CURL 无法连接到任何 google.com 域(运行 ping 和 dig 没有问题),所以我确定这不是解析错误

ping packages.cloud.google.com
PING www3.l.google.com (74.125.124.139) 56(84) bytes of data.
64 bytes from 74.125.124.139 (74.125.124.139): icmp_seq=1 ttl=52 time=0.983 ms
64 bytes from 74.125.124.139 (74.125.124.139): icmp_seq=2 ttl=52 time=0.505 ms
64 bytes from 74.125.124.139 (74.125.124.139): icmp_seq=3 ttl=52 time=0.334 ms

WGET/CURL 超时

wget https://packages.cloud.google.com/yum/repos/cloud-sdk-el7-x86_64/repodata/repomd.xml
--2019-09-09 11:09:09--  https://packages.cloud.google.com/yum/repos/cloud-sdk-el7-x86_64/repodata/repomd.xml
Resolving packages.cloud.google.com (packages.cloud.google.com)... 209.85.147.102, 209.85.147.100, 209.85.147.139, ...
Connecting to packages.cloud.google.com (packages.cloud.google.com)|209.85.147.102|:443...

到目前为止,我的两个实例都发生过这种情况,有什么指示吗?

答案1

请检查您的防火墙。因为它似乎允许进入 ICMP,但不允许 TCP 端口 80。您可以检查类似问题

相关内容