I've installed nginx
using this sources.list.d
entry:
deb http://nginx.org/packages/ubuntu/ xenial nginx
deb-src http://nginx.org/packages/ubuntu/ xenial nginx
The nginx version is 1.12.2-1~xenial
. The server is running Ubuntu 16.04 LTS, with kernel 4.4.0-36-generic
.
My problem is that the nginx
daemon fails to start:
$ sudo systemctl start nginx
Job for nginx.service failed because a timeout was exceeded. See "systemctl status nginx.service" and "journalctl -xe" for details.
Unfortunately, these logs don't provide much information:
$ sudo journalctl -xe
Feb 05 10:43:50 SERVERNAME nginx[17035]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
Feb 05 10:43:50 SERVERNAME nginx[17035]: nginx: configuration file /etc/nginx/nginx.conf test is successful
Feb 05 10:45:21 SERVERNAME systemd[1]: nginx.service: Start operation timed out. Terminating.
Feb 05 10:45:21 SERVERNAME systemd[1]: Failed to start nginx - high performance web server.
-- Subject: Unit nginx.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit nginx.service has failed.
--
-- The result is failed.
Feb 05 10:45:21 SERVERNAME systemd[1]: nginx.service: Unit entered failed state.
Feb 05 10:45:21 SERVERNAME systemd[1]: nginx.service: Failed with result 'timeout'.
From what I can tell, nginx does indeed start correctly. It's as if the parent process doesn't receive the "I am started" message from it's child process(es) correctly being the problem. When it's running (systemd waiting for it to start), I can successfully curl it like this:
$ curl http://localhost:8000
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.12.2</center>
</body>
</html>
I feel lost on this, apart from perhaps testing another nginx
version or something. Any ideas? I could reboot the server but it feels silly on a Linux server.
Update 9:56 UTC: Tested with 1.13.8-1~xenial
, same problem.