zxxyolanda
V2EX  ›  Flask

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

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

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