Welcome! Log In Create A New Profile

Advanced

Nginx can't reload even when config is OK

November 18, 2017 08:21AM
Hello everybody,

I have been working with Nginx for quite a long time, but I have stumbled upon a very strange error.
Nginx is compiled from source on CentOS 7.

All systemctl commands work, except the reload function.
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.

I have already tried to do the actions manually, which seemed to be working. The
/bin/kill -s HUP $MAINPID

systemctl status nginx.service -l gives me:
nginx.service - The nginx HTTP and reverse proxy server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
Active: active (running) (Result: exit-code) since Sat 2017-11-18 08:17:14 EST; 1min 34s ago
Process: 22036 ExecReload=/bin/kill -s HUP (code=exited, status=1/FAILURE)
Process: 22025 ExecStart=/usr/sbin/nginx (code=exited, status=0/SUCCESS)
Process: 22020 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=0/SUCCESS)
Process: 22018 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS)
Main PID: 22028 (nginx)
CGroup: /system.slice/nginx.service
22028 nginx: master process /usr/sbin/ngin
22029 nginx: worker proces

Nov 18 08:17:21 host kill[22036]: -s, --signal <sig> send specified signal
Nov 18 08:17:21 host kill[22036]: -q, --queue <sig> use sigqueue(2) rather than kill(2)
Nov 18 08:17:21 host kill[22036]: -p, --pid print pids without signaling them
Nov 18 08:17:21 host kill[22036]: -l, --list [=<signal>] list signal names, or convert one to a name
Nov 18 08:17:21 host kill[22036]: -L, --table list signal names and numbers
Nov 18 08:17:21 host kill[22036]: -h, --help display this help and exit
Nov 18 08:17:21 host kill[22036]: -V, --version output version information and exit
Nov 18 08:17:21 host kill[22036]: For more details see kill(1).
Nov 18 08:17:21 host systemd[1]: nginx.service: control process exited, code=exited status=1
Nov 18 08:17:21 host systemd[1]: Reload failed for The nginx HTTP and reverse proxy server.

nginx -t are passed successfully. The logs don't provide any information. Config is default config.

Does anybody know where I have to look now?

Thanks!
Subject Author Posted

Nginx can't reload even when config is OK

tamer1009 November 18, 2017 08:21AM

Re: Nginx can't reload even when config is OK

Vlad K. November 18, 2017 09:00AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 165
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready