我的Google Compute Engine实例上有零星的Google 404 [英] Sporadic Google 404's on my Google Compute Engine instance

查看:76
本文介绍了我的Google Compute Engine实例上有零星的Google 404的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在GCE实例上托管一个网站.我让domain.com的DNS指向我在Google Cloud上保留的静态IP.该实例在端口80上运行nginx,并将请求转发到在8080上运行的节点应用程序.

I'm hosting a website on a GCE instance. I have the DNS for domain.com pointed to a static IP that I have reserved on Google Cloud. This instance runs nginx on port 80, and forwards requests to a node app running on 8080.

它已经运行了几个月,但是今天我的客户一直抱怨他们有时会看到404.我在浏览器中打开了网站,然后开始刷新.我注意到,从该域请求的所有页面和资产都会随机响应Google 404页面

It's been running smoothly for months, but today my client has been complaining that they sometimes see 404s. I opened the site in a browser and began refreshing. I'm noticing that all pages and assets that are requested from this domain will randomly respond with a Google 404 page

我同时打开了nginx和节点访问日志,我看到请求甚至没有发送到nginx.这不是DNS问题,因为如果我几次运行curl:curl -I 123.123.123.123我仍然会看到它经常以404响应.

I opened both nginx and node access logs and I see the request is not even making it to nginx. It's not a DNS issue, because if I run curl a few times: curl -I 123.123.123.123 I will still see it respond with a 404 every so often.

Google云的状态页面指示没有中断.我想念什么?问题又在哪里?

Google cloud's status page indicates no outages. What am I missing? Where else can the problem lie?

推荐答案

我今天也遇到了这个问题,使用Nginx在计算引擎上运行Express应用程序.这很奇怪,因为如果它是实际的404,我希望Express会做出响应.

I'm also hitting this issue today, running an express app on compute engine with Nginx. It's weird because if it were an actual 404, I would expect express to respond.

我在发出出站请求时也遇到间歇性问题,它们有时会超时.我尝试重新启动并重新配置整个应用程序. Google的状态页也没有指出任何问题.

I also have intermittent issues making outbound requests, and they'll occasionally timeout. I've tried restarting and re-configuring the entire app. Google's status pages also don't point to any issues.

试图通过创建一个新实例并使用旧启动磁盘的快照来解决此问题……奇怪的是,当使用生成的临时IP时,它似乎可以正常工作,但是当我将其切换到静态时我用原始实例设置的IP,我开始遇到同样的问题.由于IP的设置位置,我也无法在其他区域中设置计算机,并且我不想生成新的计算机,然后再处理DNS更改.

Tried to resolve this by creating a new instance and using a snapshot of the old boot disk... strangely, it seemed to work fine when using the ephemeral IP that was generated, but when I switched it to the static IP I had set up with the original instance, I started hitting the same issue. I also can't set up the machine in a different zone because of where the IP is set up, and I don't want to generate a new one due and then deal with the DNS changes.

这篇关于我的Google Compute Engine实例上有零星的Google 404的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆