FS#55251 - [nginx] Nginx fails to restart when using listen + UNIX socket
Attached to Project:
Arch Linux
Opened by Adis Nezirović (adis) - Wednesday, 23 August 2017, 15:01 GMT
Last edited by Bartłomiej Piotrowski (Barthalion) - Sunday, 10 December 2017, 22:11 GMT
Opened by Adis Nezirović (adis) - Wednesday, 23 August 2017, 15:01 GMT
Last edited by Bartłomiej Piotrowski (Barthalion) - Sunday, 10 December 2017, 22:11 GMT
|
Details
When using UNIX sockets in listen directives, Nginx fails on
restarts with "[emerg] 2865#2865: bind() to
unix:/run/nginx-example.net.sock failed (98: Address already
in use)"
Sample config: server { listen unix:/run/nginx-example.net.sock; ... } The reason for this is using KillSignal=SIGQUIT in nginx systemd service file (where master process doesn't clean up its sockets) While it would suffice to use the default SIGTERM. Two other points: * 'KillMode=mixed' already sends SIGTERM signal to main process and SIGKILL to other processes in the control group * If SIGTERM fails, the termination request is repeated with SIGKILL https://www.freedesktop.org/software/systemd/man/systemd.kill.html |
This task depends upon
Closed by Bartłomiej Piotrowski (Barthalion)
Sunday, 10 December 2017, 22:11 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in trunk.
Sunday, 10 December 2017, 22:11 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in trunk.