After latest updates (I guess two latest security patches) uwsgi daemon can not be reloaded anymore with www user: sudo -u www uwsgi --reload /var/run/uwsgi.pid signal_pidfile()/kill(): Operation not permitted [core/uwsgi.c line 1656] rc.conf settings: uwsgi_enable="YES" uwsgi_flags="--master --emperor /usr/local/etc/uwsgi/vassals --die-on-term" uwsgi_logfile="/var/log/uwsgi/uwsgi.log" "sudo service uwsgi stop" also doesn't work, it hangs forever: sudo service uwsgi stop Stopping uwsgi. Waiting for PIDS: 43969 Logs: waiting for Emperor death... waiting for Emperor death... waiting for Emperor death... The only thing which work: sudo pkill -9 uwsgi sudo service uwsgi start
Let me see if I can reproduce this... thanks for the report.
Any update on that? Thanks!
(In reply to robert.ayrapetyan from comment #0) I can start/stop/restart just fine, but it appears it doesn't reload nicely. As found in the logs: error removing unix socket, unlink(): Operation not permitted [core/socket.c line 198] bind(): Address already in use [core/socket.c line 230] This appears to be a bug in uwsgi related to the socket owner being different than the daemon user. At start it handles this all as root then drops privs, but cannot handle "reload" as it no longer has the privs. Although I'm not sure why uwsgi needs to wipe out its unix and network sockets to reload...
There is an open github issue for this: https://github.com/unbit/uwsgi/issues/1471
This has not been forgotten. I've left a new comment on the github bug.
*** Bug 217178 has been marked as a duplicate of this bug. ***
BTW, the workaround is to create, say, `/var/run/uwsgi` and chown it to the running user, and then set `uwsgi_pidfile` into that directory. This is especially so if you want to run jails without any root processes.
Can still confirm uwsgi hanging forever using "sudo service uwsgi stop" with uwsgi-py36-2.0.15_3 on FreeBSD 11.1 in a jail, with only `uwsgi_enable="YES"` in rc.conf.
(In reply to Vladimir Krstulja from comment #7) Thanks for this, but unfortunately it didn't make a difference in my case. I still receive the hanging "waiting for Emperor death..."