简体   繁体   中英

Mongodb sink connector - Confluent hub

I have connected mongodb Kafka connector version 1.7.0 and integrated with Kafka with docker setup. I am using JAVA version 11. Here, I am getting two errors when I select the topic name it gives An unexpected error occurred: java.lang.NullPointerException error even I tried to connect my mongdb by localhost declared in connection.uri mongodb://localhost:27017 I got the error in ui window Invalid connector configuration: There is one field that requires your attention then its saying unable to connect the server.
why I am getting this error, Did I miss any configuration? I have no replicasets in mongodb should i create replicasets?

If you are running everything in Docker, then localhost is the Connect Server, not the Mongo database, and your Java version doesn't matter.

Assuming you are running Mongo in a container in Docker Compose, and the service is named mongodb , then you'd configure Connect with mongodb://mongodb:27017

More details about using Docker networking here - https://docs.docker.com/network/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM