nginx is running but shows as crashed in rc-service
#1
Sun, 2017-01-22 14:56
bootrecords
-
- Offline
- 2 months 3 weeks ago
- 2016-01-03
This is a thing that I've been wondering about for a while now. I have nginx installed and its process running (and working properly), but its (rc-)service connection is apparently not functional: As soon as the nginx service is started, rc-status reports it as crashed, even though it's evidently working fine.
What's worse is that based on this "mis-sync" re-starting the service is not easily possible: executing rc-service nginx restart
results in errors like
nginx: [emerg] bind() to [::]:80 failed (98: Address in use) nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)
To restart the service, one has to stop the service (
rc-service nginx stop
), manually terminate nginx's processes (e.g. via fuser -k 80/tcp
), and afterwards use rc-service nginx start
again. This will set up the processes again, but the service will again report as crashed.
Is this common behaviour or could this be the result of some misconfiguration? Any hints at how to find out where this comes from?