nginx 1.18.0 does not reload on ubuntu 18.04

Zach Mitchell zlmitche at syr.edu
Fri May 22 14:59:22 UTC 2020


I'm using a nginx 1.18.0 and 1.16.1 and when i perform a systemctl restart nginx, it does not actually reload the configs. nginx -s reload does not work either. Am i missing a configure flag that allows this to work properly?

Here is my nginx -V

built by gcc 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.12)
built with OpenSSL 1.1.1g  21 Apr 2020
TLS SNI support enabled
configure arguments: --prefix=/usr/local/nginx --modules-path=/usr/lib/nginx/modules --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --with-threads --with-file-aio --with-http_ssl_module --with-http_v2_module --with-http_stub_status_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_stub_status_module --with-http_realip_module --with-compat --with-pcre=../pcre-8.44 --with-pcre-jit --with-zlib=../zlib-1.2.11 --with-openssl=../openssl-1.1.1g --with-openssl-opt=no-nextprotoneg --add-module=../ngx_cache_purge-2.3

Here is my systemd nginx.service

[Unit]
Description=The NGINX HTTP and reverse proxy server
After=syslog.target network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
PIDFile=/usr/local/nginx/logs/nginx.pid
ExecStartPre=/usr/local/sbin/nginx -t -q -g 'daemon on; master_process on;'
ExecStart=/usr/local/sbin/nginx -g 'daemon on; master_process on;'
ExecReload=/usr/local/sbin/nginx -g 'daemon on; master_process on;' -s reload
ExecStop=/bin/kill -s QUIT $MAINPID
PrivateTmp=true

[Install]
WantedBy=multi-user.target

I've got a workaround, which i spawn a 2nd process and wait then kill the old, but what is the deal?

ExecReload=/bin/bash -c "/bin/kill -USR2 $MAINPID && /bin/sleep 5 && /bin/kill -WINCH $MAINPID && /bin/sleep 5 && /bin/kill -QUIT $MAINPID"

I appreciate the help! Thanks.

Zach
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20200522/952e5e47/attachment.htm>


More information about the nginx mailing list