Re: CORRECT SOLUTION: Communications link failure due to underlying exception
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
Subject
Written By
Posted
February 22, 2005 01:11AM
February 22, 2005 02:54AM
February 22, 2005 10:38AM
February 22, 2005 11:48AM
November 01, 2007 09:32AM
Re: CORRECT SOLUTION: Communications link failure due to underlying exception
May 29, 2006 06:41AM
November 01, 2006 05:52AM
November 30, 2006 11:31PM
November 30, 2006 11:37PM
December 01, 2006 12:44AM
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.