加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 运营中心 > Nginx > 正文

python – 无法启动uwsgi进程

发布时间:2020-12-13 21:04:43 所属栏目:Nginx 来源:网络整理
导读:无法通过ini标志启动uwsgi进程 uwsgi --ini file.ini 没有任何uwsgi pids ps aux | grep uwsgiroot 31605 0.0 0.3 5732 768 pts/0 S+ 06:46 0:00 grep uwsgi file.ini [uwsgi]chdir =/var/www/lvpp/sitewsgi-file =/var/www/lvpp/lvpp.wsgimaster = trueproc

无法通过ini标志启动uwsgi进程

uwsgi --ini file.ini

没有任何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

*** 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]

它起得很早.
但是当我调用kill -9 uwsgi.pid时,我无法再次启动uwsgi进程.

请告诉我,为什么我可以再次启动uwsgi进程?
谢谢

最佳答案
关键是:删除unix socket时出错,unlink():权限被拒绝[core / socket.c第198行]

您(很可能)以前以root身份运行uwsgi实例,创建具有root权限的unix套接字文件.

现在你的实例(作为www运行)无法重新绑定()该套接字,因为它无法取消链接(没有权限)

只需删除套接字文件并重试即可.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读