This blog is a dockerized WordPress blog. I noticed that my blog site was down this morning. I couldn’t even ssh into the host. I thought it was hacked somehow. After poking it around, I got it back up and running. Here is the things I did to get it back up.
- When I did ping hayato-iriumi.net, I got response back.
- After a while, I could hit the website but it wasn’t connecting to the database.
- I couldn’t even ssh into the host, so I restarted it.
- I was able to ssh into it now, so I checked the running containers with the following command.
docker ps -a
- I noticed that NGINX container was failing because it could not start because port 80 was already in use.
- Checked which process was using port 80 with the following command.
sudo netstat -pna | grep 80
- It turned out that another instance of NGINX was hogging the port. I stopped it and disabled it with the following command.
sudo systemctl stop nginx
sudo systemctl disable nginx
sudo apt remove nginx
- I’m not sure what installed the instance of NGINX.
- Restarted the host.
- The site came back up.
I am seeing some errors in
journalctl so something else may have caused the issue. This is a very common troubleshooting for Linux users but you should know where to look to troubleshoot Linux hosted service. I may rebuild this blog host again just in case it might have been hacked.