Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compute Engine : "This site can’t be reached"

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:

enter image description here

like image 796
Coder1000 Avatar asked Feb 07 '17 19:02

Coder1000


1 Answers

I guess you don't apply firewall tag to instance ?

First, you can check your compute instences tags.

gcloud compute instances describe my-app-instance 

In your example , you should see http-server in tags-items, like follows

tags:   fingerprint: xxxxxxx   items:   - http-server   - https-server 

If not exist, you should add the tags to an existing VM instance, use this gcloud command:

gcloud compute instances add-tags [YOUR_INSTANCE_NAME] --tags http-server,https-server 

To add the tags at the time of the instance creation, include that flag in your statement:

gcloud compute instances create [YOUR_INSTANCE_NAME] --tags http-server,https-server 
like image 157
howie Avatar answered Oct 08 '22 18:10

howie