Server running on instance, but not visible at <ip>:8080

4,329 views
Skip to first unread message

Sam Haaf

unread,
Oct 17, 2016, 9:07:38 PM10/17/16
to Google Cloud Developers
Hello,

I've gotten into the instance via ssh and manually pulled the code from a git repository.  I've run the following code and I've got the server running on host 0.0.0.0 and port 8080.

gcloud compute firewall-rules create default-allow-http-8080 \
   
--allow tcp:8080 \
   
--source-ranges 0.0.0.0/0 \
   
--target-tags http-server \
   
--description "Allow port 8080 access to http-server"

When I browse to the <ip>:8080 it times out. The server is flask, and it's connected to a neo4j database. I didn't use the setup script that google suggested at https://cloud.google.com/python/getting-started/run-on-compute-engine#download_app
Thank you in advance, and please let me know what information would be helpful in understanding this problem.

Carlos (Cloud Platform Support)

unread,
Oct 18, 2016, 1:24:42 PM10/18/16
to google-c...@googlegroups.com
Hi Sam,

I would start by checking if the service on port 8080 of the VM is listening (netstat --listen).  

Secondly I would check that the server is tagged as ¨http-server¨. According to the rule you posted only if the server is tagged using that specific label, traffic will be allowed to it. You can obtain that information from your Cloud Console or by using ¨gcloud compute instances describe NAME¨.

In addition to Google Firewall you must make sure that iptables or any other firewall inside the VM is not blocking packets.  

A useful tool you can use to determine the status of your port is nmap. It can pinpoint if the port is closed or packages are being filtered. 

I hope this helps. 
Reply all
Reply to author
Forward
0 new messages