Nginx is not running after server reboot

Created:

2016-11-16 13:01:12 UTC

Modified:

2017-04-24 11:21:12 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Nginx is not running after server reboot

Applicable to:

  • Plesk 12.5 for Linux

Symptoms

  • Nginx is not running after server reboot;

  • Nginx can be started manually without issues;

  • The following can be found in journalctl :

    # journalctl -u httpd.service -u nginx.service -b
    Sep 25 03:16:21 glinksoft.com systemd[1]: Starting Startup script for nginx service...
    Sep 25 03:16:21 glinksoft.com systemd[1]: Starting The Apache HTTP Server...
    .....
    Sep 25 03:17:51 glinksoft.com systemd[1]: httpd.service start operation timed out. Terminating.
    Sep 25 03:17:51 glinksoft.com systemd[1]: nginx.service start-pre operation timed out. Terminating.
    Sep 25 03:17:51 glinksoft.com systemd[1]: Failed to start Startup script for nginx service.
    Sep 25 03:17:51 glinksoft.com systemd[1]: Unit nginx.service entered failed state.
    Sep 25 03:17:51 glinksoft.com systemd[1]: nginx.service failed.
    .....
    Sep 25 03:19:21 glinksoft.com systemd[1]: Failed to start The Apache HTTP Server.
    Sep 25 03:19:21 glinksoft.com systemd[1]: Unit httpd.service entered failed state.
    Sep 25 03:19:21 glinksoft.com systemd[1]: httpd.service failed.

Cause

Not sufficient timeout value for starting Apache.

Resolution

Add/increase TimeoutStartSec value in the [Service] section of /usr/lib/systemd/system/httpd.service :

# less /usr/lib/systemd/system/httpd.service
...
[Service]
...
TimeoutStartSec=600
Have more questions? Submit a request
Please sign in to leave a comment.