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


Solutions on the web

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

Solution icon of bugzilla
via https://bugzilla.redhat.com/bugzilla/ by Donald Cohen, 11 months ago
Communications link failure Last packet sent to the server was 0 ms ago.

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

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

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

Solution icon of stackoverflow
via Stack Overflow by hypercube
, 3 months ago
Communications link failure Last packet sent to the server was 0 ms ago.

Solution icon of stackoverflow
via Stack Overflow by Tyler Garavaglia
, 1 year ago
Communications link failure Last packet sent to the server was 0 ms ago.

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

Solution icon of web
via mysql.com by Unknown author, 1 year ago
Communications link failure Last packet sent to the server was 0 ms ago.

Solution icon of web
via ubuntuforums.org by Unknown author, 1 year ago
Communications link failure Last packet sent to the server was 0 ms ago.

Stack trace

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

Last packet sent to the server was 0 ms ago.
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	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:2104)
	at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:729)
	at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
	at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:283)
	at java.sql.DriverManager.getConnection(Unknown Source)
	at java.sql.DriverManager.getConnection(Unknown Source)
	at UserAuthPubKey.connectToDB(UserAuthPubKey.java:72)
	at UserAuthPubKey.main(UserAuthPubKey.java:44)
Caused by: java.net.ConnectException: Connection refused: connect
	at java.net.DualStackPlainSocketImpl.connect0(Native Method)
	at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
	at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
	at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
	at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
	at java.net.PlainSocketImpl.connect(Unknown Source)

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
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Once, 4 months ago
2 times, 1 year ago
725 more bugmates