Hi Jeremy, thanks for your reply.
I believe that the session was idle. It also does it when I give the -2
option to ssh ( ssh2 is supposed to not time out, according to some
usenet
posts I have read).
The point of the excercise is to have an encrypted connection that I can
make DBI calls to the database. I am just using the mysql commandline
tool
to diagnose.
What I also find interesting is that I have a very similar problem with
stunnel.
In otherwords, I think this is a mysql type problem, not an ssh or
stunnel
problem.
In that case, it isn't a particular period of time that seems to cause
the
encrypted connection to fail - it always fails after the first
connection -
ie I can use it once,but never again.
netstat -na seems to think that there is something listening on all the
right ports.
I am leaning towards the theory that there is something funny with the
particular version of kernel I am running ( 2.2.14) on the client. A
russian
guy called Sergey Yegorov posted a strace of a faulty mysqld which had a
strace that looked like mine ( a clone, a sys_175 followed by a sys_179
call
and then silence) .
I'll just describe my setup briefly:
3306
--
/
| | +
3306 mysqld
client stunnel / | encrypted tunnel
||
\
| |
| server stunnel
\ |___ |
--+
3307
- 3307
So I strace the output of client stunnel daemon, the server stunnel
daemon,
and mysql client.
Server stunnel starts, forks a child. Client stunnel starts and also
forks a
child. Mysql is started and the strace interferes with it slightly, so
it
never fully starts ( although it does when there is no strace
attatched),
but it seems to break at a read from a network socket ( read (4,
0x80cb008,
4) = ? ERESTARTSYS (To be restarted).
There is a similar error on an accept function on the stunnel child
process
for the server stunnel
accept(5, 0xb9ec, [16]) = ? ERESTARTSYS ( To be restarted )
The next line is where I interupt the mysql client. The server stunnel
child
gets cleaned up, the client stunnel doesn't , and nothing will ever make
mysql go again until I restart the stunnels.
So having just figured all this, I am off to play on a box with a
different
kernel.
If you have any ideas, anyone, please share. I have been at this one on
and
off for weeks, and am running out of good ideas.
Cheers,
Leon
Jeremy Zawodny wrote:
On Thu, Apr 12, 2001 at 02:32:42PM +0800, Leon Harris wrote:
On the client I do a
ssh -q -n -f -l account -L 3306:mysqlserver.mydomain.com:3306
then mysql -u dbuser --port=3306 -h 127.0.0.1 -p dbname
and I get an encrypted connection. ( thats what tcpdump shows me) !
Lovely !
But after a few tens of minutes, no more connection, and mysql times
out.
Is the SSH connection idle or active when you see the timeouts? (I've
had this working between a Linux master and FreeBSD slave before.)
Jeremy
--
Jeremy D. Zawodny, [EMAIL PROTECTED]
Technical Yahoo - Yahoo Finance
Desk: (408) 328-7878Fax: (408) 530-5454
Cell: (408) 439-9951
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php