As you've pointed out, the presence of the red exclamation mark icon indicates the instance has been terminated. Unfortunately, even though there's a reboot button present for terminated instances, it simply won't work; the backend system that handles the reboot API call requires a running instance rather than a terminated one. In order to get the instance running again, you'll need to delete the instance (but save the disk!), and create a new instance booting from that existing disk. This is effectively the same thing as restarting the machine, but obviously requires a little legwork.
I'll file a feature request to better deal with starting up terminated instances -- what you're doing makes sense, and I'd personally like to see the system support it directly.
Closed port 80
$ nmap -p80 104.196.111.24
Starting Nmap 6.40 ( http://nmap.org ) at 2016-03-09 16:25 CET
Nmap scan report for 24.111.196.104.bc.googleusercontent.com (104.196.111.24)
Host is up (0.14s latency).
PORT STATE SERVICE
80/tcp closed http
This leads to think there's something wrong in the firewall configuration, despite the "Allow http traffic" and "Allow https traffic" options that are checked on your screenshot. Now I don't know more about the firewall configuration of a GCE.
(NB Somewhat later: as of now, nmap
reports the host is down.)
About my initial post
My initial post, below, would apply to a nginx
instance running on the real host. I have missed the fact that you're actually running a Virtual Machine, where it may be normal to have nginx
listening to local addresses ('something else' on the host proxies the requests to the VM). However I don't understand why the internal IP address does not show up in your ifconfig
output.
Initial post content:
If I understand well, you have an nginx instance running on a server whose address is 104.196.111.24. And when you try to access this address in a web browser, you get an error.
So, I'm not absolutely sure this will work, but I notice your nginx instance is listening to port 80 on 0.0.0.0 (ipv4), what is a local address. Wikipedia says about it:
In the Internet Protocol Version 4, the address 0.0.0.0 is a
non-routable meta-address used to designate an invalid, unknown or
non-applicable target.
Moreover:
In the context of servers, 0.0.0.0 means "all IPv4 addresses on the
local machine".
So I think there's something to fix here, as nginx
seems to be reachable only from local addresses on your server.
Moreover, if I set myself nginx
to listen to port 80 on 0.0.0.0 for any of my websites, then browsing this site will return an error (like connexion has been reinitialized, not an error from nginx
).
So, I would try to set nginx
to listen to port 80 on the external address, like:
listen 104.196.111.24:80;
(and of course after that, check this is right with nginx -t
and then reload nginx rules with service nginx reload
).
EDIT: the additional information from ifconfig
lets me think there's really something wrong (or not setup) in the network configuration but I can't explain it: the address of the network card (eth0, running) is 172.17.0.2, what belongs to some special IANA reserved range of addresses. I would expect 104.196.111.24 to show up in ifconfig
's output, but it does not. I don't even understand how you can ssh into 104.196.111.24 without having it setup. Anyway, I think nginx
can't be reached from the outside as long as it's listening on 0.0.0.0, this has certainly to be fixed in order to solve the problem, which may be done by fixing the network configuration.
Best Answer
There’s nothing different in running
sudo reboot
in a instance versus on your own server. This action shouldn't cause any problems.