How to diagnose Upstart errors?

Try:

/var/log/upstart/JOBNAME.log

You may want to consider converting it to a task while you debug it.

start on spatial-start

task

exec /spatial/server_init.sh

then from the console:

initctl emit spatial-start
initctl status spatial-start

Okay, found one way, but it only works if the error happens in the program that is being executed by the script (and if that program of course returns error messages), not Upstart itself, but that is what i needed in this case. What i did was redirect the program output to a log file like this:

exec /spatial/server_init.sh >> /spatial/ogc.log 2>&1

As for the other i found out you can increase Upstart verbosity so if i ll need that, i ll start from there.