com.mysql.jdbc.exceptions.jdbc4.CommunicationsException

Communications link failure The last packet successfully received from the server was 14,380,298 milliseconds ago. The last packet sent successfully to the server was 14,380,634 milliseconds ago.

Samebug tips13

Probably there is a bug in TestNG Eclipse plugin (6.8.6.20130607_0745), try an other version (e.g. 6.8.0.20121120_1820)

before running my test in debug mode, i open the debug view, and remove some breakpoints (such as some remaining on NullPointersExceptions, and Sockets)

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web2019

  • via GitHub by freakyy85
    ,
  • Stack trace

    • com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet successfully received from the server was 14,380,298 milliseconds ago. The last packet sent successfully to the server was 14,380,634 milliseconds ago. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.mysql.jdbc.Util.handleNewInstance(Util.java:425) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:989) at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3743) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2506) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2677) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2545) at com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:4842) at org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:371) at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAutoCommit(PoolingDataSource.java:328) at CreatePO.getItemFromDB(CreatePO.java:84) at CreatePO.run(CreatePO.java:53) at java.util.TimerThread.mainLoop(Timer.java:555) at java.util.TimerThread.run(Timer.java:505) Caused by: java.net.SocketException: Connection reset by peer: socket write error at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109) at java.net.SocketOutputStream.write(SocketOutputStream.java:153) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82) at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140) at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3725) ... 10 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

    ivanszkypeterivanszkypeter
    935 times, last one
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    esaaresaar
    Once,
    Unknown visitor
    Unknown visitorOnce,
    217 more bugmates