MySQL Lists are EOL. Please join:

List:MySQL and Java« Previous MessageNext Message »
From:Mark Matthews Date:December 10 2002 7:27pm
Subject:Re: java.sql.SQLException: Communication link failure: java.io.IOException
View as plain text  
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bill Harten wrote:
> When I try 
> 
>  
> getConnection("jdbc:mysql://somehost.com/somedatabase?user=john&password
> =doe") 
> 
> on a remote JDBC connection, I get:
> 
>     java.sql.SQLException: Communication link failure:
> java.io.IOException
> 
> The user table contains a single entry for user='johndoe' host='%',
> password='...' and all privileges='Y'.
> 
> The mysql client connects and works.  The JDBC URL host and socket are
> right; I get other messages when these are wrong, or when the network is
> down, or when mysqld is not running. I installed the latest of mysql on
> linux, and I'm running the latest mysql JDBC driver and java SDK 1.4.1
> on windows.

Please state _exactly_ what version of the JDBC driver you are using.

In almost all of the newsgroup postings, the 'Communication link 
failure' is due to idle connections not being closed, not the case when 
just making a connection. Most of these type of IOExceptions turn out to 
be flakey networks, or known issues with the JDK or the operating system 
or a combination of any of the three.

I will change the JDBC driver to include the stack trace of the 
IOException for easier debugging in the future, but in the mean time if 
you can run your code in a debugger and set a breakpoint for 
IOExceptions, to see exactly what exception your are getting, and 
exactly where it happens, that would help immensely.

The tough bit is debugging these issues, as they are not usually 
reproducible on other systems, so I need your help to figure out what's 
causing issues like this in your particular environment.

	-Mark

- -- 
MySQL 2003 Users Conference -> http://www.mysql.com/events/uc2003/

For technical support contracts, visit https://order.mysql.com/?ref=mmma

     __  ___     ___ ____  __
    /  |/  /_ __/ __/ __ \/ /  Mark Matthews <mark@stripped>
   / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java
  /_/  /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
         <___/ www.mysql.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.1.90 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE99kAPtvXNTca6JD8RAi2dAJ4/pP3VxWnFOhBkdiCZhW/wxR2DgQCfUljP
tP5bI2aMaSev4PkcpsYZ/Yk=
=Q/aC
-----END PGP SIGNATURE-----

Thread
java.sql.SQLException: Communication link failure: java.io.IOExceptionBill Harten10 Dec
  • Re: java.sql.SQLException: Communication link failure: java.io.IOExceptionMark Matthews10 Dec