Likely this is due to Step 14 command being incomplete. It should be:
confluent kafka client-config create java --api-key <KAFKA API KEY> --api-secret <KAFKA SECRET> --schema-registry-api-key <SR API KEY> --schema-registry-api-secret <SR SECRET>
Before starting the containers, double check that the following environment variables referenced in docker-compose.yml are populated with your credentials:
I followed the instructions and generated a new java.config file. It was the same as the one i have before.
Checked the env variables and they are correct. The problem persisted
Then pocking around files i noticed the following in the file connect-ccloud.delta
replication.factor=3
config.storage.replication.factor=3
offset.storage.replication.factor=3
status.storage.replication.factor=3
I changed similar variables in the doker compose file to have the same value:
CONNECT_REPLICATION_FACTOR: 3
CONNECT_CONFIG_STORAGE_REPLICATION_FACTOR: 3
CONNECT_OFFSET_STORAGE_REPLICATION_FACTOR: 3
CONNECT_STATUS_STORAGE_REPLICATION_FACTOR: 3
then re-started my container and my connect worker started successfully. I can see the connect compacted topics created in the confluent cloud cluster.
It worked but is still not clear for me why. What was the problem?
That’s odd – I’m not sure. If you stop the container and go back to replication factor 1, does it fail with the auth exception?
The original docker compose starts up ok on my end, that’s why I thought it was an environment variable problem.
If the container starts up ok if you go back to replication factor 1, maybe the exception was due to credentials not having propagated. How long was it between creating API keys and starting the Connect worker container?
Yes it is odd.
I put the replication factors back to 1 i was able to reproduce the problem but now i get better error messages:
2023-10-27 15:21:58 Running in a “–no-prompt” mode
2023-10-27 15:22:04 javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
2023-10-27 15:22:04
2023-10-27 15:22:04 Error: Unknown error
2023-10-27 15:22:04 Launching Kafka Connect worker
2023-10-27 15:24:22 [2023-10-27 19:24:22,042] ERROR [Worker clientId=connect-1, groupId=lil_kc101-connect] Uncaught exception in herder work thread, exiting: (org.apache.kafka.connect.runtime.distributed.DistributedHerder:376)
2023-10-27 15:24:22 org.apache.kafka.connect.errors.ConnectException: Error while attempting to create/find topic(s) ‘lil_kc101-connect-offsets’
2023-10-27 15:24:22 Caused by: org.apache.kafka.common.errors.PolicyViolationException: Topic replication factor must be 3
Change then back to 3 it is back to working.
I can continue working on setting a Splunk Sink connector