raddevon
raddevon

Reputation: 3360

Why won't my Telescope app start with Upstart?

I've followed instructions online to set up a Telescope instance on my DigitalOcean droplet, but it won't start with Upstart.

I'm able to run the server successfully manually, but the Upstart task doesn't fire when the server boots. I'm sure I should be looking at a log file somewhere to discover the problem, but I'm not sure where.

I've looked for the location of upstart logs, but I'm not having any luck. Either you have to add something to your script to make it log, or it just does it according to accounts online, but neither of those seem to be the case for me.

When I try to search for help on Upstart, I'm also seeing people saying I should be using systemd instead, but I can't figure out how to install it on CentOS 6.5.

Can anyone help me figure a way out of this labyrinth?

Upvotes: 1

Views: 282

Answers (1)

saimeunt
saimeunt

Reputation: 22696

I use Ubuntu server 14.04, and my upstart logs are located in /var/log/upstart

The log usually contains stdout from the job, and it should help you understand what's wrong.

My guess is that when the server boots and tries to run your job, MongoDB is not yet ready so it fails silently.

Try installing the specific MongoDB version that Meteor is using at the moment (2.4.9) using these docs : http://docs.mongodb.org/v2.4/tutorial/install-mongodb-on-ubuntu/

The most important thing is to get upstart support for MongoDB, this will allow us to catch mongod launch as an event.

You can then use this syntax in your upstart script :

start on started mongodb

This will make your node app start when mongo is ready.

I've created a gist with the scripts I wrote to setup a server ready for Meteor app deployment, it's a bit messy and probably specific to Ubuntu but it might help you.

https://gist.github.com/saimeunt/4ace7975b12df06ee0b7

I'm also using demeteorizer and forever which are two great tools you should probably check.

Upvotes: 1

Related Questions