com.mysql.jdbc.CommunicationsException: Communications link failure Last packet sent to the server was 1 ms ago.


Solutions on the web

Solution icon of web
Communications link failure Last packet sent to the server was 1 ms ago.

Solution icon of web
Communications link failure Last packet sent to the server was 1 ms ago.

Solution icon of web
Communications link failure Last packet sent to the server was 1 ms ago.

Solution icon of oraclecommunity
via Oracle Community by 843859, 1 year ago
Communications link failure Last packet sent to the server was 1 ms ago.

Solution icon of sourceforge
via schemaspy by shaneram
, 1 year ago
Communications link failure Last packet sent to the server was 1 ms ago.

Solution icon of stackoverflow
Communications link failure Last packet sent to the server was 0 ms ago.

Solution icon of web
Communications link failure Last packet sent to the server was 16 ms ago.

Solution icon of web
Communications link failure Last packet sent to the server was 29 ms ago.

Solution icon of web
Communications link failure Last packet sent to the server was 42 ms ago.

Solution icon of oraclecommunity
via Oracle Community by 843859, 2 months ago
Communications link failure Last packet sent to the server was 33 ms ago.

Stack trace

com.mysql.jdbc.CommunicationsException: Communications link failure
 
Last packet sent to the server was 1 ms ago.
	at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1070)
	at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2120)
	at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:723)
	at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:298)
	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
	at java.sql.DriverManager.getConnection(Unknown Source)
	at java.sql.DriverManager.getConnection(Unknown Source)
	at test.DBConnection.getConnection(DBConnection.java:56)
	at test.Test.main(Test.java:14)
Caused by: com.mysql.jdbc.CommunicationsException: Communications link failure
 
Last packet sent to the server was 0 ms ago.
	at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1070)
	at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:335)
	at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2043)
	... 7 more
Caused by: java.net.ConnectException: Connection refused: connect
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(Unknown Source)
	at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
	at java.net.PlainSocketImpl.connect(Unknown Source)
	at java.net.SocksSocketImpl.connect(Unknown Source)
	at java.net.Socket.connect(Unknown Source)
	at java.net.Socket.connect(Unknown Source)
	at java.net.Socket.<init>(Unknown Source)
	at java.net.Socket.<init>(Unknown Source)
	at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:253)
	at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:284)
	... 8 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
61 times, 13 hours ago
Samebug visitor profile picture
Unknown user
Once, 3 weeks ago
Samebug visitor profile picture
Unknown user
Once, 4 weeks ago
848 more bugmates