cant get upstart script for node.js program to start on startup
The startup
event is the very first event that gets emitted in the Upstart bootup process. There are all kinds of things that won't have happened yet - the root filesystem will still be mounted read-only, networking hasn't been initialized, etc.
I suspect that the job is exiting quickly because all of its dependencies (explicit or implicit) aren't initialized yet. I'd change the start condition to something like
start on filesystem and started networking
At least then you'll be able to write to your logfile.
As a side note, it looks like you reversed your output redirection arguments - you actually meant >> /var/log/node.log 2>&1
. Using 2>&1
means "take whatever is currently fd 1, and make fd 2 the same thing", but you haven't changed what stdout is yet.