Bug #35353 | getConnection: Communications link failure | ||
---|---|---|---|
Submitted: | 17 Mar 2008 22:18 | Modified: | 18 Mar 2008 8:03 |
Reporter: | Vitaliy Berdinskikh | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | Connector / J | Severity: | S2 (Serious) |
Version: | 5.1.6 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | connect |
[17 Mar 2008 22:18]
Vitaliy Berdinskikh
[18 Mar 2008 6:57]
Vitaliy Berdinskikh
It's not a bug. Cite: =============== I think i've got the problem solved, there's a need to add to /etc/hosts.allow this line: mysqld : ALL : ACCEPT The package should add this line in the file, to prevent further bug reports and forum posts. ===============
[18 Mar 2008 8:03]
Tonci Grgin
Hi Vitaliy and thanks for your report. I don't think "package" can write in /etc so I don't see how we can fix this. In any case I will notify docs team so that this is added to manual.
[6 Feb 2010 14:04]
vatoer ckplus
like the problem above , i have edited /etc/hosts.allow in my ubuntu machine but the problem still occur
[24 Feb 2010 12:12]
AGUIDI Maria
hi i get the same exception when i was trying to execute this line: ant load-data so tha DB could'nt be loaded and i need some help to resolve this probleme. Configuration windows XP JDK 1.5 MySQL 5 Tomcat 6.0.20 Maven 2.0.9 Ant 1.7.1
[24 Feb 2010 12:20]
Tonci Grgin
I still do not think this all Ubuntu, Tomcat, Maven, Ant thingy has anything to do with MySQL... Please search appropriate docs/forums for help on this.
[24 Feb 2010 13:28]
AGUIDI Maria
do you know this type of exception is due to what!! regards
[23 Oct 2010 4:50]
Mahendranath Nampally
I am working in fedora 12 linux operating system. I got the below exception when I trying to get the mysql database connection from java program. Please find the below: [Mahendranath@localhost test]$ java DBConnect Exception in thread "main" com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet successfully received from the server was 1,287,829,112,442 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:532) at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2214) at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:773) at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:532) at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:352) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282) at java.sql.DriverManager.getConnection(DriverManager.java:620) at java.sql.DriverManager.getConnection(DriverManager.java:222) at DBConnect.main(DBConnect.java:5) Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet successfully received from the server was 1,287,829,112,418 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:532) at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074) at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:341) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2140) ... 12 more Caused by: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:310) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:176) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:163) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384) at java.net.Socket.connect(Socket.java:542) at java.net.Socket.connect(Socket.java:492) at java.net.Socket.<init>(Socket.java:389) at java.net.Socket.<init>(Socket.java:232) at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:254) at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:291) ... 13 more