[10:49] <djszapi> slangasek: ping
[10:50] <djszapi> what is the recommended way with upstart to run more binaries ?
[10:50] <djszapi> in the same exec line, separate, or something else ?
[12:26] <asvin> hello everybody, I'am pretty new to upstart and trying to write a script. Actually I got stuck whenever i want to start the service. I get the following message: start: Job is already running whereas the job isn't running at all. Any idea how i can debug it?
[12:27] <djszapi> asvin: which version of upstart are you using ?
[12:27] <djszapi> try stop yourjob and then start yourjob
[12:28] <asvin> djszapi: i'am using 0.6.5-8
[12:28] <asvin> let me try that
[12:28] <djszapi> 0.6.5 really ?
[12:28] <djszapi> please make sure
[12:28] <djszapi> that would be very old
[12:28] <asvin> when stopping i get this: stop: Unknown instance:
[12:29] <djszapi> then it is not running
[12:29] <djszapi> what if you now try to start that ?
[12:29] <asvin> ok wait
[12:29] <asvin> ah weird, it works now ;)
[12:29] <asvin> i guess the stop did something
[12:29] <djszapi> nope
[12:30] <djszapi> since it was already stopped
[12:30] <djszapi> make sure you start your job for the right condition
[12:33] <asvin> djszapi also i'am looking for some help. actually i have a daemon written in PHP and i wanted to use upstart to start it. The daemon creates a pid file
[12:33] <asvin> here's my conf, can u let me know if i'am doing the right thing?
[12:33] <asvin> http://pastebin.com/cfzBnr2i
[12:34] <djszapi> sorry, I do not have enough knowledge about this
[12:34] <asvin> oh ok np
[12:35] <asvin> but do you know how i can debug it? is there any log?
[12:35] <djszapi> your upstart version is utterly odd
[12:35] <djszapi> so it does not support the logging by default
[12:35] <djszapi> but you can for sure make a redirection
[12:35] <djszapi> but that is just about your program
[12:36] <asvin> ah ok
[12:36] <djszapi> I am not sure why you have two respawn lines
[12:49] <asvin> yeah seeing that now, just removed it and it seems everything is working fine now ;)
[12:50] <djszapi> cool =]
[13:01] <asvin> thanks man
[14:45] <slangasek> djszapi: "more binaries" - either separate jobs, or a wrapper script called from upstart; since upstart only tracks one process per job, if you have multiple processes in a job you have to make one of these be the parent process of the others
[14:46] <djszapi> slangasek: problem is that if I use pulseaudio in my daemon running from an upstart job, I would need to run a pulseaudio server with --system
[14:52] <djszapi> slangasek: if I make a pulseaudio upstart job, that makes the system a bit confusing since
[14:52] <djszapi> 1) Does that come from pulseaudio ?
[14:52] <djszapi> 2) What if others would also like to run that
[15:01] <slangasek> seems like you want a separate pulseaudio upstart job and have dependencies between them
[15:01] <djszapi> you ignored 1) and 2) :)
[16:47] <qkslvrwolf> hello again!
[16:48] <qkslvrwolf> I am, for no good reason, attempting to start selenium2 via an upstart job
[16:48] <qkslvrwolf> here's what I have:  http://paste.ubuntu.com/1003268/
[16:48] <qkslvrwolf> I'm still a bit fuzzy about how to try and debug this stuff.
[16:49] <qkslvrwolf> so if there's any chance someone could point me in the right direction...
[16:50] <djszapi> why respawn twice ?
[16:51] <qkslvrwolf> oh...thought that was necessary...guess I read that wrong
[16:52] <qkslvrwolf> I kinda copied that from the ssh.conf file.
[16:53] <qkslvrwolf> corollary...if I'm trying to troubleshoot, does initctl read the .conf file every time, or does it read it when I run initctl reload-configuration, or do I need to do somethign else to make a change and then try the change.
[16:54] <qkslvrwolf> also..should I be just runnign start on the service, or should I be attempting to emit desktop-session-start?
[16:55] <qkslvrwolf> oh, jeez, I'm an idiot
[16:57] <qkslvrwolf> ok, figured some out...but my variables aren't being expanded like I'd hoped...
[17:01] <qkslvrwolf> ok
[17:06] <qkslvrwolf> I don't understand teh way the variable expasnion is working here.
[17:07] <qkslvrwolf> in my original, from teh pastebin, I was getting output from `set` like SELENIUM_EXEC='java -jar $SELENIUM_JAR'
[17:08] <qkslvrwolf> so, I noticed that some (not all) of the examples from the cookbook wrap variables in single quotes, so i tried
[17:10] <qkslvrwolf> SELENIUM_EXEC="java -jar '$SELENIUM_JAR'"
[17:10] <qkslvrwolf> and now I get
[17:10] <qkslvrwolf> SELENIUM_EXEC='java -jar '"'"'$SELENIUM_JAR'"'" in my output file...
[17:29] <rotham> hey.. here is my upstart script:  http://pastebin.com/X8PkZct8  ... 'start supervisor' appears to work, but 'stop supervisor' gives me an error about unknown instance.  Also when I examine the processid of the running supervisord process it is _different_ than the id that the 'start supervisor' commad tells me it is running under.
[17:29] <rotham> any ideas what could be wrong with it?
[17:34] <qkslvrwolf> does supervisor fork?
[17:35] <qkslvrwolf> 'cause that sounds like it's forking a process.
[17:47] <rotham> hm it was, but i just added a line to the command to stop it from forking.  Now it runs with the right process id, but 'stop supervisor' still gives the same error.
[17:48] <rotham> supervisord lets me set the pid file in supervisord.conf.  does upstart expect a certain pid file?
[17:48] <rotham> or expect it to be in a certain location..?
[17:48] <qkslvrwolf> IANAE (I came here for help myself), but I think upstart expects to control the pid.  It logs it itself.
[17:49] <qkslvrwolf> I haven't used that at all, though, so I'm not sure where it tracks it.
[17:49] <qkslvrwolf> if you need it elsewhere, and it's accurate, you could always get it from initctl status supervisor, though
[17:49] <qkslvrwolf> in shell, anyway
[17:53] <rotham> ah k
[17:53] <qkslvrwolf> there is probably a file or something, I just don't know where it is.
[17:54] <qkslvrwolf> also, if you want to let it fork, you can look at the expect commands
[17:54] <qkslvrwolf> for upstart