/srv/irclogs.ubuntu.com/2012/04/06/#upstart.txt

jYi have an app that double forks.. i put the expect daemon and it works.. but it's not picking up the correct process.. when i stop it it kills 1 but not the real process15:41
tlvbHi, I'm trying to set up a reverse ssh tunnel (triggering on static-network-up) but it does not start automatically, manual start is ok though, any suggestions on what to do next?16:12
SpamapSjY: are you sure it double forks for the main process?17:03
SpamapStlvb: I'd use 'runlevel [2345]' instead of 'static-network-up'17:04
SpamapStlvb: just simpler17:04
jYSpamapS: ya my fork/clone count is 217:06
jYvia a strace17:06
tlvbSpamapS: I tried that too, but no cigar17:09
SpamapSjY: are you certain that the second fork is the main process though? sounds like it is not.17:11
SpamapStlvb: then its probably starting but failing. Anything in /var/log/syslog ?17:11
SpamapStlvb: since, you wouldn't be able to login if runlevel 2 was not reached. ;)17:11
tlvbSpamapS: nothing in syslog that I know of, but it may be failing grepping skills17:12
tlvbSpamapS: this is the script by the way: http://pastebin.com/8z2xF88W17:12
jYSpamapS: resque-web is doing something funny17:12
jYhere is my ps tree17:12
SpamapStlvb: the job name would appear with a failure status17:12
jYhttp://pastie.org/374004017:13
jYif i stop it  it kills the /bin/sh -e /proc/self/fd/1117:14
tlvbSpamapS: nope, nothing in syslog except from an earlier manual start/stop with extra logging turned on17:14
SpamapStlvb: pastebin your job file maybe?17:14
tlvbSpamapS: job file? you mean the /etc/init/... I did that a few lines up, though I see now I mislabeled it as the script17:15
jYeven if i try expect fork.. same result17:16
SpamapStlvb: I would not expect that to 'expect fork'17:18
SpamapSjY: if you are using 'script', the fork to run the script counts as one fork17:19
tlvbI read a note on how to find out if expect fork or expect daemon (or nothing) is proper, hang on17:19
jYSpamapS: here's my conf  http://pastie.org/374007517:19
tlvbhttp://upstart.ubuntu.com/cookbook/#id153 <-yep that's the one, and that told me to put expect fork17:20
SpamapSjY: start on startup is *WAY* too early17:21
SpamapSjY: no network interfaces, no filesystems mounted..17:21
jYok17:21
SpamapSjY: OH and expect daemon is not part of the script, it has to be its own stanza17:21
jYshould i take out the sudo.. out of script then?17:21
SpamapSjY: the sudo is also wrong, you should use start-stop-daemon...17:22
jYohh didn't know i could use that17:22
SpamapSjY: http://upstart.ubuntu.com/cookbook/#run-a-job-as-a-different-user17:22
jYthanks17:23
SpamapSjY: but the expect part, it has to be *before* the 'script' or after 'end script'17:23
SpamapSjY: and you don't need script anyway, just use 'exec'17:23
jYgotcha17:23
jYSpamapS: does start-stop accept env vars set in the upstart script.. or do I have to pass them in at run time like I did with the sudo?17:33
SpamapSjY: not sure.. experiment?17:34
jYi get this if i debug17:35
jYstart-stop-daemon: stat cd /data/resque-web/; export PATH=/home/resque-web/.rbenv/bin:/home/resque-web/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin; export RACK_ENV=qa; exec bundle exec rackup -p5678 >> resque-web.log 2>&1: No such file or directory (No such file or directory)17:35
=== Md is now known as Md2
=== Md2 is now known as ^|^

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