I'm getting an error on my ubuntu 14.04 box, when I run my custom init script in /etc/init/homepage.conf
I'm trying to run it via:
sudo start homepage
I keep getting:
start: Job failed to start
in the logs under /var/log/syslog
:
init: Failed to spawn homepage main process: unable to execute: No such file or directory
I tried researching it, but cannot seem to pinpoint why this is happening.
homepage.conf
contains:
start on runlevel [2345]
stop on runlevel [!2345]
#setuid user
setuid homepage
setgid www-data
env PATH=/home/myuser/venv/bin
chdir /home/jd/venv
exec uwsgi --ini home.ini
home.ini contains:
module = wsgi_prod
master=true
processes=5
socket = homepage.sock
chmod-socket = 660
vacuum = true
die-on-term = true
The permissions for under: /home/myuser/venv are:
[user] [group]
homepage:homepage
Does anyone see what I'm doing wrong? Thank you.
I struggled with the same problem for awhile, and finally found the issue: The file it can't find is uwsgi
. In your upstart conf file (homepage.conf for you), edit the following line:
exec uwsgi --ini home.ini
to be:
exec /usr/local/bin/uwsgi --ini home.ini
or whatever the path to your local uwsgi is. You can figure out the path by running which uwsgi
.
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.