I am trying to configure uWSGI with Upstart.
I created the file /etc/init/uwsgi-flask.conf
:
description "uwsgi for flask"
start on runlevel [2345]
stop on runlevel [06]
exec /appdir/virtualenvdir/bin/uwsgi /appdir/virtualenvdir/uwsgi.ini --die-on-term
On reboot, it starts up correctly, but I am not able to stop the service.
If I type on shell initctl stop uwsgi-flask
, it gives:
initctl: Unknown instance:
anyone has any idea?
sudo stop service-name
. If you are not executinginitctl
as root then it is logical that instance is unknown since on startup (reboot) process will not be available in user space since it would be started by root as system job. However I assume that you are stopping the job as root. Could you post relevant content of /var/log/upstart/uwsgi-flack.log? It sounds that your job is either not starting at all or exiting after start. You can find some useful information here. – Lugwormsudo stop uwsgi-flask
instead, but it gives something similarstop: Unknown instance:
. The log says that the uwsgi server is running, but I can't stop it with the commands I typed. – Depoliti