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

Connector fails to load on M1 Mac in Docker container

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not a Bug
    • Major
    • None
    • 1.4.0.Final
    • postgresql-connector
    • None
    • False
    • False
    • Undefined
    • Hide

      Running an M1 Mac with macOS Big Sur 11.2.3 and Docker 3.3.3 (64133).

      Create a network, and run the confluentinc/cp-zookeeper:6.1.1 image with the supplied "zookeeper.env" file for environment variables:

      $ docker network create --driver bridge my_network
      $ docker run --platform="linux/amd64" -p "2181:2181" --name="zookeeper" --env-file=zookeeper.env --network=my_network confluentinc/cp-zookeeper:6.1.1
      

      Run the confluentinc/cp-kafka:6.1.1 image with the supplied "broker.env" file for environment variables:

      $ docker run -p "29092:29092" -p "9092:9092" -p "9101:9101" --platform="linux/amd64" --name="broker" --env-file=broker.env --network=my_network confluentinc/cp-kafka:6.1.1
      

      Build a Docker image from the "Dockerfile" attached which uses the base confluentinc/cp-kafka-connect:6.1.1. This image will install debezium-connector-postgresql:1.4.0 from Confluent Hub. Run it with the supplied "connect.env" file for environment variables:

      $ docker build . --platform='linux/amd64' -t 'connect'
      $ docker run -p "8083:8083" --platform="linux/amd64" --name="connect" --env-file=connect.env --network=my_network connect 
      
      Show
      Running an M1 Mac with macOS Big Sur 11.2.3 and Docker 3.3.3 (64133). Create a network, and run the confluentinc/cp-zookeeper:6.1.1 image with the supplied "zookeeper.env" file for environment variables: $ docker network create --driver bridge my_network $ docker run --platform= "linux/amd64" -p "2181:2181" --name= "zookeeper" --env-file=zookeeper.env --network=my_network confluentinc/cp-zookeeper:6.1.1 Run the confluentinc/cp-kafka:6.1.1 image with the supplied "broker.env" file for environment variables: $ docker run -p "29092:29092" -p "9092:9092" -p "9101:9101" --platform= "linux/amd64" --name= "broker" --env-file=broker.env --network=my_network confluentinc/cp-kafka:6.1.1 Build a Docker image from the "Dockerfile" attached which uses the base confluentinc/cp-kafka-connect:6.1.1 . This image will install debezium-connector-postgresql:1.4.0 from Confluent Hub. Run it with the supplied "connect.env" file for environment variables: $ docker build . --platform= 'linux/amd64' -t 'connect' $ docker run -p "8083:8083" --platform= "linux/amd64" --name= "connect" --env-file=connect.env --network=my_network connect

    Description

      We are using the postgresql connector installed from the Confluent Hub under a Docker container running the confluentinc/cp-kafka-connect:6.1.1 image.

      When the plugin is loaded, the connector fails to load, raised by loadProperties in IoUtil:

       

      [2021-06-04 09:04:27,583] INFO Loading plugin from: /usr/share/confluent-hub-components/debezium-debezium-connector-postgresql (org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader)
      [2021-06-04 09:04:28,100] ERROR Stopping due to error (org.apache.kafka.connect.cli.ConnectDistributed)
      java.lang.ExceptionInInitializerError
      	at io.debezium.connector.postgresql.PostgresConnector.version(PostgresConnector.java:47)
      	at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.versionFor(DelegatingClassLoader.java:390)
      	at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.versionFor(DelegatingClassLoader.java:395)
      	at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.getPluginDesc(DelegatingClassLoader.java:365)
      	at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.scanPluginPath(DelegatingClassLoader.java:337)
      	at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.scanUrlsAndAddPlugins(DelegatingClassLoader.java:268)
      	at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.registerPlugin(DelegatingClassLoader.java:260)
      	at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.initPluginLoader(DelegatingClassLoader.java:229)
      	at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.initLoaders(DelegatingClassLoader.java:206)
      	at org.apache.kafka.connect.runtime.isolation.Plugins.<init>(Plugins.java:61)
      	at org.apache.kafka.connect.cli.ConnectDistributed.startConnect(ConnectDistributed.java:93)
      	at org.apache.kafka.connect.cli.ConnectDistributed.main(ConnectDistributed.java:80)
      Caused by: java.lang.NullPointerException: inStream parameter is null
      	at java.base/java.util.Objects.requireNonNull(Objects.java:246)
      	at java.base/java.util.Properties.load(Properties.java:406)
      	at io.debezium.util.IoUtil.loadProperties(IoUtil.java:491)
      	at io.debezium.util.IoUtil.loadProperties(IoUtil.java:521)
      	at io.debezium.connector.postgresql.Module.<clinit>(Module.java:19)
      

       

       

      Attachments

        1. broker.env
          0.4 kB
        2. connect.env
          0.8 kB
        3. Dockerfile
          0.1 kB
        4. zookeeper.env
          0.1 kB

        Activity

          People

            Unassigned Unassigned
            alexcu2 Alex Cummaudo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: