V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
xargs
V2EX  ›  Python

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

  •  
  •   xargs · 2015-08-01 20:30:58 +08:00 · 40279 次点击
    这是一个创建于 3190 天前的主题,其中的信息可能已经有所发展或是发生改变。
    大家帮忙看看
    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

    交流一下
    25 条回复    2019-11-14 17:17:28 +08:00
    pixstone
        1
    pixstone  
       2015-08-01 21:03:23 +08:00
    [supervisord]
    section中加入 user = root 试下
    oclock
        2
    oclock  
       2015-08-01 21:08:13 +08:00
    Try circus
    simpleapples
        3
    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
        4
    xargs  
    OP
       2015-08-01 21:11:01 +08:00
    @simpleapples 可以的
    xargs
        5
    xargs  
    OP
       2015-08-01 21:11:35 +08:00
    你说的应该是网络上有说过的方法
    yongzhong
        6
    yongzhong  
       2015-08-01 21:20:13 +08:00
    我启动supervisor遇到Error: Cannot open an HTTP server: socket.error reported errno.ENOENT (2)
    xargs
        7
    xargs  
    OP
       2015-08-01 21:31:10 +08:00
    @yongzhong 你是怎么启动的
    xargs
        8
    xargs  
    OP
       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
        9
    xargs  
    OP
       2015-08-01 21:35:37 +08:00
    用supervisorctl start all报错如题

    unix:///tmp/supervisor.sock no such file
    yongzhong
        10
    yongzhong  
       2015-08-01 21:38:51 +08:00
    @xargs supervisord -c supervisord.conf
    xargs
        11
    xargs  
    OP
       2015-08-01 21:43:25 +08:00
    @yongzhong 你应该有日志吧 去看日志吧 我这没有日志
    raptor
        12
    raptor  
       2015-08-01 21:46:58 +08:00 via Android
    sudo supervisorctl ....
    yongzhong
        13
    yongzhong  
       2015-08-01 21:49:00 +08:00
    @xargs supervisord和program日志里都是空的
    xargs
        14
    xargs  
    OP
       2015-08-01 21:55:42 +08:00
    @yongzhong 你直接supervisorctl 报啥错
    xargs
        15
    xargs  
    OP
       2015-08-01 22:06:51 +08:00   ❤️ 1
    我真是无语死了 我都想找个洞钻进去 我一直不知道怎么启动的
    就是
    supervisord
    就可以启动了 我还在用supervisorctl 这那的
    我搞了一天了 最后随便打命令 搞清楚了
    不说了 我去挖洞去
    yongzhong
        16
    yongzhong  
       2015-08-01 22:06:55 +08:00
    @xargs unix:///tmp/supervisor.sock refused connection
    yongzhong
        17
    yongzhong  
       2015-08-01 23:05:35 +08:00
    我删除了以前运行生成的supervisor.sock文件,然后重新运行supervisord -c 和supervisorctl就又可以了!
    zeayes
        18
    zeayes  
       2015-08-01 23:10:42 +08:00   ❤️ 1
    supervisord是服务端,是个deamon,supervisorctl是客户。
    wong2
        19
    wong2  
       2015-08-01 23:32:21 +08:00
    ls正解
    xargs
        20
    xargs  
    OP
       2015-08-01 23:40:02 +08:00
    @zeayes 你为什么不早点出现
    sweetpotato
        21
    sweetpotato  
       2015-08-02 00:13:29 +08:00 via Android
    上面正解,服务没起来
    zeayes
        22
    zeayes  
       2015-08-02 07:57:55 +08:00
    @xargs 最近刷v站的频率小很多了。。。
    xargs
        23
    xargs  
    OP
       2015-08-02 15:12:49 +08:00
    @zeayes 忙啥
    zeayes
        24
    zeayes  
       2015-08-03 09:45:17 +08:00
    @xargs 新项目
    tmackan
        25
    tmackan  
       2019-11-14 17:17:28 +08:00
    哎 sudo 以后就好了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2754 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 15:47 · PVG 23:47 · LAX 08:47 · JFK 11:47
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.