[16:13] <ebel> OK, this is weird. I have an upstart job that starts a SSH tunnel to a host. But I can't stop it!
[16:14] <ebel> it was running, and when I "stop JOBNAME" it, the ssh process is still running.
[16:14] <xnox> ebel: probably tracking wrong pid.
[16:14] <xnox> ebel: compare ps output with `status yourjobname`. Do the pids match?
[16:15] <ebel> http://pastebin.com/9XghsZFu FYI this is the /etc/init/JOBNAME.conf
[16:16] <ebel> xnox: ah, yeah, different pids...
[16:16] <ebel> I should use "expect" here
[16:16] <ebel> I read that part of manual, but I thought ssh would stay in foreground....
[16:17] <ebel> after I 'stop JOBNAME' it, the process is still running. But if I kill the PID, then a new one starts up again
[16:34] <SpamapS> ebel: you should not need expect
[16:34] <SpamapS> ebel: you don't need to use sudo
[16:35] <SpamapS> ebel: setuid svn_ssh is all you need there
[16:36] <SpamapS> ebel: a whole raft of things wrong with that upstart job.
[16:36] <SpamapS> ebel: 1: start on startup means you will start before networking, before filesystems are mounted, before EVERYTHING
[16:36] <SpamapS> ebel: you want 'start on runlevel [2345]'
[16:36] <ebel> this is my first attempt at an upstart job...
[16:36] <SpamapS> ebel: oh and two start ons means 'start on startup' isn't actually going to be used, so 'started network-services' will be used
[16:37] <SpamapS> ebel: I have almost the exact same thing... I use keep-one-running to keep mine up though, because upstart is too eager to give up with respawn
[16:39] <ebel> gah, i've stopped the upstart job, and the ssh process is still there. i keep trying to kill it but something is respawning it....
[16:40] <SpamapS> http://paste.ubuntu.com/5596412/
[16:40] <SpamapS> ebel: thats what I use to keep a tunnel up (changed to use some of your values ;)
[16:40] <SpamapS> ebel: note that I have vmstat 30 doing my alive interval ;)
[16:41] <SpamapS> hm, I guess -TN would have been better :)
[16:41] <SpamapS> ebel: anyway, I've been using that job for a couple of years now
[16:42] <ebel> thanks
[16:44] <ebel> gah, now it says "unknown job" when I try to start it...
[16:45] <ebel> anyway to do a syntax check or something?
[16:46] <SpamapS> ebel: init-checkconf
[16:47] <ebel> don't have that command
[16:48] <ebel> ubuntu 10.04 server
[17:09] <SpamapS> ebel: oohhh
[17:09] <SpamapS> ebel: then you do need sudo :-P
[17:09] <SpamapS> ebel: you know.. 12.04 released almost a year ago.. :)
[17:09] <ebel> ;)
[17:33] <ebel> is there anyway to see if it's upstart that's restarting/respawning this ssh process? is there logs or something?
[17:44] <SpamapS> ebel: initctl log-priority info
[17:44] <SpamapS> ebel: though I think default logging priority would show upstart messages on respawn
[17:46] <ebel> where are the logs?
[17:46] <ebel> restarting the server is maybe an option, but don't want to have to
[17:47] <ebel> ah syslog
[17:50] <ebel> feck it, rebooting server
[17:50] <ebel> hit it with a big hammer