计算引擎:“此网站无法访问” [英] Compute Engine : "This site can’t be reached"
问题描述
状态:
我正在关注本教程。
当我到达创建实例的部分并执行必要的命令,我得到以下内容:
要查看运行的应用程序,请转至http:// [YOUR_INSTANCE_IP]: 8080,
其中[YOUR_INSTANCE_IP]是您的实例的外部IP地址。
问题:
页面没有加载。我收到以下错误消息:
无法访问此网站
问题:
<
以前的所有步骤都很完美,我可以在本地访问我的网站。
我等待Compute Engine实例准备就绪,方法是检查:
gcloud计算实例get-serial-port-output my-app-instance -zone us-central1 -f
虽然我将所有步骤重复两次,我仍然遇到了错误消息。
必须缺少一些东西。
编辑:
我的防火墙规则:
< a href =https://i.stack.imgur.com/0Bwi1.png =nofollow noreferrer>
如果您的代码和防火墙规则是正确的,那么很可能您尝试连接到错误的IP。你应该使用外部IP,而不是使用外部IP。 ifconfig
。
SITUATION:
I am following this tutorial.
When I get to the part where I create an instance and I execute the necessary commands, I get to the following:
To see the application running, go to http://[YOUR_INSTANCE_IP]:8080,
where [YOUR_INSTANCE_IP] is the external IP address of your instance.
PROBLEM:
The page deosn't load. I get the following error message:
This site can’t be reached
QUESTION:
What could have gone wrong ?
All previous steps worked perfectly and I was able to access my website locally.
I waited for the Compute Engine instance to be ready by checking:
gcloud compute instances get-serial-port-output my-app-instance --zone us-central1-f
and although I reproduced all the steps twice, I am still met with the error message.
Something must be missing.
EDIT:
My firewall rules:
If your code and firewall rules are correct then it's highly possible that you are trying to connect to wrong IP. You should be using external IP, not internal one which you get using ifconfig
.
这篇关于计算引擎:“此网站无法访问”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!