Website down

Today I received alert email suddenly which said my blog site went down…😂😂😂

So I logged in server and checked containers’s status, everything looked fine

[root@blog xiaowang]# docker stack ps blog
ID                  NAME                IMAGE               NODE                DESIRED STATE       CURRENT STATE            ERROR               PORTS
qwsjjol3jk2f        blog_mysql.1        mysql:5.7           blog                Running             Running 15 days ago                       
n9gbil4zcavy        blog_nginx.1        nginx:1.13.8        blog                Running             Running 15 days ago                       
hg778gcc35vz        blog_wordpress.1    wordpress:4.9.1     blog                Running             Running 15 days ago

When I checked the port, everything also looked fine

[root@blog xiaowang]# netstat -tuapn | egrep '80|443'
tcp6       4      0 :::80                   :::*                    LISTEN      12146/dockerd       
tcp6       2      0 :::443                  :::*                    LISTEN      12146/dockerd       
tcp6      74      0 ::1:80                  ::1:47352               CLOSE_WAIT  -                   
tcp6       3      0 ::1:80                  ::1:47348               CLOSE_WAIT  -                   
tcp6      74      0 ::1:80                  ::1:47402               CLOSE_WAIT  -                   
tcp6      78      0 ::1:443                 ::1:56994               CLOSE_WAIT  -                   
tcp6      78      0 ::1:443                 ::1:56944               CLOSE_WAIT  -                   
tcp6      74      0 ::1:80                  ::1:47350               CLOSE_WAIT  -

But when I executed “curl http://localhost, it was blocked, so I guess something wrong with local network.

After checking I executed “sysctl -w net.ipv4.ip_forward=1” to enable ip forward, and I finally could access the port. So I executed “echo “net.ipv4.ip_forward=1″ >> /etc/sysctl.conf” to make it permanent.

I’m using google cloud, I guess maybe they have reset the network which I didn’t make it permanent before.