简体   繁体   English

无法访问谷歌云计算实例外部 IP(启动 fedora35)

[英]Can't access Google Cloud Compute Instance External IP (boot fedora35)

I have a nodejs app running inside it a vm instance .我有一个nodejs app在其中运行一个vm instance I created a firewall rule opening port tcp:5000 .我创建了一个开放端口 tcp:5000firewall rule It works locally (inside vm) and I am able to verify the connection via它在本地(在 vm 内部)工作,我可以通过以下方式验证连接

sudo wget http://localhost:5000

this gives status 200 ok.这给出了status 200 ok。

when I replace the localhost with the vm external Ip address I get a connection time out.当我用vm 外部 IP 地址替换localhost时,连接超时。 在此处输入图像描述 在此处输入图像描述

I have tried most things I could get on the internet but now I am tired.我已经尝试了大多数可以在互联网上获得的东西,但现在我很累。 Its my first time interacting with gcp so I guess it's expected.这是我第一次与 gcp 交互,所以我想这是意料之中的。

The Network tags on the VM instance do not match your firewall rule inventory-controller-port .虚拟机实例上的网络标签与您的防火墙规则inventory-controller-port不匹配。 The Compute Engine Instance has these network tags http-server , https-server . Compute Engine 实例具有这些网络标签http-serverhttps-server To resolve this issue, these are your options.要解决此问题,这些是您的选择。

  1. Update the Firewall rule inventory-controller-port and add these network tags http-server , https-server .更新防火墙规则inventory-controller-port并添加这些网络标签http-serverhttps-server For more information, check this documentation about updating firewall rules.有关更多信息,请查看有关更新防火墙规则的文档
  2. Add additional network tags that you added on the Firewall rule inventory-controller-port on your existing VM.添加您在现有 VM 上的防火墙规则inventory-controller-port上添加的其他网络标记。 To know more check this documentation about Adding tags to an existing VM.要了解更多信息,请查看有关向现有 VM 添加标签的文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM