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

Unable to run debezium images

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Blocker
    • None
    • 1.8.0.Final
    • container-images
    • None
    • False
    • False
    • Hide

      Following the tutorial present here https://debezium.io/documentation/reference/tutorial.html

      I've started zookeper using this command:

      docker run -it --rm --name zookeeper -p 2181:2181 -p 2888:2888 -p 3888:3888 debezium/zookeeper:1.8
      

      It fails with

      Error: Could not find or load main class org.apache.zookeeper.server.quorum.QuorumPeerMain
      Caused by: java.lang.ClassNotFoundException: org.apache.zookeeper.server.quorum.QuorumPeerMain
      

      Next I've started kafka without the zookeeper link (because it has failed to create the previous container) just to check the failing behavior

      docker run -it --rm --name kafka -p 9092:9092 debezium/kafka:1.8
      

      It fails with a Java class not found

      Error: Could not find or load main class kafka.Kafka
      Caused by: java.lang.ClassNotFoundException: kafka.Kafka
      

      Next I've started connect without the zookeeper and kafka links

      docker run -it --rm --name connect -p 8083:8083 -e GROUP_ID=1 -e CONFIG_STORAGE_TOPIC=my_connect_configs -e OFFSET_STORAGE_TOPIC=my_connect_offsets -e STATUS_STORAGE_TOPIC=my_connect_statuses debezium/connect:1.8
      

      It fails with a Java class not found

      Error: Could not find or load main class org.apache.kafka.connect.cli.ConnectDistributed
      Caused by: java.lang.ClassNotFoundException: org.apache.kafka.connect.cli.ConnectDistributed
      

      Moreover I have followed this tutorial too https://debezium.io/blog/2021/08/31/going-zookeeperless-with-debezium-container-image-for-apache-kafka/ using version 1.8 with this docker-compose.yml:

      version: '2'
      services: 
        kafka-1:
          image: debezium/kafka:1.8
          ports: 
            - 19092:9092
            - 19093:9093
          environment: 
            - CLUSTER_ID=5Yr1SIgYQz-b-dgRabWx4g
            - BROKER_ID=1
            - KAFKA_CONTROLLER_QUORUM_VOTERS=1@kafka-1:9093,2@kafka-2:9093,3@kafka-3:9093
        kafka-2:
          image: debezium/kafka:1.8
          ports: 
            - 29092:9092
            - 29093:9093
          environment: 
            - CLUSTER_ID=5Yr1SIgYQz-b-dgRabWx4g
            - BROKER_ID=2
            - KAFKA_CONTROLLER_QUORUM_VOTERS=1@kafka-1:9093,2@kafka-2:9093,3@kafka-3:9093
        kafka-3:
          image: debezium/kafka:1.8
          ports: 
            - 39092:9092
            - 39093:9093
          environment: 
            - CLUSTER_ID=5Yr1SIgYQz-b-dgRabWx4g
            - BROKER_ID=3
            - KAFKA_CONTROLLER_QUORUM_VOTERS=1@kafka-1:9093,2@kafka-2:9093,3@kafka-3:9093
      

      running it with `docker-compose up`
      it fails too with theses errors

      Caused by: java.lang.ClassNotFoundException: kafka.tools.StorageTool
      

      Here is all logs

      kafka-3_1  | WARNING: Using NODE_ID=3, as specified via BROKER_ID variable. Please update your configuration to use the NODE_ID variable instead.
      kafka-1_1  | WARNING: Using NODE_ID=1, as specified via BROKER_ID variable. Please update your configuration to use the NODE_ID variable instead.
      kafka-3_1  | Starting in KRaft mode (EXPERIMENTAL), using CLUSTER_ID=5Yr1SIgYQz-b-dgRabWx4g, NODE_ID=3 and NODE_ROLE=combined.
      kafka-3_1  | Using configuration config/kraft/server.properties.
      kafka-1_1  | Starting in KRaft mode (EXPERIMENTAL), using CLUSTER_ID=5Yr1SIgYQz-b-dgRabWx4g, NODE_ID=1 and NODE_ROLE=combined.
      kafka-1_1  | Using configuration config/kraft/server.properties.
      kafka-3_1  | Using KAFKA_LISTENERS=PLAINTEXT://192.168.16.2:9092,CONTROLLER://192.168.16.2:9093 and KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://192.168.16.2:9092
      kafka-1_1  | Using KAFKA_LISTENERS=PLAINTEXT://192.168.16.4:9092,CONTROLLER://192.168.16.4:9093 and KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://192.168.16.4:9092
      kafka-2_1  | WARNING: Using NODE_ID=2, as specified via BROKER_ID variable. Please update your configuration to use the NODE_ID variable instead.
      kafka-3_1  | No meta.properties found in /kafka/data/3; going to format the directory
      kafka-2_1  | Starting in KRaft mode (EXPERIMENTAL), using CLUSTER_ID=5Yr1SIgYQz-b-dgRabWx4g, NODE_ID=2 and NODE_ROLE=combined.
      kafka-2_1  | Using configuration config/kraft/server.properties.
      kafka-2_1  | Using KAFKA_LISTENERS=PLAINTEXT://192.168.16.3:9092,CONTROLLER://192.168.16.3:9093 and KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://192.168.16.3:9092
      kafka-1_1  | No meta.properties found in /kafka/data/1; going to format the directory
      kafka-2_1  | No meta.properties found in /kafka/data/2; going to format the directory
      kafka-3_1  | Error: Could not find or load main class kafka.tools.StorageTool
      kafka-3_1  | Caused by: java.lang.ClassNotFoundException: kafka.tools.StorageTool
      kafka-1_1  | Error: Could not find or load main class kafka.tools.StorageTool
      kafka-1_1  | Caused by: java.lang.ClassNotFoundException: kafka.tools.StorageTool
      kafka-2_1  | Error: Could not find or load main class kafka.tools.StorageTool
      kafka-2_1  | Caused by: java.lang.ClassNotFoundException: kafka.tools.StorageTool
      kafka_kafka-3_1 exited with code 1
      kafka_kafka-1_1 exited with code 1
      kafka_kafka-2_1 exited with code 1
      
      Show
      Following the tutorial present here https://debezium.io/documentation/reference/tutorial.html I've started zookeper using this command: docker run -it --rm --name zookeeper -p 2181:2181 -p 2888:2888 -p 3888:3888 debezium/zookeeper:1.8 It fails with Error: Could not find or load main class org.apache.zookeeper.server.quorum.QuorumPeerMain Caused by: java.lang.ClassNotFoundException: org.apache.zookeeper.server.quorum.QuorumPeerMain Next I've started kafka without the zookeeper link (because it has failed to create the previous container) just to check the failing behavior docker run -it --rm --name kafka -p 9092:9092 debezium/kafka:1.8 It fails with a Java class not found Error: Could not find or load main class kafka.Kafka Caused by: java.lang.ClassNotFoundException: kafka.Kafka Next I've started connect without the zookeeper and kafka links docker run -it --rm --name connect -p 8083:8083 -e GROUP_ID=1 -e CONFIG_STORAGE_TOPIC=my_connect_configs -e OFFSET_STORAGE_TOPIC=my_connect_offsets -e STATUS_STORAGE_TOPIC=my_connect_statuses debezium/connect:1.8 It fails with a Java class not found Error: Could not find or load main class org.apache.kafka.connect.cli.ConnectDistributed Caused by: java.lang.ClassNotFoundException: org.apache.kafka.connect.cli.ConnectDistributed Moreover I have followed this tutorial too https://debezium.io/blog/2021/08/31/going-zookeeperless-with-debezium-container-image-for-apache-kafka/ using version 1.8 with this docker-compose.yml: version: ' 2 ' services: kafka- 1 : image: debezium/kafka: 1 . 8 ports: - 19092 : 9092 - 19093 : 9093 environment: - CLUSTER_ID= 5 Yr 1 SIgYQz-b-dgRabWx 4 g - BROKER_ID= 1 - KAFKA_CONTROLLER_QUORUM_VOTERS= 1 @kafka- 1 : 9093 , 2 @kafka- 2 : 9093 , 3 @kafka- 3 : 9093 kafka- 2 : image: debezium/kafka: 1 . 8 ports: - 29092 : 9092 - 29093 : 9093 environment: - CLUSTER_ID= 5 Yr 1 SIgYQz-b-dgRabWx 4 g - BROKER_ID= 2 - KAFKA_CONTROLLER_QUORUM_VOTERS= 1 @kafka- 1 : 9093 , 2 @kafka- 2 : 9093 , 3 @kafka- 3 : 9093 kafka- 3 : image: debezium/kafka: 1 . 8 ports: - 39092 : 9092 - 39093 : 9093 environment: - CLUSTER_ID= 5 Yr 1 SIgYQz-b-dgRabWx 4 g - BROKER_ID= 3 - KAFKA_CONTROLLER_QUORUM_VOTERS= 1 @kafka- 1 : 9093 , 2 @kafka- 2 : 9093 , 3 @kafka- 3 : 9093 running it with `docker-compose up` it fails too with theses errors Caused by: java.lang.ClassNotFoundException: kafka.tools.StorageTool Here is all logs kafka-3_1 | WARNING: Using NODE_ID=3, as specified via BROKER_ID variable. Please update your configuration to use the NODE_ID variable instead. kafka-1_1 | WARNING: Using NODE_ID=1, as specified via BROKER_ID variable. Please update your configuration to use the NODE_ID variable instead. kafka-3_1 | Starting in KRaft mode (EXPERIMENTAL), using CLUSTER_ID=5Yr1SIgYQz-b-dgRabWx4g, NODE_ID=3 and NODE_ROLE=combined. kafka-3_1 | Using configuration config/kraft/server.properties. kafka-1_1 | Starting in KRaft mode (EXPERIMENTAL), using CLUSTER_ID=5Yr1SIgYQz-b-dgRabWx4g, NODE_ID=1 and NODE_ROLE=combined. kafka-1_1 | Using configuration config/kraft/server.properties. kafka-3_1 | Using KAFKA_LISTENERS=PLAINTEXT://192.168.16.2:9092,CONTROLLER://192.168.16.2:9093 and KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://192.168.16.2:9092 kafka-1_1 | Using KAFKA_LISTENERS=PLAINTEXT://192.168.16.4:9092,CONTROLLER://192.168.16.4:9093 and KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://192.168.16.4:9092 kafka-2_1 | WARNING: Using NODE_ID=2, as specified via BROKER_ID variable. Please update your configuration to use the NODE_ID variable instead. kafka-3_1 | No meta.properties found in /kafka/data/3; going to format the directory kafka-2_1 | Starting in KRaft mode (EXPERIMENTAL), using CLUSTER_ID=5Yr1SIgYQz-b-dgRabWx4g, NODE_ID=2 and NODE_ROLE=combined. kafka-2_1 | Using configuration config/kraft/server.properties. kafka-2_1 | Using KAFKA_LISTENERS=PLAINTEXT://192.168.16.3:9092,CONTROLLER://192.168.16.3:9093 and KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://192.168.16.3:9092 kafka-1_1 | No meta.properties found in /kafka/data/1; going to format the directory kafka-2_1 | No meta.properties found in /kafka/data/2; going to format the directory kafka-3_1 | Error: Could not find or load main class kafka.tools.StorageTool kafka-3_1 | Caused by: java.lang.ClassNotFoundException: kafka.tools.StorageTool kafka-1_1 | Error: Could not find or load main class kafka.tools.StorageTool kafka-1_1 | Caused by: java.lang.ClassNotFoundException: kafka.tools.StorageTool kafka-2_1 | Error: Could not find or load main class kafka.tools.StorageTool kafka-2_1 | Caused by: java.lang.ClassNotFoundException: kafka.tools.StorageTool kafka_kafka-3_1 exited with code 1 kafka_kafka-1_1 exited with code 1 kafka_kafka-2_1 exited with code 1

    Description

      I've tried to run debezium images without success following theses tutorials:
      https://debezium.io/documentation/reference/tutorial.html
      https://debezium.io/blog/2021/08/31/going-zookeeperless-with-debezium-container-image-for-apache-kafka/

      Each time containers fails to start following ClassNotFoundException.

      Am I the only one experiencing theses issues ?
      Could you fix them ?
      Thanks by advance.

      Regards,
      Damien

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dcdh1983 Damien Clément d'Huart (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: