You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Harding, David" <dh...@Thomcomp.com> on 2000/11/09 23:47:08 UTC

Connection failure during handshake? (mm.mysql)

i have a Database connection pool and connection pool factory written as
java classes.  the idea is to pool database connections over all of my
servlets in my webapp.  so far so good.  things have been working well for
some time now, but i just ran into a problem.

java.sql.SQLException: Communication failure during handshake.  Is there a
server running on <ipaddress:port>

that is the error i get (tracked that down to MySQLIO.java in mm.mysql).

anyhow, the deal is this...there *IS* a server running there.  i can connect
to it via Perl:DBI or the mysql client with no problems right after getting
that java exception.  then if i try my java stuff right after that, it still
fails with the same error.

anyone know what is going on here?  (fyi, this connection pool is being used
via a JApplet)



Re: Connection failure during handshake? (mm.mysql)

Posted by "Harding, David" <dh...@Thomcomp.com>.
on 11/10/00 12:53 PM, Craig R. McClanahan at Craig.McClanahan@eng.sun.com
wrote:

> "Harding, David" wrote:
> 
>> i have the latest mm.mysql   and i still get the problem, but only when i
>> use the driver from an applet it seems.  i can use it in a servlet and in
>> regular java apps with no issues so far.  this is very frustrating since
>> this project is a lot of applets using the database.
>> 
>> i have been looking in my error log for mysql and i see the following:
>> 
>> 001110 12:42:15  Aborted connection 173 to db: 'verdex' user: 'java' host:
>> `' (Got an error reading communication packets)
>> 
>> i think it may be time to start talking to the mysql and mm.mysql peeps on
>> this one as i think i can safely say that it is not tomcat related.
> 
> This is probably a silly reminder, but an applet can only establish network
> connections back to the host it was loaded from, unless it is signed.  Is the
> MySQL database you are accessing on the same server?
> 
> Craig McClanahan
> 

the database and the applet are served from the same host.

Re: Connection failure during handshake? (mm.mysql)

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
"Harding, David" wrote:

> i have the latest mm.mysql   and i still get the problem, but only when i
> use the driver from an applet it seems.  i can use it in a servlet and in
> regular java apps with no issues so far.  this is very frustrating since
> this project is a lot of applets using the database.
>
> i have been looking in my error log for mysql and i see the following:
>
> 001110 12:42:15  Aborted connection 173 to db: 'verdex' user: 'java' host:
> `' (Got an error reading communication packets)
>
> i think it may be time to start talking to the mysql and mm.mysql peeps on
> this one as i think i can safely say that it is not tomcat related.

This is probably a silly reminder, but an applet can only establish network
connections back to the host it was loaded from, unless it is signed.  Is the
MySQL database you are accessing on the same server?

Craig McClanahan



Re: Connection failure during handshake? (mm.mysql)

Posted by "Harding, David" <dh...@Thomcomp.com>.
i have the latest mm.mysql   and i still get the problem, but only when i
use the driver from an applet it seems.  i can use it in a servlet and in
regular java apps with no issues so far.  this is very frustrating since
this project is a lot of applets using the database.

i have been looking in my error log for mysql and i see the following:

001110 12:42:15  Aborted connection 173 to db: 'verdex' user: 'java' host:
`' (Got an error reading communication packets)

i think it may be time to start talking to the mysql and mm.mysql peeps on
this one as i think i can safely say that it is not tomcat related.


Re: Connection failure during handshake? (mm.mysql)

Posted by "Michael P. McCutcheon" <mi...@value.net>.
If memory serves me correctly, a newer version of that MySQL JDBC driver
cured the handshake problem.  I suggest downloading the latest version...

Mike

----- Original Message -----
From: "Harding, David" <dh...@Thomcomp.com>
To: <to...@jakarta.apache.org>
Sent: Thursday, November 09, 2000 2:47 PM
Subject: Connection failure during handshake? (mm.mysql)


> i have a Database connection pool and connection pool factory written as
> java classes.  the idea is to pool database connections over all of my
> servlets in my webapp.  so far so good.  things have been working well for
> some time now, but i just ran into a problem.
>
> java.sql.SQLException: Communication failure during handshake.  Is there a
> server running on <ipaddress:port>
>
> that is the error i get (tracked that down to MySQLIO.java in mm.mysql).
>
> anyhow, the deal is this...there *IS* a server running there.  i can
connect
> to it via Perl:DBI or the mysql client with no problems right after
getting
> that java exception.  then if i try my java stuff right after that, it
still
> fails with the same error.
>
> anyone know what is going on here?  (fyi, this connection pool is being
used
> via a JApplet)
>
>
>