=== nikias_ is now known as nikias [13:49] Hi, I am facing some problem in starting a job automatically by upstart. However if I run "start myjob", it gets started without any errors. Any pointers to debug is appreciated [13:53] cks_: maybe your "start on" condition is not correct. [13:53] cks_: you can use upstart-monitor to see which events are emitted. [13:53] cks_: can you paste your job to e.g. paste.ubuntu.com ? [13:55] xnox: I pasted my script here: http://paste.ubuntu.com/6808440/ [13:56] xnox: I am using upstart 0.3.11 [13:57] as shown in the script. pulseaudio depends on audiod. audiod is up and running. I verified with initctl status audiod [13:58] cks_: your job appears to be correct, but I have no knoweledge / experience of upstart 0.3.11 however. [13:59] maybe jodh can help you with this ^ [14:00] xnox: ok [14:01] cks_: presumably you are running some sort of custom distro? I'd definitely recommend upgrading the upstart package if so as we've added lots of features to make debugging easier. [14:02] cks_: golden rule job writing new jobs is to *not* specify respawn until you are sure it is doing what you want: http://upstart.ubuntu.com/cookbook/#respawn [14:03] cks_: also, http://upstart.ubuntu.com/cookbook/#checking-how-a-service-might-react-when-run-as-a-job, http://upstart.ubuntu.com/cookbook/#determining-why-your-service-fails-to-start. [14:04] cks_: at a guess I wonder if when audiod starts, pulseaudio cannot start as /run is not mounted? Take a look at /etc/init/pulseaudio.conf on a modern ubuntu system to see how it works with current versions of pulse and upstart. [14:04] jodh: but when I run manually "start pulseaudio" it starts without problem. thanks for the links. [14:05] cks_: then, there must be an error in the 'start on' - are you sure your other job is called /etc/init/audiod.conf and that that daemon is actually running with the expected pid? [14:08] Actually audiod upstart script is present in /etc/event.d/ [14:08] even pulseaudio script lies at the same place [14:10] cks_: wow, use of that directory is before my time :) [14:13] jodh: i wonder if that upstart already was using "start on started $job" syntax =) [14:14] cks_: what's the start on condition of the audiod? maybe copy that into pulseaudio or some such? [14:14] yes, maybe back then it was "starte I sayeth forsooth ..." [14:18] cks_: try booting with --debug and capturing syslog/dmesg which will show the event flows. [14:19] jodh: =))))))) [14:30] jodh: thanks for the input [18:54] you know.. one unfortunate thing about console log is that programs think they're talking to a tty and thus print with cr's instead of just newlines