部署 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
求助,怎么解
1
guoweikuang May 12, 2017 via Android
supervisor 不支持 Python3 吧
|
2
shuirong1997 May 12, 2017 via Android
Shut this program down first before starting supervisord
|
3
cxbats May 12, 2017 via Android
看看哪个程序占用了端口
|
4
tuteng May 12, 2017
端口被占用了
|
5
qweweretrt515 May 12, 2017
建议你用 docker 来部署
|
6
mxi1 May 12, 2017 via iPhone
是不是 apache/nginx 跑着,然后你又把 80 端口设置成 flask app 的端口了?
|
7
wwqgtxx May 12, 2017
其实如果是 Ubuntu16.04 的话,直接用 systemd 就行了,没必要套 supervisor
|
8
Kilerd May 12, 2017
Another program is already listening on a port that one of our HTTP servers is configured to use
|
9
xiaozizayang May 12, 2017
首先 ps -aux |grep 把占用的端口找出来,然后 supervisor 不要直接运行代码,比如用 Gunicorn 来管理,然后用 supervisor 管理 Gunicorn。
|
10
jjww May 12, 2017
try:
unlink /var/run/supervisor.sock |
11
Wichna May 12, 2017
我也记得 supervisor 不支持 python3
|
12
pynix May 12, 2017
我就奇了怪了,这么明显的错误信息。。。。。
|
13
julyclyde May 12, 2017
这么明显的错误信息,上面还有一堆跑题的
|
14
fox0001 May 13, 2017 via Android
这么明显的端口被占用…都散了,没什么好说的
|