1

I'm running Raspbian Jessie on my Raspberry Pi Zero W and I recently installed NginX 1.10.1 on it by using this tutorial: Use your Raspberry Pi as your local NodeJS Webserver (The reason I did not use apt-get is because it only installs up to 1.6.2 and I wanted the http2 services.)

So I followed the tutorial strictly for NginX (didn't install the other things) and I ran

sudo /etc/init.d/nginx start

at the end and ended up with this error:

 [....] Starting nginx (via systemctl): nginx.serviceJob for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' for details.

And when I run

systemctl status nginx.service

I get this:

nginx.service - LSB: nginx init.d dash script for Ubuntu <=9.10.
Loaded: loaded (/etc/init.d/nginx)
Active: failed (Result: timeout) since Wed 2017-06-28 15:24:34 UTC; 1min 17s ago
Process: 6239 ExecStart=/etc/init.d/nginx start (code=exited, status=0/SUCCESS)

Jun 28 15:19:34 raspberrypi nginx[6239]: Starting Nginx Server...: failed!
Jun 28 15:19:34 raspberrypi systemd[1]: PID file /acronymlabs/server/nginx.pid not readable (yet?) after start.
Jun 28 15:24:34 raspberrypi systemd[1]: nginx.service start operation timed out. Terminating.
Jun 28 15:24:34 raspberrypi systemd[1]: Failed to start LSB: nginx init.d dash script for Ubuntu <=9.10..
Jun 28 15:24:34 raspberrypi systemd[1]: Unit nginx.service entered failed state.

Now here's the issue. It really is a non-issue but it bothers me. The server is running and on my browser I can type in the IP address of the Pi and see index.html in the /var/www/ directory as expected.

I'd just like to figure out why it says this because it normally just says [ok] when the start command is sent. Also, this 'tries' to boot it up for a long while which keeps my command prompt occupied.

  • It clearly states that a file is not readable or taking too long to read? Have you checked that that file exists? – Mohammad Ali Jun 28 '17 at 21:20
  • That's the thing, it does exist and even though it says it failed to start, the program actually did start. I'm looking at the servers main website right now. So it did read but for some reason it thinks that it did not read. – Rayaarito Jun 28 '17 at 21:43
  • Why did you start using sysV rather than the systemd service? No one can tell what you have as you haven't told us; you may or may not have followed this rather unusual tutorial. – Milliways Jun 29 '17 at 7:02
  • What do you mean sysV. I'm new to Linux so I'm not sure of what you're talking about. I followed the tutorial starting from the My Nginx part on the bottom to a T. After some playing around I figured out that the issue probably has to deal with the fact that when I do the NginX stop command. It says [ok] but it actually does not stop. I'm pretty sure once I figure that out, it'll solve this question. Thank you – Rayaarito Jun 29 '17 at 11:12
  • Update: For people who run into the same issue. I don't know why it worked but, all I did was type in sudo systemctl daemon-reload and it worked. Now I can stop and start nginx without any issues. – Rayaarito Jun 30 '17 at 18:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.