[ 
https://issues.apache.org/jira/browse/KAFKA-17808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17932554#comment-17932554
 ] 

Jhen-Yung Hsu commented on KAFKA-17808:
---------------------------------------

[~ignat233] Could you provide the steps to reproduce the error `Error 
registering AppInfo mbean
javax.management.InstanceAlreadyExistsException: 
kafka.admin.client:type=app-info,id=connector-dlq-adminclient-`?

This will help me verify that the fix and test case work and cover our target.


I was only able to see this message in the log with the following modification
log:
{code:java}
cat logs/connect.log| grep -ri connector-dlq-adminclient-   
logs/connect.log:       client.id = connector-dlq-adminclient-
logs/connect.log:       client.id = connector-dlq-adminclient-
logs/connect.log:[2025-03-05 03:51:55,766] INFO [local-file-sink|task-1] The 
mbean of App info: [kafka.admin.client], id: [connector-dlq-adminclient-] 
already exists, so skipping a new mbean creation. 
(org.apache.kafka.common.utils.AppInfoParser:66)
logs/connect.log:[2025-03-05 03:51:55,768] INFO App info kafka.admin.client for 
connector-dlq-adminclient- unregistered 
(org.apache.kafka.common.utils.AppInfoParser:89)
logs/connect.log:[2025-03-05 03:51:55,770] INFO App info kafka.admin.client for 
connector-dlq-adminclient- unregistered 
(org.apache.kafka.common.utils.AppInfoParser:89) {code}
 

 
config/connect-file-sink.properties (enabling dlq):
 
{code:java}
name=local-file-sink
connector.class=FileStreamSink
-tasks.max=1
+tasks.max=2
file=test.sink.txt
topics=connect-test

+errors.deadletterqueue.topic.name=dlq-topic
+errors.deadletterqueue.context.headers.enable=true
+errors.deadletterqueue.topic.replication.factor=1
+errors.tolerance=all {code}
 


Then, running:

{code:java}
bin/connect-standalone.sh config/connect-standalone.properties 
config/connect-file-sink.properties{code}



 

> InstanceAlreadyExistsException: 
> kafka.admin.client:type=app-info,id=connector-dlq-adminclient- when add 
> connector with tasks
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-17808
>                 URL: https://issues.apache.org/jira/browse/KAFKA-17808
>             Project: Kafka
>          Issue Type: Bug
>          Components: connect
>            Reporter: ignat233
>            Assignee: Jhen-Yung Hsu
>            Priority: Major
>         Attachments: image-2024-10-16-13-00-36-667.png
>
>
> Why do we always create an admin client with the same 
> "connector-dlq-adminclient-" value id?
> [https://github.com/apache/kafka/blob/trunk/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/Worker.java#L1008]
> For all other cases, a postfix is ​​added.
> !image-2024-10-16-13-00-36-667.png! 
>  I get "Error registering AppInfo mbean
> javax.management.InstanceAlreadyExistsException: 
> kafka.admin.client:type=app-info,id=connector-dlq-adminclient-." error for 
> all tasks.
> It looks like the ConnectorTaskId should be added.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to