Re: com.mysql.jdbc.CommunicationsException due to java.io.EOFException...
Posted by: Petr Kotek
Date: July 27, 2009 07:35AM

This is old thread but still not solved, so I'm posting solution which worked for me:

Edit file: /etc/hosts.allow
Add row:
mysqld : ALL : ALLOW
(or you can type IP instead of "ALL")

My exception was:

Exception in thread "main" com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.io.EOFException

STACKTRACE:

java.io.EOFException
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1934)
at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:483)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:992)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2572)
at com.mysql.jdbc.Connection.<init>(Connection.java:1485)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
at java.sql.DriverManager.getConnection(DriverManager.java:620)
at java.sql.DriverManager.getConnection(DriverManager.java:200)
... some my stuff ...


** END NESTED EXCEPTION **



Last packet sent to the server was 17 ms ago.
at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:554)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:992)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2572)
at com.mysql.jdbc.Connection.<init>(Connection.java:1485)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
at java.sql.DriverManager.getConnection(DriverManager.java:620)
at java.sql.DriverManager.getConnection(DriverManager.java:200)
... some my stuff ...

Options: ReplyQuote


Subject
Written By
Posted
Re: com.mysql.jdbc.CommunicationsException due to java.io.EOFException...
July 27, 2009 07:35AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.