我正在使用github克隆文件夹,并创建了我的第一个分支。在切换分支/关闭终端后,我回到我的项目目录根并运行通常的:
$ source venv/bin/activate
(venv)$ foreman start
14:13:42 web.1 | started with pid 5591
14:13:42 web.1 | 2014-04-29 14:13:42 [5591] [INFO] Starting gunicorn 18.0
14:13:42 web.1 | 2014-04-29 14:13:42 [5591] [ERROR] Connection in use: ('0.0.0.0', 5000)
14:13:42 web.1 | 2014-04-29 14:13:42 [5591] [ERROR] Retrying in 1 second.
14:13:43 web.1 | 2014-04-29 14:13:43 [5591] [ERROR] Connection in use: ('0.0.0.0', 5000)
14:13:43 web.1 | 2014-04-29 14:13:43 [5591] [ERROR] Retrying in 1 second.
14:13:44 web.1 | 2014-04-29 14:13:44 [5591] [ERROR] Connection in use: ('0.0.0.0', 5000)
14:13:44 web.1 | 2014-04-29 14:13:44 [5591] [ERROR] Retrying in 1 second.
14:13:45 web.1 | 2014-04-29 14:13:45 [5591] [ERROR] Connection in use: ('0.0.0.0', 5000)
14:13:45 web.1 | 2014-04-29 14:13:45 [5591] [ERROR] Retrying in 1 second.
14:13:46 web.1 | 2014-04-29 14:13:46 [5591] [ERROR] Connection in use: ('0.0.0.0', 5000)
14:13:46 web.1 | 2014-04-29 14:13:46 [5591] [ERROR] Retrying in 1 second.
14:13:47 web.1 | 2014-04-29 14:13:47 [5591] [ERROR] Can't connect to ('0.0.0.0', 5000)
14:13:47 web.1 | exited with code 1
14:13:47 system | sending SIGTERM to all processes
SIGTERM received
我收到了这个错误,我无法弄清楚问题是什么。它与分支有关吗?
答案 0 :(得分:2)
你还有一个枪炮的实例。 foreman运行一个守护进程的守护进程,所以如果你关闭终端,它仍然会在后台运行。因此,在关闭终端之前,您应始终使用Ctrl + C领班。然而,有一种方法可以杀死服务器。
首先你可以找到独角兽的id来通过$ ps ax|grep unicorn
杀死它,然后使用gunicorn实例的id $ kill <id>
或者,您可以使用$ pkill gunicorn