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

CDC - Debezium x RabbitMQ - Debezium Server crashes when an UPDATE/DELETE on source database (PostgreSQL)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.4.0.Alpha2
    • None
    • debezium-server
    • None
    • False
    • None
    • False

      Bug report

      Applying any UPDATE or DELETE on PostgreSQL table crashes the Debezium server ..

       

       
      
      debezium-server | {"timestamp":"2023-07-19T21:12:30.997Z","sequence":204,"loggerClassName":"org.slf4j.impl.Slf4jLogger","loggerName":"org.apache.kafka.connect.storage.FileOffsetBackingStore","level":"INFO","message":"Stopped FileOffsetBackingStore","threadName":"pool-7-thread-1","threadId":25,"mdc":{},"ndc":"","hostName":"a618e1630e3a","processName":"io.debezium.server.Main","processId":1} debezium-server | {"timestamp":"2023-07-19T21:12:30.998Z","sequence":205,"loggerClassName":"org.slf4j.impl.Slf4jLogger","loggerName":"io.debezium.server.ConnectorLifecycle","level":"ERROR","message":"Connector completed: success = 'false', message = 'Stopping connector after error in the application's handler method: Unexpected data type 'null'', error = 'io.debezium.DebeziumException: Unexpected data type 'null''","threadName":"pool-7-thread-1","threadId":25,"mdc":{},"ndc":"","hostName":"a618e1630e3a","processName":"io.debezium.server.Main","processId":1,"exception":{"refId":1,"exceptionType":"io.debezium.DebeziumException","message":"Unexpected data type 'null'","frames":[{"class<span class="code-quote">":"io.debezium.server.BaseChangeConsumer","method":"getBytes","line":77},{"class<span class="code-quote">":"io.debezium.server.rabbitmq.RabbitMqStreamChangeConsumer","method":"handleBatch","line":116},{"class<span class="code-quote">":"io.debezium.embedded.ConvertingEngineBuilder","method":"lambda$notifying$2","line":101},{"class<span class="code-quote">":"io.debezium.embedded.EmbeddedEngine","method":"run","line":912},{"class<span class="code-quote">":"io.debezium.embedded.ConvertingEngineBuilder$2","method":"run","line":229},{"class<span class="code-quote">":"io.debezium.server.DebeziumServer","method":"lambda$start$1","line":170},{"class<span class="code-quote">":"java.util.concurrent.ThreadPoolExecutor","method":"runWorker","line":1128},{"class<span class="code-quote">":"java.util.concurrent.ThreadPoolExecutor$Worker","method":"run","line":628},{"class<span class="code-quote">":"java.lang.Thread","method":"run","line":829}]}} debezium-server | {"timestamp":"2023-07-19T21:12:31.33Z","sequence":206,"loggerClassName":"org.slf4j.impl.Slf4jLogger","loggerName":"io.debezium.server.DebeziumServer","level":"INFO","message":"Received request to stop the engine","threadName":"main","threadId":1,"mdc":{},"ndc":"","hostName":"a618e1630e3a","processName":"io.debezium.server.Main","processId":1} debezium-server | {"timestamp":"2023-07-19T21:12:31.331Z","sequence":207,"loggerClassName":"org.slf4j.impl.Slf4jLogger","loggerName":"io.debezium.embedded.EmbeddedEngine","level":"INFO","message":"Stopping the embedded engine","threadName":"main","threadId":1,"mdc":{},"ndc":"","hostName":"a618e1630e3a","processName":"io.debezium.server.Main","processId":1} debezium-server | {"timestamp":"2023-07-19T21:12:31.735Z","sequence":208,"loggerClassName":"org.jboss.logging.Logger","loggerName":"io.quarkus","level":"INFO","message":"debezium-server-dist stopped in 0.734s","threadName":"main","threadId":1,"mdc":{},"ndc":"","hostName":"a618e1630e3a","processName":"io.debezium.server.Main","processId":1} debezium-server exited with code 1  

      What Debezium connector do you use and what version?

      Debezium Server 2.3 and 2.2 (docker container)

      What is the connector configuration?

       

      $ root@rc:~/debezium# cat conf/application.properties
      debezium.sink.type=rabbitmq
      debezium.sink.rabbitmq.connection.host=rabbitmqhost
      debezium.sink.rabbitmq.connection.port=5672
      debezium.sink.rabbitmq.connection.username=root
      debezium.sink.rabbitmq.connection.password=root
      debezium.sink.rabbitmq.connection.virtual.host=vhost
      debezium.sink.rabbitmq.connection.port=5672
      debezium.sink.rabbitmq.routingKey=inventory_customers
      debezium.source.connector.class=io.debezium.connector.postgresql.PostgresConnector
      debezium.source.offset.storage.file.filename=data/offsets.dat
      debezium.source.offset.flush.interval.ms=0
      debezium.source.database.hostname=postgres
      debezium.source.database.port=5432
      debezium.source.database.user=postgres
      debezium.source.database.password=postgres
      debezium.source.database.dbname=postgres
      debezium.source.topic.prefix=tutorial
      debezium.source.table.include.list=inventory.customers
      debezium.source.plugin.name=pgoutput

       

      What is the captured database version and mode of depoyment?

       

      PostgreSQL 15 (docker container)

      How to reproduce the issue using our tutorial deployment?

       

       
      $ cat docker-compose.yml
      version: "3.9"
      services:
        postgres:
          image: quay.io/debezium/example-postgres:2.1
          container_name: postgres
          ports:
            - 5432:5432
          environment:
            - POSTGRES_USER=postgres
            - POSTGRES_PASSWORD=postgres
        debezium-server:
          image: quay.io/debezium/server:2.4
          container_name: debezium-server
          ports:
            - 8080:8080
          volumes:
            - ./conf:/debezium/conf
          depends_on:
            - postgres

       |

       

      The error / bug occurs when we UPDATE or DELETE on the source database PostgreSQL

       

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

      CDC - through RabbitMQ  / Source database: PostgreSQL

              Unassigned Unassigned
              ahmedrachidhazourli@yahoo.fr Ahmed Rachid Hazourli (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: