3

How do I override the PLUGIN_PATH correctly so that after starting docker I can add an external connector? /home/madmin/connectorf - path on my PC with jar - connector CONNECT_PLUGIN_PATH - default variable by confluent Thanks for answers.

      CONNECT_PLUGIN_PATH: "/usr/share/java,/usr/share/confluent-hub-components"
      volumes: -/home/madmin/connectorf:/usr/share/java

1 Answer 1

6

You don't want to mount your local connectors over the existing /usr/share/java folder. Try this instead:

    CONNECT_PLUGIN_PATH: "/usr/share/java,/usr/share/confluent-hub-components,/usr/share/local-connectors" 
volumes: -/home/madmin/connectorf:/usr/share/local-connectors

Remember that connectors need to be present before the worker starts up; you can't set the local path and then add new ones once it's started running.

Another option is to install them in the container directly, like this

    command: 
      - bash 
      - -c 
      - |
        confluent-hub install --no-prompt confluentinc/kafka-connect-elasticsearch:11.0.0
        #
        echo "Launching Kafka Connect worker"
        /etc/confluent/docker/run & 
        #
        sleep infinity
Sign up to request clarification or add additional context in comments.

3 Comments

Maybe I have another version of image. I didn`t find this folder on my docker /usr/share/local-connectors
That's the point; /usr/share exists, and the volume command mounts the local folder into /usr/share/local-connectors.
If this answered your question then please make sure you mark it as such so that others can find it more easily :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.