Could not start uwsgi process

Failed to start uwsgi process via ini flag

uwsgi --ini file.ini 

There are no uwsgi pids

 ps aux | grep uwsgi root 31605 0.0 0.3 5732 768 pts/0 S+ 06:46 0:00 grep uwsgi 

file.ini

 [uwsgi] chdir =/var/www/lvpp/site wsgi-file =/var/www/lvpp/lvpp.wsgi master = true processes = 1 chmod-socket=664 socket = /var/www/lvpp/lvpp.sock pidfile= /var/www/lvpp/lvpp.pid daemonize =/var/www/lvpp/logs/lvpp.log vacuum = true uid = www gid = www env = DJANGO_SETTINGS_MODULE=settings 

lvpp.log file

 *** Starting uWSGI 2.0.10 (32bit) on [Wed Apr 8 06:46:15 2015] *** compiled with version: 4.4.7 20120313 (Red Hat 4.4.7-11) on 17 March 2015 21:29:09 os: Linux-2.6.32-431.29.2.el6.i686 #1 SMP Tue Sep 9 20:14:52 UTC 2014 machine: i686 clock source: unix pcre jit disabled detected number of CPU cores: 1 current working directory: /var/www/lvpp writing pidfile to /var/www/lvpp/lvpp.pid detected binary path: /var/www/lvpp/site/env/bin/uwsgi setgid() to 503 setuid() to 501 chdir() to /var/www/lvpp/site/ your processes number limit is 1812 your memory page size is 4096 bytes detected max file descriptor number: 1024 lock engine: pthread robust mutexes thunder lock: disabled (you can enable it with --thunder-lock) error removing unix socket, unlink(): Permission denied [core/socket.c line 198] bind(): Address already in use [core/socket.c line 230] 

He worked early. But when I called kill -9 uwsgi.pid, I could not start the uwsgi process again.

Please tell me why can I start uwsgi again? Thanks

+5
source share
2 answers

Key: error deleting a unix socket, unlink (): Permission denied [core / socket.c line 198]

You (probably) previously ran the uwsgi instance as root, creating a unix socket file with root privileges.

Now your instance (works like www instead) cannot reconnect () this socket, since it cannot unlink (without rights)

Just delete the socket file and try again.

+14
source

I had a very similar problem, but it did not work even after deleting the socket file. It turns out that this is because uWSGI could not create a new one (it existed only because I myself launched uwsgi). An impeccably simple solution was a chmod directory containing a socket file, allowing the www user to create and modify files there. Obviously now, but perhaps it will help the future poor juice hit his head against the wall, as I have too many hours today.

+7
source

All Articles