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

Handle Vstream Connection reset

XMLWordPrintable

      In order to make your issue reports as actionable as possible, please provide the following information, depending on the issue type.

      Bug report

      For bug reports, provide this information, please:

      What Debezium connector do you use and what version?

      Vitess

      What is the connector configuration?

      Not Relevant

      What is the captured database version and mode of depoyment?

      AWS, Vitess V11

      What behaviour do you expect?

      When VtTable restarts, the previous VStream connection the Vitess connector subscribed to was closed, we expect the Vitess Connector is able to recover by re-subscribing.

      What behaviour do you see?

      Vitess Connector was stopped but no restart was happening.

      Do you see the same behaviour using the latest relesead Debezium version?

      Yes, the problem occurs in both connector 1.9.5 and 2.0.0

      Do you have the connector logs, ideally from start till finish?

      2022-08-09 22:54:32,085 INFO  || [Consumer clientId=consumer-1-3, groupId=1] Discovered group coordinator slogs-c-kafka-dev-iad-b771.nebula.tinyspeck.com:9092 (id: 2147482636 rack: null)  [org.apache.kafka.clients.consumer.internals.ConsumerCoordinator]

      2022-08-09 22:57:14,000 INFO  Vitess|dev|streaming VStream streaming onError. Status: Status{code=CANCELLED, description=target: byuser.-4000.master: vttablet: rpc error: code = Canceled desc = grpc: the client connection is closing, cause=null}  [io.debezium.connector.vitess.connection.VitessReplicationConnection]

      io.grpc.StatusRuntimeException: CANCELLED: target: byuser.-4000.master: vttablet: rpc error: code = Canceled desc = grpc: the client connection is closing

          at io.grpc.Status.asRuntimeException(Status.java:533)

          at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:478)

          at io.grpc.internal.DelayedClientCall$DelayedListener$3.run(DelayedClientCall.java:463)

          at io.grpc.internal.DelayedClientCall$DelayedListener.delayOrExecute(DelayedClientCall.java:427)

          at io.grpc.internal.DelayedClientCall$DelayedListener.onClose(DelayedClientCall.java:460)

          at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:616)

          at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:69)

          at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:802)

          at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:781)

          at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)

          at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)

          at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)

          at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)

          at java.base/java.lang.Thread.run(Thread.java:829)

      2022-08-09 22:57:14,870 ERROR Vitess|dev|streaming Error during streaming  [io.debezium.connector.vitess.VitessStreamingChangeEventSource]

      io.grpc.StatusRuntimeException: CANCELLED: target: byuser.-4000.master: vttablet: rpc error: code = Canceled desc = grpc: the client connection is closing

          at io.grpc.Status.asRuntimeException(Status.java:533)

          at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:478)

          at io.grpc.internal.DelayedClientCall$DelayedListener$3.run(DelayedClientCall.java:463)

          at io.grpc.internal.DelayedClientCall$DelayedListener.delayOrExecute(DelayedClientCall.java:427)

          at io.grpc.internal.DelayedClientCall$DelayedListener.onClose(DelayedClientCall.java:460)

          at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:616)

          at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:69)

          at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:802)

          at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:781)

          at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)

          at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)

          at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)

          at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)

       

      2022-08-09 22:57:19,404 INFO  || Stopping down connector  [io.debezium.connector.common.BaseSourceTask]

      How to reproduce the issue using our tutorial deployment?

      Start the Vitess Connector and go to Vitess side, restart the VtTable or VtGate process.

      Feature request or enhancement

      For feature requests or enhancements, provide this information, please:

      Which use case/requirement will be addressed by the proposed feature?

      <Your answer>

      Implementation ideas (optional)

      The problem is VitessErrorHandler didn't treat Status.CANCELLED state as a retriable error, see below code: https://github.com/debezium/debezium-connector-vitess/blob/main/src/main/java/io/debezium/connector/vitess/VitessErrorHandler.java#L21,  Add a few more lines in this class should fix the problem.

       

            Unassigned Unassigned
            haiyingcai Henry Haiying Cai (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: