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