Question

Why is my upstart file not starting my MeteorJS app?

I am on Ubuntu 14.04 and I have an upstart file angular-meteor.conf with the following:

# upstart service file at /etc/init/angular-meteor.conf
description "Meteor.js (NodeJS) application"

# When to start the service
start on runlevel [2345]

# When to stop the service
stop on shutdown

# Automatically restart process if crashed
respawn

# Let upstart know the process will detach itself to the background
expect fork

# start meteor
exec meteor

This is not working, I have tried a few variations eg. http://stackoverflow.com/questions/15657071/how-to-run-meteor-on-startup-on-ubuntu-server

Anyone know why it wouldn’t be working? I know that it is starting at least.

Subscribe
Share

When I try this example I get this in the /var/log/upstart/myapp.log file:

There is no /root/myapp/.meteor/meteor file, only the one in /usr/local/bin/meteor

The app is telescope http://telescopeapp.org


‘/root/myapp/.meteor’ exists, but ‘/root/myapp/.meteor/meteor’ is not executable.

Remove it and try again.
‘/root/myapp/.meteor’ exists, but ‘/root/myapp/.meteor/meteor’ is not executable.

Remove it and try again.
‘/root/myapp/.meteor’ exists, but ‘/root/myapp/.meteor/meteor’ is not executable.

Remove it and try again.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Add the following lines to your upstart script:

setuid user to run as
setgid group to run as, usually the same as the user
chdir /path/to/meteor_app

Then try starting it. Does that work? If not, take a look at the log file and see if there are any errors:

sudo tail /var/log/upstart/angular-meteor.log

This comment has been deleted