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:13 |
---|---|---|
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:14 |
ebel | http://pastebin.com/9XghsZFu FYI this is the /etc/init/JOBNAME.conf | 16:15 |
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:16 |
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:17 |
SpamapS | ebel: you should not need expect | 16:34 |
SpamapS | ebel: you don't need to use sudo | 16:34 |
SpamapS | ebel: setuid svn_ssh is all you need there | 16:35 |
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:36 |
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:37 |
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:39 |
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:40 |
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:41 |
ebel | thanks | 16:42 |
ebel | gah, now it says "unknown job" when I try to start it... | 16:44 |
ebel | anyway to do a syntax check or something? | 16:45 |
SpamapS | ebel: init-checkconf | 16:46 |
ebel | don't have that command | 16:47 |
ebel | ubuntu 10.04 server | 16:48 |
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:09 |
ebel | is there anyway to see if it's upstart that's restarting/respawning this ssh process? is there logs or something? | 17:33 |
SpamapS | ebel: initctl log-priority info | 17:44 |
SpamapS | ebel: though I think default logging priority would show upstart messages on respawn | 17:44 |
ebel | where are the logs? | 17:46 |
ebel | restarting the server is maybe an option, but don't want to have to | 17:46 |
ebel | ah syslog | 17:47 |
ebel | feck it, rebooting server | 17:50 |
ebel | hit it with a big hammer | 17:50 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!