简体   繁体   中英

Gunicorn Upstart File Not Starting

I am trying to launch an app with gunicorn and nginx and have had to double back to delete and change files a few times. This time, I ran into issues.

I first created an upstart file...

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

Then I ran...

sudo service gunicorn start

and it started!

I had to change the name of the socket it created, so I deleted the /etc/init/gunicorn.conf upstart file, created a new upstart file with the same name as the last and attempted to run sudo service gunicorn start .

It now returns the following error messages that correspond the the following commands...

sudo service gunicorn start

start: Job failed to start

&&

sudo service gunicorn stop

stop: Unknown instance: 

This clearly had to do with my meddling, but I don't have the slightest clue how to fix it.

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

sudo shutdown -r now

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM