简体   繁体   English

Ubuntu 14.04 puma upstart失败,并显示“初始化:无法生成puma主进程:无法执行:没有此类文件或目录”

[英]Ubuntu 14.04 puma upstart failing with “init: Failed to spawn puma main process: unable to execute: No such file or directory”

On Ubuntu 14.04, I've set up this simple upstart script for puma: 在Ubuntu 14.04上,我为puma设置了以下简单的暴发户脚本:

/etc/init/puma.conf /etc/init/puma.conf

start on (local-filesystems and net-device-up IFACE=lo and runlevel [2345])
stop on (runlevel [!2345])
setuid deploy
setgid deploy
respawn
respawn limit 3 30
chdir /home/deploy/apps/vp_suite_staging/current
exec bundle exec puma -C /home/deploy/apps/vp_suite_staging/shared/config/puma.rb

I've triple checked the paths and all of them are correct. 我对路径进行了三重检查,所有路径均正确。 This script worked until I rebooted my server (DigitalOcean droplet). 该脚本一直有效,直到我重新启动服务器(DigitalOcean Droplet)。 Now when I type 现在当我输入

start puma

I get "Job failed to start" and the following line in my syslog: 我在系统日志中看到“作业无法启动”和以下行:

init: Failed to spawn puma main process: unable to execute: No such file or directory

There is no log file (puma.log) created for the process in /var/log/upstart. 在/ var / log / upstart中没有为该进程创建日志文件(puma.log)。 I've spent the past 2 days googling everything I could think of but have yet to come up with a solution. 在过去的两天中,我一直在搜寻我能想到的所有内容,但尚未提出解决方案。 I have no idea what file or directory this error line is talking about, but apparently it's not one in the puma.conf because it doesn't seem to be getting to the point of actually executing that. 我不知道此错误行在谈论什么文件或目录,但显然在puma.conf中不是一个文件或目录,因为它似乎并没有真正执行该命令。

One thing that is a bit different is that the puma.conf is a symlink to a file in my project's shared directory (I'm using Capistrano for deploy). 有点不同的是,puma.conf是项目共享目录中文件的符号链接(我使用Capistrano进行部署)。

Does anyone know what might be happening here or how I should go about troubleshooting this? 有谁知道这里可能会发生什么,或者我应该如何解决此问题?

I haven't used puma, but I had a similar thing happen and the reason was a missing file. 我没有使用过彪马,但发生了类似的事情,原因是文件丢失。 In your case, it looks like it might be trying to find puma in the wrong location, so it never even executes (= no log). 在您的情况下,看起来它可能正在尝试在错误的位置找到puma ,因此它甚至从不执行(=无日志)。 I would try to replace: 我会尝试替换:

exec bundle exec puma -C /home/deploy/apps/vp_suite_staging/shared/config/puma.rb

With this: 有了这个:

exec bundle exec `which puma` -C /home/deploy/apps/vp_suite_staging/shared/config/puma.rb

                 ^ this will yield the absolute path to puma binary

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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