On Ubuntu 14.04, I've set up this simple upstart script for puma:
/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). 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. 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.
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).
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). 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
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.