gpt4 book ai didi

node.js - 计算引擎 : "This site can’ t be reached"

转载 作者:IT老高 更新时间:2023-10-28 22:07:22 26 4
gpt4 key购买 nike

情况:

我关注 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 

虽然我重复了所有步骤两次,但我仍然遇到错误消息。

一定少了点什么。


编辑:

我的防火墙规则:

enter image description here

最佳答案

我猜你没有将防火墙标签应用于实例?

首先,您可以检查您的计算实例标签。

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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com