Bug #7763 Communication link failure
Submitted: 10 Jan 2005 10:43 Modified: 10 Jan 2005 19:02
Reporter: Alan Williamson Email Updates:
Status: Can't repeat Impact on me:
None 
Category:Connector / J Severity:S3 (Non-critical)
Version:3.0.16-ga OS:Windows (WindowsXP)
Assigned to: Mark Matthews CPU Architecture:Any

[10 Jan 2005 10:43] Alan Williamson
Description:
This was working with an earlier version of the driver.  We simply downloaded and dropped it into place.

The MySQL server is 'mysql-4.1.8-win'

Cannot create PoolableConnectionFactory (Server connection failure during transaction. Due to underlying exception: 'java.sql.SQLException: Communication link failure: java.io.EOFException, underlying cause: null ** BEGIN NESTED EXCEPTION ** java.io.EOFException STACKTRACE: java.io.EOFException at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1319) at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:1338) at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:565) at com.mysql.jdbc.Connection.createNewIO(Connection.java:1746) at com.mysql.jdbc.Connection.<init>(Connection.java:432) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:400) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37) at

How to repeat:
Repeatable everytime

Suggested fix:
Roll back to the previous driver
[10 Jan 2005 10:47] Alan Williamson
Just to add a small note on this.  It appears to be only effected when hitting the MySQL server running on Windows; if i point it towards an older MySQL running on Linux, then no problems.

All firewalls are disabled on Windows, and if we roll back to the earlier 3.0.11 then all is well again in the world.
[10 Jan 2005 19:02] Mark Matthews
Alan,

I just tried repeating this with 4.1.8 on windows, and wasn't successful in getting it to throw an exception, everything worked as expected.

Given your stacktrace, I suspect you aren't running the version of the driver you _think_ you are...Line 565 in MySQLIO is _not_ inside doHandshake()...

Are you sure you don't have an older version of the driver laying around in your classpath that doesn't work with MySQL-4.1.x where 'x' is > 1 ... For example, C/J 3.0.8 doesn't do MySQL-4.1.1 and newer authentication, and line 565 in MySQLIO is exactly where it would crash if it didn't know how to do MySQL-4.1.1 authentication....I'd check any appserver classpaths, jre/lib/ext, etc. to see if you have something laying around older than 3.0.11.

Are you using a stock configuration for the server, or is there anything I should be aware of with the server? (I tried --old-passwords, and it still worked).
[11 Jan 2005 12:23] Alan Williamson
You are right Mark, i apologize.

There was a mysql.jar lurking in the jre/lib/ext folder.
[23 Nov 2007 5:29] yogesh ahire
yaa please i experienced same always i=use lates version