情况:
我关注 this教程。
当我到达创建实例并执行必要命令的部分时,我会看到以下内容:
To see the application running, go to http://[YOUR_INSTANCE_IP]:8080,
where [YOUR_INSTANCE_IP] is the external IP address of your instance.
问题:
页面无法加载。我收到以下错误消息:
This site can’t be reached
问题:
可能出了什么问题?
之前的所有步骤都运行良好,我可以在本地访问我的网站。
我通过检查等待 Compute Engine 实例准备就绪:
gcloud compute instances get-serial-port-output my-app-instance --zone us-central1-f
虽然我重复了所有步骤两次,但我仍然遇到错误消息。
一定少了点什么。
编辑:
我的防火墙规则:
最佳答案
我猜你没有将防火墙标签应用于实例?
首先,您可以检查您的计算实例标签。
gcloud compute instances describe my-app-instance
在您的示例中,您应该在标签项中看到 http-server,如下所示
tags:
fingerprint: xxxxxxx
items:
- http-server
- https-server
如果不存在,则应将标签添加到现有 VM 实例,使用此 gcloud 命令:
gcloud compute instances add-tags [YOUR_INSTANCE_NAME] --tags http-server,https-server
要在创建实例时添加标签,请在语句中包含该标志:
gcloud compute instances create [YOUR_INSTANCE_NAME] --tags http-server,https-server
关于node.js - 计算引擎 : "This site can’ t be reached",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42098008/