【问题标题】:Gunicorn Upstart File Not StartingGunicorn Upstart 文件未启动
【发布时间】:2016-03-20 18:18:46
【问题描述】:

我正在尝试使用gunicornnginx 启动一个应用程序,并且不得不多次删除和更改文件。这一次,我遇到了问题。

我首先创建了一个新贵文件...

sudo nano /etc/init/gunicorn.conf

description "Gunicorn application server handling flowershop"

start on runlevel [2345]
stop on runlevel [!2345]

respawn
setuid ubuntu
setgid www-data
chdir /home/ubuntu/flowershop

exec env/bin/gunicorn --workers 3 --bind unix:/home/ubuntu/flowershop/flowershop.sock flowershop.wsgi:application

然后我跑了……

sudo service gunicorn start

它开始了!

我不得不更改它创建的套接字的名称,因此我删除了 /etc/init/gunicorn.conf upstart 文件,创建了一个与上一个名称相同的新 upstart 文件并尝试运行 sudo service gunicorn start

它现在返回与以下命令相对应的以下错误消息...

sudo service gunicorn start

start: Job failed to start

&&

sudo service gunicorn stop

stop: Unknown instance: 

这显然与我的干预有关,但我不知道如何解决它。

【问题讨论】:

  • 我有确切的错误。在哪里可以找到解决方案?
  • @JeyachandranRathnam 我刚刚重新启动了我的 Amazon EC2 实例并重新开始。那时它起作用了。有时事情会卡住。
  • 我必须重新创建液滴(我使用的是 digitalocean),它在全新安装时运行良好。哦,好吧,至少它现在修复了!谢谢!
  • @JeyachandranRathnam 哈哈。是的,有时你只需要拔掉插头!
  • 该问题有一些漏洞,因为您不再寻求答案,也许最好删除该问题

标签: django ubuntu nginx gunicorn


【解决方案1】:

简单的方法是尝试重新加载你的 droplet

sudo shutdown -r now

【讨论】:

  • 无法重启机器怎么办?!
猜你喜欢
  • 1970-01-01
  • 2012-06-24
  • 2012-10-04
  • 2014-10-10
  • 2017-10-07
  • 1970-01-01
  • 1970-01-01
  • 2021-08-26
  • 1970-01-01
相关资源
最近更新 更多