今天我在 GCP 上的一台 VM 突然无法访问 HTTP 了,从 Web Console 登录上去看一切都很正常,例如我尝试这些操作:

  1. [root@liqiang.io]# curl -I http://localhost
  2. HTTP/1.1 302 Found
  3. Content-Type: text/html; charset=utf-8
  4. Location: https://localhost/
  5. Date: Thu, 01 Aug 2019 07:59:20 GMT
  6. [root@liqiang.io]# ping domain.liqiang.io
  7. PING rancher.liqiang.io (34.92.31.200) 56(84) bytes of data.
  8. 64 bytes from 249.33.92.34.bc.googleusercontent.com (34.92.31.200): icmp_seq=1 ttl=76 time=0.925 ms
  9. 64 bytes from 249.33.92.34.bc.googleusercontent.com (34.92.31.200): icmp_seq=2 ttl=76 time=0.357 ms
  10. [root@liqiang.io]# curl -I http://domain.liqiang.io

最后一个通过域名访问死活就是不通。于是尝试用 IP 来访问,也是死活都不通。于是登录管理页面查看一下,发现 VM 有个建议是升级配置,说我这个 VM 使用资源过多,当前资源可能不足,我使用的最低配置,1C1.75G,所以就决定升级一下,升级到 2C3.5G,结果居然可以了。

所以这里猜测的结论就是: