launchd doesn't restart tunnel properly

Fragger

Lorem Ipsum
Hey all,

My home computer is behind a brick wall so I need to reverse tunnel from it to my computer at work in order to have access from there. I load the plist into launchd with the "-S aqua" option to take advantage of ssh-agent running by default in Leopard, this allows me to use an ssh-key.

The tunnel works fine for a while, even a long while, but it occasionally dies and doesn't properly reset itself. If I kill the connection manually, launchd properly restarts it in a few seconds. It seems that when it dies a natural death it has problems restarting.

I'm used to sessions timing out, but the whole point of using launchd was that it would restart the session. (Note that manually unloading and reloading the daemon with launchctl fixes the problem...) Any suggestions?

From the system log:
Code:
com.graham.reversetunnel[7992]: Read from remote host squark: Connection reset by peer
com.apple.launchd[80] (com.graham.reversetunnel[7992]): Exited with exit code: 255
com.graham.reversetunnel[8268]: Warning: remote port forwarding failed for listen port 1100

Thanks,
Graham
 
Back
Top