Hi, Could you try running "strace -p <dbclient_pid>" on the dbclient process when it's running under the wrapper, soon after it starts? That might give a clue as to how it differs.
Cheers, Matt On Mon, Aug 16, 2010 at 12:54:30PM +0200, Fabrizio Bertocci wrote: > Hi All, > Here is an interesting (but inconvenient) problem I've found with dbclient > when connected to an OpenSSH server that uses the keepalive > (ClientAliveInterval & ClientAliveCountMax). > > I have a OpenSSH server that sends keepalive messages to the client every 10 > seconds and consider the client disconnected after 2 failed attempts. > > On my client I use dbclient (latest version 0.52) to start a connection > (using a private key with no password) to setup some tunnels (local & > remote). > So far so good. When I launch the dbclient from a shell everything is fine, > this is what I see on the server log every 10 seconds: > > debug2: channel 1: request [email protected] confirm 1 > debug1: Got 100/10 for keepalive > debug2: channel 1: request [email protected] confirm 1 > debug1: Got 100/11 for keepalive > ... > and the server keep maintaining the connection with the client. > > Unfortunately, when I invoke my bourne shell script (that I use as wrapper > for launching dbclient) from the init script (/etc/init.d/myWrapper.sh), > everything SEEMS to work fine, but when the server sends keep alive > messages, the dbclient doesn't seem to respond correctly. > This is what I see from the server's log: > > debug2: channel 1: request [email protected] confirm 1 > debug2: channel 1: almost dead > debug2: channel 1: gc: notify user > debug1: session_by_channel: session 0 channel 1 > debug1: session_close_by_channel: channel 1 child 18881 > debug1: session_close_by_channel: channel 1: has child > ... > Disconnecting: Timeout, your session not responding. > debug1: do_cleanup > debug1: do_cleanup > > Does anybody have an idea why ? > It has something to do with I/O probably or some settings that are available > when I launch my script (or the dbclient) from an interactive session but is > missing when is invoked from the init script... > > Regards, > fabrizio
