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

XStream may fail to attach on retry if previous attempt failed

XMLWordPrintable

      It seems that if an attach operation fails and requires a retry that the XStream API could reach a state where the API thinks we're attached, despite having thrown an error, see below

      2024-08-29 10:05:30,245 WARN   Oracle|server1|streaming  Failed to attach to outbound server, retrying: ORA-26928: Unable to communicate with XStream apply coordinator process "DBZXOUT" from outbound server "".
         [io.debezium.connector.oracle.xstream.XstreamStreamingChangeEventSource]
      2024-08-29 10:05:30,248 INFO   ||  Connection gracefully closed   [io.debezium.jdbc.JdbcConnection]
      2024-08-29 10:05:30,249 ERROR  Oracle|server1|streaming  Producer failure   [io.debezium.pipeline.ErrorHandler]
      oracle.streams.StreamsException: ORA-26811: Client has already attached to XStream apply "dbzxout".
      
      	at oracle.streams.XStreamOut.XStreamOutAttachNative(Native Method)
      	at oracle.streams.XStreamOut.attachInternal(Unknown Source)
      	at oracle.streams.XStreamOut.attach(Unknown Source)
      	at io.debezium.connector.oracle.xstream.XstreamStreamingChangeEventSource.performAttachWithRetries(XstreamStreamingChangeEventSource.java:181)
      	at io.debezium.connector.oracle.xstream.XstreamStreamingChangeEventSource.execute(XstreamStreamingChangeEventSource.java:122)
      	at io.debezium.connector.oracle.xstream.XstreamStreamingChangeEventSource.execute(XstreamStreamingChangeEventSource.java:45)
      	at io.debezium.pipeline.ChangeEventSourceCoordinator.streamEvents(ChangeEventSourceCoordinator.java:312)
      	at io.debezium.pipeline.ChangeEventSourceCoordinator.executeChangeEventSources(ChangeEventSourceCoordinator.java:203)
      	at io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:143)
      	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
      	at java.base/java.lang.Thread.run(Thread.java:1583)
      

      This looks as though it could be an XStream bug; however, one way to perhaps work around this would be to close the database connection and reconnect.

              ccranfor@redhat.com Chris Cranford
              ccranfor@redhat.com Chris Cranford
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: