Question

How to solve failed restart for Apache server after delayed payment on digitalocean?

Posted February 8, 2021 1.1k views
ApacheConfiguration ManagementDigitalOcean Droplets

The monthly payment was delayed in digital-ocean because the client hadn’t enough money in his account, so the server went down. After the client payed the bill, the droplet is active and I tried to restart Apache service many times but I keep getting this error every time:

apache2.service - The Apache HTTP Server Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled) Active: failed (Result: timeout) since Mon 2021-02-08 07:53:10 UTC; 6h ago Docs: https://httpd.apache.org/docs/2.4/ Process: 39767 ExecStart=/usr/sbin/apachectl start (code=killed, signal=TERM)

Feb 08 07:48:47 mywebsite systemd[1]: Stopped The Apache HTTP Server. Feb 08 07:48:47 mywebsite systemd[1]: Starting The Apache HTTP Server... Feb 08 07:52:45 mywebsite systemd[1]: apache2.service: start operation timed out. Terminating. Feb 08 07:53:10 zeroto10 systemd[1]: apache2.service: Failed with result 'timeout'. Feb 08 07:53:10 zeroto10 systemd[1]: Failed to start The Apache HTTP Server.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hi @a11a22a11a22,

In situations like this, I always tell people to check their error_logs. The Apache Error Log will show you the exact reason behind this issue. Once you know the reason for the failure, it’s easy to fix it. The solution can be googled.

If you are using an Ubuntu droplet, you should be able to find the logs for Apache in the following place:

/var/log/apache2/error.log

If it’s CentOS that you are using, you can find it here;

/var/log/httpd/error.log

Now, try to restart apache and see what the log says. I do believe from seeing the error message that most probably another instance (that has failed) of Apache is running. You can confirm this by typing:

nestat -tulpen | grep 80

or

ps aux | grep apache2 (that's for ubuntu)
ps aux | grep httpd (that's for centos)

Regards,
KFSys