Using below document to setup Mongo Kafka connector . Hit roadblock : https://www.mongodb.com/docs/kafka-connector/v1.5/tutorials/tutorial-setup/#std-label-kafka-tutorials-docker-setup
when trying to do:
docker-compose -p mongo-kafka up -d --force-recreate
it ends up throwing error :
=> ERROR [connect 2/2] RUN confluent-hub install --no-prompt --verbose mongodb/kafka-connect-mongodb:latest 129.5s
------
> [connect 2/2] RUN confluent-hub install --no-prompt --verbose mongodb/kafka-connect-mongodb:latest:
0.446 Running in a verbose mode
0.446 Running in a "--no-prompt" mode
0.519 Client's installation type is: PACKAGE
129.5 java.net.ConnectException: Connection timed out (Connection timed out)
129.5
129.5 Error: Unknown error
------
failed to solve: process "/bin/sh -c confluent-hub install --no-prompt --verbose mongodb/kafka-connect-mongodb:latest" did not complete successfully: exit code: 7
I have tried using other image on dockerhub and execute this in standalone but failed with same error :
confluent-hub install --verbose datamountaineer/kafka-connect-mongodb:latest \
--component-dir /home/sdp/dpaul/demo/kafka-config \
--worker-configs /home/sdp/dpaul/demo/kafka-config/connect-distributed.properties
confluent-hub install --verbose mongodb/kafka-connect-mongodb:1.11.1 \
--component-dir /home/sdp/dpaul/demo/kafka-config \
--worker-configs /home/sdp/dpaul/demo/kafka-config/connect-distributed.properties
the content of the connect.Dockerfile is below :
FROM confluentinc/cp-kafka-connect:7.2.5
#If you want to run a local build of the connector, uncomment the COPY command and make sure the JAR file is in the directory path
#COPY mongo-kafka-connect-<<INSERT BUILD HERE>>3-all.jar /usr/share/confluent-hub-components
RUN confluent-hub install --no-prompt --verbose mongodb/kafka-connect-mongodb:latest
#RUN confluent-hub install --no-prompt --verbose datamountaineer/kafka-connect-mongodb:latest
ENV CONNECT_PLUGIN_PATH="/usr/share/java,/usr/share/confluent-hub-components"
~