python 的部署 就差 supervisor 了 supervisor 怎么也起不来 centos+supervisor+gunicorn+django

2015-08-01 20:30:58 +08:00
 xargs
大家帮忙看看
unix:///var/tmp/supervisor.sock no such file

完全没有看到日志文件 /var/tmp/是空的

配置如下:
[unix_http_server]
file=/var/tmp/supervisor.sock

[supervisord]
logfile=/tmp/supervisord.log
logfile_maxbytes=50MB
logfile_backups=10
loglevel=info
pidfile=/tmp/supervisord.pid
nodaemon=false
minfds=1024
minprocs=200

[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl=unix:///var/tmp/supervisor.sock ; use a unix:// URL for a unix socket

[include]
files = /etc/supervisor/conf.d/blog.conf

blog.confr如下:
[program:blog]
command=/opt/www/bin/gunicorn --worker-class=gevent --chdir /opt/www/sblog/mysite mysite.wsgi -b 127.0.0.1:8000
user=root
autostart=true
autorestart=true
stdout_logfile=/opt/www/log_self/supervisor_out_gunicorn_blog.log
stderr_logfile=/opt/www/log_self/supervisor_err_gunicorn_blog.log

centos6.5 supervisor3.1

交流一下
40280 次点击
所在节点    Python
25 条回复
pixstone
2015-08-01 21:03:23 +08:00
[supervisord]
section中加入 user = root 试下
oclock
2015-08-01 21:08:13 +08:00
Try circus
simpleapples
2015-08-01 21:09:51 +08:00
直接运行/opt/www/bin/gunicorn --worker-class=gevent --chdir /opt/www/sblog/mysite mysite.wsgi -b 127.0.0.1:8000 可以启动起来么
xargs
2015-08-01 21:11:01 +08:00
@simpleapples 可以的
xargs
2015-08-01 21:11:35 +08:00
你说的应该是网络上有说过的方法
yongzhong
2015-08-01 21:20:13 +08:00
我启动supervisor遇到Error: Cannot open an HTTP server: socket.error reported errno.ENOENT (2)
xargs
2015-08-01 21:31:10 +08:00
@yongzhong 你是怎么启动的
xargs
2015-08-01 21:33:57 +08:00
我这个是启动时没创建sock的文件 后面就找不到
我用 supervisorctl reread会报错如下:
error: <class 'socket.error'>, [Errno 2] No such file or directory: file: /usr/local/lib/python2.7/socket.py line: 228
xargs
2015-08-01 21:35:37 +08:00
用supervisorctl start all报错如题

unix:///tmp/supervisor.sock no such file
yongzhong
2015-08-01 21:38:51 +08:00
@xargs supervisord -c supervisord.conf
xargs
2015-08-01 21:43:25 +08:00
@yongzhong 你应该有日志吧 去看日志吧 我这没有日志
raptor
2015-08-01 21:46:58 +08:00
sudo supervisorctl ....
yongzhong
2015-08-01 21:49:00 +08:00
@xargs supervisord和program日志里都是空的
xargs
2015-08-01 21:55:42 +08:00
@yongzhong 你直接supervisorctl 报啥错
xargs
2015-08-01 22:06:51 +08:00
我真是无语死了 我都想找个洞钻进去 我一直不知道怎么启动的
就是
supervisord
就可以启动了 我还在用supervisorctl 这那的
我搞了一天了 最后随便打命令 搞清楚了
不说了 我去挖洞去
yongzhong
2015-08-01 22:06:55 +08:00
@xargs unix:///tmp/supervisor.sock refused connection
yongzhong
2015-08-01 23:05:35 +08:00
我删除了以前运行生成的supervisor.sock文件,然后重新运行supervisord -c 和supervisorctl就又可以了!
zeayes
2015-08-01 23:10:42 +08:00
supervisord是服务端,是个deamon,supervisorctl是客户。
wong2
2015-08-01 23:32:21 +08:00
ls正解
xargs
2015-08-01 23:40:02 +08:00
@zeayes 你为什么不早点出现

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/210122

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX