I am turning to this channel for help as I am stuck!
My configuration:
{ "name":"MongoSink", "config": { "topics":"piaragraphed_content", "connector.class":"com.mongodb.kafka.connect.MongoSinkConnector", "tasks.max":1, "connection.uri":"mongodb+srv://username:password@10.1.3.23:27017", "database":"my_database", "collection":"paragraphed_content", "max.num.retries":2, "retries.defer.timeout":5000, "key.projection.type":"none", "value.projection.type":"none", "document.id.strategy":"com.mongodb.kafka.connect.sink.processor.id.strategy.BsonOidStrategy", "post.processor.chain":"com.mongodb.kafka.connect.sink.processor.DocumentIdAdder", "delete.on.null.values":true, "confluent.topic.security.protocol":"PLAINTEXT" } }
My configuration also contains the configuration suggested in https://developer.mongodb.com/community/forums/t/nullpointer-exception-when-creating-kafka-sink-connector/11596[https://developer.mongodb.com/community/forums/t/nullpointer-exception-when-creating-kafka-sink-connector/11596] but I still get the error.
My curl command:
curl -X POST -H "Content-Type: application/json" --data @mongo.json http://localhost:8084/connectors
Here is more on the error I am getting
[2021-03-04 11:56:17,470] INFO Started o.e.j.s.ServletContextHandler@5539f9de{/,null,AVAILABLE} (org.eclipse.jetty.server.handler.ContextHandler:916) [2021-03-04 11:56:17,470] INFO REST resources initialized; server is started and ready to handle requests (org.apache.kafka.connect.runtime.rest.RestServer:324) [2021-03-04 11:56:17,470] INFO Kafka Connect started (org.apache.kafka.connect.runtime.Connect:57) [2021-03-04 11:56:17,658] INFO [Worker clientId=connect-1, groupId=connect-cluster] Successfully joined group with generation Generation{generationId=4, memberId='connect-1-6f2cbf74-cb96-4af2-9f56-7908a9801f1e', protocol='sessioned'} (org.apache.kafka.clients.consumer.internals.AbstractCoordinator:596) [2021-03-04 11:56:17,664] INFO [Worker clientId=connect-1, groupId=connect-cluster] Successfully synced group in generation Generation{generationId=4, memberId='connect-1-6f2cbf74-cb96-4af2-9f56-7908a9801f1e', protocol='sessioned'} (org.apache.kafka.clients.consumer.internals.AbstractCoordinator:756) [2021-03-04 11:56:17,665] DEBUG [Worker clientId=connect-1, groupId=connect-cluster] Deserialized new assignment: Assignment{error=0, leader='connect-1-4aa19230-0604-44e6-b6ad-4a6827063683', leaderUrl='http://127.0.1.1:8083/', offset=109, connectorIds=[], taskIds=[], revokedConnectorIds=[], revokedTaskIds=[], delay=0} (org.apache.kafka.connect.runtime.distributed.WorkerCoordinator:189) [2021-03-04 11:56:17,666] DEBUG [Worker clientId=connect-1, groupId=connect-cluster] Augmented new assignment: Assignment{error=0, leader='connect-1-4aa19230-0604-44e6-b6ad-4a6827063683', leaderUrl='http://127.0.1.1:8083/', offset=109, connectorIds=[], taskIds=[], revokedConnectorIds=[], revokedTaskIds=[], delay=0} (org.apache.kafka.connect.runtime.distributed.WorkerCoordinator:209) [2021-03-04 11:56:17,666] INFO [Worker clientId=connect-1, groupId=connect-cluster] Joined group at generation 4 with protocol version 2 and got assignment: Assignment{error=0, leader='connect-1-4aa19230-0604-44e6-b6ad-4a6827063683', leaderUrl='http://127.0.1.1:8083/', offset=109, connectorIds=[], taskIds=[], revokedConnectorIds=[], revokedTaskIds=[], delay=0} with rebalance delay: 0 (org.apache.kafka.connect.runtime.distributed.DistributedHerder:1689) [2021-03-04 11:56:17,667] DEBUG [Worker clientId=connect-1, groupId=connect-cluster] Ensuring group membership is still active (org.apache.kafka.connect.runtime.distributed.DistributedHerder:328) [2021-03-04 11:56:17,667] DEBUG [Worker clientId=connect-1, groupId=connect-cluster] Handling completed but unresolved rebalance (org.apache.kafka.connect.runtime.distributed.DistributedHerder:1067) [2021-03-04 11:56:17,667] WARN [Worker clientId=connect-1, groupId=connect-cluster] Catching up to assignment's config offset. (org.apache.kafka.connect.runtime.distributed.DistributedHerder:1095) [2021-03-04 11:56:17,667] INFO [Worker clientId=connect-1, groupId=connect-cluster] Current config state offset -1 is behind group assignment 109, reading to end of config log (org.apache.kafka.connect.runtime.distributed.DistributedHerder:1158) [2021-03-04 11:56:17,938] INFO [Worker clientId=connect-1, groupId=connect-cluster] Finished reading to end of log and updated config snapshot, new config log offset: 109 (org.apache.kafka.connect.runtime.distributed.DistributedHerder:1162) [2021-03-04 11:56:17,938] INFO [Worker clientId=connect-1, groupId=connect-cluster] Starting connectors and tasks using config offset 109 (org.apache.kafka.connect.runtime.distributed.DistributedHerder:1216) [2021-03-04 11:56:17,939] DEBUG [Worker clientId=connect-1, groupId=connect-cluster] Received assignment: Assignment{error=0, leader='connect-1-4aa19230-0604-44e6-b6ad-4a6827063683', leaderUrl='http://127.0.1.1:8083/', offset=109, connectorIds=[], taskIds=[], revokedConnectorIds=[], revokedTaskIds=[], delay=0} (org.apache.kafka.connect.runtime.distributed.DistributedHerder:1217) [2021-03-04 11:56:17,939] DEBUG [Worker clientId=connect-1, groupId=connect-cluster] Currently running assignment: Assignment{error=0, leader='null', leaderUrl='null', offset=-1, connectorIds=[], taskIds=[], revokedConnectorIds=[], revokedTaskIds=[], delay=0} (org.apache.kafka.connect.runtime.distributed.DistributedHerder:1218) [2021-03-04 11:56:17,939] DEBUG [Worker clientId=connect-1, groupId=connect-cluster] Tasks to restart from currently running assignment: [] (org.apache.kafka.connect.runtime.distributed.DistributedHerder:1228) [2021-03-04 11:56:17,939] INFO [Worker clientId=connect-1, groupId=connect-cluster] Finished starting connectors and tasks (org.apache.kafka.connect.runtime.distributed.DistributedHerder:1244) [2021-03-04 11:56:25,694] DEBUG [Worker clientId=connect-1, groupId=connect-cluster] Ensuring group membership is still active (org.apache.kafka.connect.runtime.distributed.DistributedHerder:328) [2021-03-04 11:56:25,698] DEBUG Getting plugin class loader: 'PluginClassLoader{pluginLocation=file:/usr/share/confluent-hub-components/mongodb-kafka-connect-mongodb/}' for connector: com.mongodb.kafka.connect.MongoSinkConnector (org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader:172) [2021-03-04 11:56:25,742] DEBUG Found 0 injected Confluent license properties from validation results for connector 'MongoSink' (org.apache.kafka.connect.runtime.WorkerConfigDecorator:440) [2021-03-04 11:56:25,742] INFO AbstractConfig values: (org.apache.kafka.common.config.AbstractConfig:361) [2021-03-04 11:56:25,744] DEBUG [Worker clientId=connect-1, groupId=connect-cluster] Ensuring group membership is still active (org.apache.kafka.connect.runtime.distributed.DistributedHerder:328) [2021-03-04 11:56:25,754] DEBUG Uncaught exception in REST call to /connectors (org.apache.kafka.connect.runtime.rest.errors.ConnectExceptionMapper:39) java.lang.NullPointerException at org.apache.kafka.connect.runtime.AbstractHerder.maybeAddConfigErrors(AbstractHerder.java:609) at org.apache.kafka.connect.runtime.distributed.DistributedHerder.access$600(DistributedHerder.java:128) at org.apache.kafka.connect.runtime.distributed.DistributedHerder$4$1.call(DistributedHerder.java:829) at org.apache.kafka.connect.runtime.distributed.DistributedHerder$4$1.call(DistributedHerder.java:826) at org.apache.kafka.connect.runtime.distributed.DistributedHerder.tick(DistributedHerder.java:371) at org.apache.kafka.connect.runtime.distributed.DistributedHerder.run(DistributedHerder.java:295) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)
- is duplicated by
-
KAFKA-204 Uncaught exception in REST call to /connectors when starting a sink connector (java.lang.NullPointerException)
- Closed