I have a number of these simple upstart scripts that work fine on other droplets. This is a new droplet and /var/log/upstart/acc.log is filled with /proc/self/fd/9: 4: /proc/self/fd/9: : not found
I can run the script ‘by hand’ and my app comes up just fine. The script is just
start on startup
respawn
script
cd /opt/acc
export PORT=4321
export ROOT_URL='the ip here'
node main.js
end script
I’ve tried adding export PATH and NODE_PATH … same error in the log.
This is a new droplet, but as I said I can run this ‘by hand’ and its fine.
Ideas as to what is wrong or what I can do to find out what is really ‘not found’?
P:)
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Upstart uses /bin/sh while running ‘by hand’ will use bash.
Try this:
start on startup
respawn
script
/bin/bash <<EOT
cd /opt/acc
export PORT=4321
export ROOT_URL='the ip here'
node main.js
EOT
end script
Source: http://upstart.ubuntu.com/cookbook/#changing-the-default-shell
thanks for the response.
The problem here is/was multiple version of node as well as multiple names ‘node’ vs ‘nodejs’. Ubuntu is a mess.
upstart couldn’t find the node app.
After many hours of trashing around with
apt-get --purge remove node
and installs. I finally got the single version of node required for this project (Meteor).
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.