21.1.8 - nginx doesn't start

Started by GreenMatter, July 07, 2021, 01:39:56 PM

Previous topic - Next topic
July 07, 2021, 01:39:56 PM Last Edit: July 07, 2021, 02:12:58 PM by GreenMatter
After upgrading to 21.1.8 and reboot, nginx can't be run. When I try to do it manually I get:
Quote
root@OPNsense:~ # service nginx start
Performing sanity check on nginx configuration:
nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok
nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful
Starting nginx.
nginx: [emerg] bind() to unix:/var/run/nginx_status.sock failed (48: Address already in use)
nginx: [emerg] bind() to unix:/var/run/nginx_status.sock failed (48: Address already in use)
nginx: [emerg] bind() to unix:/var/run/nginx_status.sock failed (48: Address already in use)
nginx: [emerg] bind() to unix:/var/run/nginx_status.sock failed (48: Address already in use)
nginx: [emerg] bind() to unix:/var/run/nginx_status.sock failed (48: Address already in use)
nginx: [emerg] still could not bind()
/usr/local/etc/rc.d/nginx: WARNING: failed to start nginx
It must be related to update since I had changed nothing in nginx setup...
sockstat output doesn't show "/var/run/nginx_status.sock", socket doesn't exist???

EDIT:
Strange enough, after additional, post-update reboot nginx is up and running...
OPNsense on:
Intel(R) Xeon(R) E-2278G CPU @ 3.40GHz (4 cores)
8 GB RAM
50 GB HDD
and plenty of vlans ;-)

There was likely an old process so the socket was not free. However you could have just deleted the socket file as well and restarted nginx afterwards.