[英]run custom init: Failed to spawn homepage main process: unable to execute: No such file or directory
I'm getting an error on my ubuntu 14.04 box, when I run my custom init script in /etc/init/homepage.conf
当我在/etc/init/homepage.conf
运行我的自定义init脚本时,我的ubuntu 14.04框出现错误
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
: 在/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: homepage.conf
包含:
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: home.ini包含:
module = wsgi_prod
master=true
processes=5
socket = homepage.sock
chmod-socket = 660
vacuum = true
die-on-term = true die-on-term = true
The permissions for under: /home/myuser/venv are: under:/ home / myuser / venv的权限是:
[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
. 我挣扎了一段时间同样的问题,终于找到了问题:它找不到的文件是uwsgi
。 In your upstart conf file (homepage.conf for you), edit the following line: 在您的upstart conf文件(homepage.conf)中,编辑以下行:
exec uwsgi --ini home.ini
to be: 成为:
exec /usr/local/bin/uwsgi --ini home.ini
or whatever the path to your local uwsgi is. 或者你当地uwsgi的路径是什么。 You can figure out the path by running which uwsgi
. 你可以通过运行which uwsgi
找出路径。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.