Could not start uwsgi process

拟墨画扇 提交于 2019-12-03 13:19:45

The key is: error removing unix socket, unlink(): Permission denied [core/socket.c line 198]

You (very probably) previously run a uwsgi instance as root creating the unix socket file with root permissions.

Now your instance (running instead as www) is not able to re-bind() that socket as it is not able to unlink it (no permissions)

Just remove the socket file and retry.

DaveTheScientist

I was running into a very similar issue, except it still wouldn't work even after deleting the socket file. Turns out it was because uWSGI couldn't create a new one (it only existed because I ran uwsgi myself). The infuriatingly simple solution was to chmod the directory containing the socket file, allowing the www user to create and modify files there. Obvious now, but maybe this will help a future poor sap bashing their head against a wall, as I have been for too many hours today.

root@srv16:/var/run/uwsgi> ls -la
total 0
drwxr-xr-x  2 root    root      60 Jul 16 07:11 .          #<-- problem
drwxr-xr-x 25 root    root     880 Jul 19 09:14 ..
srw-rw----  1 www-app www-data   0 Jul 16 07:11 app.socket 
               #^-- no idea how www-app managed to create that file

root@simsrv16:/var/run/uwsgi> chmod 777 .                  #<-- fix
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!