Re: CORRECT SOLUTION: Communications link failure due to underlying exception
Posted by: Adam Pickett
Date: May 29, 2006 06:41AM

Well after reading this tread i have tryed the Correct Solution and it half works; when trying to use MySQL on local host it works fine however when i try to use it on another machine i get the following error.

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

** BEGIN NESTED EXCEPTION **

java.net.SocketException
MESSAGE: java.net.ConnectException: Connection timed out: connect

STACKTRACE:

java.net.SocketException: java.net.ConnectException: Connection timed out: connect
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:284)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2555)
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:525)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at DatabaseManager.SQLParser.<init>(SQLParser.java:57)
at DatabaseManager.DBManager.openMYSQLDatabaseConnection(DBManager.java:41)
at DatabaseManager.DatabaseTester.main(DatabaseTester.java:8)


** END NESTED EXCEPTION **



Last packet sent to the server was 0 ms ago.
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2621)
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:525)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at DatabaseManager.SQLParser.<init>(SQLParser.java:57)
at DatabaseManager.DBManager.openMYSQLDatabaseConnection(DBManager.java:41)
at DatabaseManager.DatabaseTester.main(DatabaseTester.java:8)
Java Result: 1

The only dirrerance is the IP address i use both the servers have the wait_timout=500 set and i'm using autoReconnect=true.

any ideas?

.Adam

Options: ReplyQuote


Subject
Written By
Posted
Re: CORRECT SOLUTION: Communications link failure due to underlying exception
May 29, 2006 06:41AM
June 09, 2006 04:42AM
August 24, 2006 05:27PM
July 15, 2007 04:27AM


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.