conduktor.io ↗

Kafka Exception AlreadyExistsException

org.apache.kafka.connect.errors.AlreadyExistsException
Non-retriable Connect

Indicates the operation tried to create an entity that already exists.

Common Causes

Solutions

Example Stack Trace

org.apache.kafka.connect.errors.AlreadyExistsException: Connector my-jdbc-source already exists at org.apache.kafka.connect.runtime.distributed.DistributedHerder.lambda$putConnectorConfig$8(DistributedHerder.java:1023) at org.apache.kafka.connect.runtime.distributed.DistributedHerder.tick(DistributedHerder.java:475) at org.apache.kafka.connect.runtime.distributed.DistributedHerder.run(DistributedHerder.java:380) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)

Diagnostic Commands

curl -s http://localhost:8083/connectors | jq . # list existing connector names before creating curl -i -X PUT -H 'Content-Type: application/json' --data @config.json http://localhost:8083/connectors/my-jdbc-source/config # idempotent create-or-update curl -s -o /dev/null -w '%{http_code}\n' http://localhost:8083/connectors/my-jdbc-source # 200=exists, 404=safe to POST

Related

Related Connect exceptions: ConnectException · DataException · IllegalWorkerStateException · NotFoundException · SchemaBuilderException · SchemaProjectorException

Hitting AlreadyExistsException in production? Conduktor Console gives you real-time visibility into clients, consumer groups, and broker health. Browse every Kafka exception or protocol error code.