Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-8058

Blocking snapshot can fail due to CommunicationsException

XMLWordPrintable

      The connection used by the blocking snapshot is the same connection used by the initial snapshot. For the blocking snapshot uses cases, due to its nature to be repeated multiple times, a CommunicationsException can occurs.

      com.mysql.cj.jdbc.exceptions.CommunicationsException: The last packet successfully received from the server was 347,014,899 milliseconds ago. The last packet sent successfully to the server was 347,014,906 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem. at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64) at com.mysql.cj.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:2022) at io.debezium.relational.RelationalSnapshotChangeEventSource.createSnapshotConnection(RelationalSnapshotChangeEventSource.java:228) at io.debezium.relational.RelationalSnapshotChangeEventSource.doExecute(RelationalSnapshotChangeEventSource.java:127) at io.debezium.pipeline.source.AbstractSnapshotChangeEventSource.execute(AbstractSnapshotChangeEventSource.java:92) at io.debezium.pipeline.ChangeEventSourceCoordinator.doSnapshot(ChangeEventSourceCoordinator.java:253) at io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$doBlockingSnapshot$7(ChangeEventSourceCoordinator.java:218) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:840) Caused by: com.mysql.cj.exceptions.CJCommunicationsException: The last packet successfully received from the server was 347,014,899 milliseconds ago. The last packet sent successfully to the server was 347,014,906 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem. at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:104) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:149) at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:165) at com.mysql.cj.protocol.a.NativeProtocol.send(NativeProtocol.java:629) at com.mysql.cj.protocol.a.NativeProtocol.sendCommand(NativeProtocol.java:684) at com.mysql.cj.protocol.a.NativeProtocol.sendQueryPacket(NativeProtocol.java:1050) at com.mysql.cj.protocol.a.NativeProtocol.sendQueryString(NativeProtocol.java:997) at com.mysql.cj.NativeSession.execSQL(NativeSession.java:658) at com.mysql.cj.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:2005) ... 10 common frames omitted Caused by: java.net.SocketException: Connection reset by peer at java.base/sun.nio.ch.NioSocketImpl.implWrite(NioSocketImpl.java:425) at java.base/sun.nio.ch.NioSocketImpl.write(NioSocketImpl.java:445) at java.base/sun.nio.ch.NioSocketImpl$2.write(NioSocketImpl.java:831) at java.base/java.net.Socket$SocketOutputStream.write(Socket.java:1035) at java.base/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:81) at java.base/java.io.BufferedOutputStream.flush(BufferedOutputStream.java:142) at com.mysql.cj.protocol.a.SimplePacketSender.send(SimplePacketSender.java:57) at com.mysql.cj.protocol.a.TimeTrackingPacketSender.send(TimeTrackingPacketSender.java:52) at com.mysql.cj.protocol.a.NativeProtocol.send(NativeProtocol.java:620) ... 15 common frames omitted
      

            rh-ee-mvitale Mario Fiore Vitale
            rh-ee-mvitale Mario Fiore Vitale
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: