/srv/irclogs.ubuntu.com/2012/05/23/#upstart.txt

=== Kiall_ is now known as Kiall
djszapislangasek: ping10:49
djszapiwhat is the recommended way with upstart to run more binaries ?10:50
djszapiin the same exec line, separate, or something else ?10:50
asvinhello 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:26
djszapiasvin: which version of upstart are you using ?12:27
djszapitry stop yourjob and then start yourjob12:27
asvindjszapi: i'am using 0.6.5-812:28
asvinlet me try that12:28
djszapi0.6.5 really ?12:28
djszapiplease make sure12:28
djszapithat would be very old12:28
asvinwhen stopping i get this: stop: Unknown instance:12:28
djszapithen it is not running12:29
djszapiwhat if you now try to start that ?12:29
asvinok wait12:29
asvinah weird, it works now ;)12:29
asvini guess the stop did something12:29
djszapinope12:29
djszapisince it was already stopped12:30
djszapimake sure you start your job for the right condition12:30
asvindjszapi 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 file12:33
asvinhere's my conf, can u let me know if i'am doing the right thing?12:33
asvinhttp://pastebin.com/cfzBnr2i12:33
djszapisorry, I do not have enough knowledge about this12:34
asvinoh ok np12:34
asvinbut do you know how i can debug it? is there any log?12:35
djszapiyour upstart version is utterly odd12:35
djszapiso it does not support the logging by default12:35
djszapibut you can for sure make a redirection12:35
djszapibut that is just about your program12:35
asvinah ok12:36
djszapiI am not sure why you have two respawn lines12:36
asvinyeah seeing that now, just removed it and it seems everything is working fine now ;)12:49
djszapicool =]12:50
asvinthanks man13:01
slangasekdjszapi: "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 others14:45
djszapislangasek: problem is that if I use pulseaudio in my daemon running from an upstart job, I would need to run a pulseaudio server with --system14:46
djszapislangasek: if I make a pulseaudio upstart job, that makes the system a bit confusing since14:52
djszapi1) Does that come from pulseaudio ?14:52
djszapi2) What if others would also like to run that14:52
slangasekseems like you want a separate pulseaudio upstart job and have dependencies between them15:01
djszapiyou ignored 1) and 2) :)15:01
qkslvrwolfhello again!16:47
qkslvrwolfI am, for no good reason, attempting to start selenium2 via an upstart job16:48
qkslvrwolfhere's what I have:  http://paste.ubuntu.com/1003268/16:48
qkslvrwolfI'm still a bit fuzzy about how to try and debug this stuff.16:48
qkslvrwolfso if there's any chance someone could point me in the right direction...16:49
djszapiwhy respawn twice ?16:50
qkslvrwolfoh...thought that was necessary...guess I read that wrong16:51
qkslvrwolfI kinda copied that from the ssh.conf file.16:52
qkslvrwolfcorollary...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:53
qkslvrwolfalso..should I be just runnign start on the service, or should I be attempting to emit desktop-session-start?16:54
qkslvrwolfoh, jeez, I'm an idiot16:55
qkslvrwolfok, figured some out...but my variables aren't being expanded like I'd hoped...16:57
qkslvrwolfok17:01
qkslvrwolfI don't understand teh way the variable expasnion is working here.17:06
qkslvrwolfin my original, from teh pastebin, I was getting output from `set` like SELENIUM_EXEC='java -jar $SELENIUM_JAR'17:07
qkslvrwolfso, I noticed that some (not all) of the examples from the cookbook wrap variables in single quotes, so i tried17:08
qkslvrwolfSELENIUM_EXEC="java -jar '$SELENIUM_JAR'"17:10
qkslvrwolfand now I get17:10
qkslvrwolfSELENIUM_EXEC='java -jar '"'"'$SELENIUM_JAR'"'" in my output file...17:10
rothamhey.. 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
rothamany ideas what could be wrong with it?17:29
qkslvrwolfdoes supervisor fork?17:34
qkslvrwolf'cause that sounds like it's forking a process.17:35
rothamhm 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:47
rothamsupervisord lets me set the pid file in supervisord.conf.  does upstart expect a certain pid file?17:48
rothamor expect it to be in a certain location..?17:48
qkslvrwolfIANAE (I came here for help myself), but I think upstart expects to control the pid.  It logs it itself.17:48
qkslvrwolfI haven't used that at all, though, so I'm not sure where it tracks it.17:49
qkslvrwolfif you need it elsewhere, and it's accurate, you could always get it from initctl status supervisor, though17:49
qkslvrwolfin shell, anyway17:49
rothamah k17:53
qkslvrwolfthere is probably a file or something, I just don't know where it is.17:53
qkslvrwolfalso, if you want to let it fork, you can look at the expect commands17:54
qkslvrwolffor upstart17:54
=== Md_ is now known as Md

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!