V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
zxxyolanda
V2EX  ›  Flask

Flask 部署, Supervisor 报错怎么解决?求助

  •  
  •   zxxyolanda · May 12, 2017 · 6379 views
    This topic created in 3278 days ago, the information mentioned may be changed or developed.

    部署 Flask 环境 Ubuntu python3

    添加 Supervisor 总报错,如下:

    ➜  lan supervisord
    /usr/lib/python2.7/dist-packages/supervisor/options.py:297: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
      'Supervisord is running as root and it is searching '
    Error: Another program is already listening on a port that one of our HTTP servers is configured to use.  Shut this program down first before starting supervisord.
    For help, use /usr/bin/supervisord -h
    
    

    求助,怎么解

    14 replies    2017-05-13 14:26:48 +08:00
    guoweikuang
        1
    guoweikuang  
       May 12, 2017 via Android
    supervisor 不支持 Python3 吧
    shuirong1997
        2
    shuirong1997  
       May 12, 2017 via Android
    Shut this program down first before starting supervisord
    cxbats
        3
    cxbats  
       May 12, 2017 via Android
    看看哪个程序占用了端口
    tuteng
        4
    tuteng  
       May 12, 2017
    端口被占用了
    qweweretrt515
        5
    qweweretrt515  
       May 12, 2017
    建议你用 docker 来部署
    mxi1
        6
    mxi1  
       May 12, 2017 via iPhone
    是不是 apache/nginx 跑着,然后你又把 80 端口设置成 flask app 的端口了?
    wwqgtxx
        7
    wwqgtxx  
       May 12, 2017
    其实如果是 Ubuntu16.04 的话,直接用 systemd 就行了,没必要套 supervisor
    Kilerd
        8
    Kilerd  
       May 12, 2017
    Another program is already listening on a port that one of our HTTP servers is configured to use
    xiaozizayang
        9
    xiaozizayang  
       May 12, 2017
    首先 ps -aux |grep 把占用的端口找出来,然后 supervisor 不要直接运行代码,比如用 Gunicorn 来管理,然后用 supervisor 管理 Gunicorn。
    jjww
        10
    jjww  
       May 12, 2017
    try:

    unlink /var/run/supervisor.sock
    Wichna
        11
    Wichna  
       May 12, 2017
    我也记得 supervisor 不支持 python3
    pynix
        12
    pynix  
       May 12, 2017
    我就奇了怪了,这么明显的错误信息。。。。。
    julyclyde
        13
    julyclyde  
       May 12, 2017
    这么明显的错误信息,上面还有一堆跑题的
    fox0001
        14
    fox0001  
       May 13, 2017 via Android
    这么明显的端口被占用…都散了,没什么好说的
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2396 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 82ms · UTC 04:32 · PVG 12:32 · LAX 21:32 · JFK 00:32
    ♥ Do have faith in what you're doing.