计算引擎:“此网站无法访问” [英] Compute Engine : "This site can’t be reached"

查看:149

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屋!

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