Kafka Kafka Maker 2日志记录WARN消息TopicallstsException

qni6mghb  于 2023-11-16  发布在  Apache
关注(0)|答案(1)|浏览(130)

我正在运行KafMaker 2,在两个Kafka集群之间复制数据。启动服务后,等待一段时间后,connect.logs针对每个主题包含多条警告消息,如下所示:

[2023-06-19 03:00:16,712] WARN [MirrorSourceConnector|worker] Could not create topic trigger_process. (org.apache.kafka.connect.mirror.MirrorSourceConnector:381)
java.util.concurrent.CompletionException: org.apache.kafka.common.errors.TopicExistsException: Topic 'test_topic' already exists.
        at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:331)
        at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:346)
        at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:632)
        at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
        at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2088)
        at org.apache.kafka.common.internals.KafkaCompletableFuture.kafkaCompleteExceptionally(KafkaCompletableFuture.java:49)
        at org.apache.kafka.common.internals.KafkaFutureImpl.completeExceptionally(KafkaFutureImpl.java:130)
        at org.apache.kafka.clients.admin.KafkaAdminClient$1.handleResponse(KafkaAdminClient.java:1629)
        at org.apache.kafka.clients.admin.KafkaAdminClient$AdminClientRunnable.handleResponses(KafkaAdminClient.java:1268)
        at org.apache.kafka.clients.admin.KafkaAdminClient$AdminClientRunnable.processRequests(KafkaAdminClient.java:1421)
        at org.apache.kafka.clients.admin.KafkaAdminClient$AdminClientRunnable.run(KafkaAdminClient.java:1344)
        at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: org.apache.kafka.common.errors.TopicExistsException: Topic 'test_topic' already exists.

字符串
这是一个预期的日志语句吗?我可以做些什么来避免它们吗?
我不希望日志文件充斥着上面的异常,我不确定这是否是预期的。

wvt8vs2t

wvt8vs2t1#

对于那些有这个问题的人..在运行mirrormaker之前,你必须设置以下ACL(我使用了命令配置参数bcoz,因为我使用的是sasl/scram):

./kafka-acls.sh \
  --bootstrap-server ${brokers} \
  --add \
  --allow-principal User:master \
  --operation All \
  --topic=* group=* \
  --command-config $USER_HOME/toolbox/kafka_2.12-3.3.1/config/connector.properties

字符串

相关问题