We have source cluster with security protocol SASL_SSL and target cluster without any authorization. Just PLAINTEXT. MirrorMaker2 in kafka conenct mode writes messages about connection problem:
INFO [AdminClient clientId=src->tgt|my_mm2_connector|replication-source-admin] Cancelled in-flight API_VERSIONS request with correlation id 0 due to node -1 being disconnected (elapsed time since creation: 334ms, elapsed time since send: 334ms, request timeout: 3600000ms) (org.apache.kafka.clients.NetworkClient:344)
I've noticed two different AdminClientConfigs in logs:
- client.id = src->tgt|my_mm2_connector|offset-syncs-target-admin that connects to kafka_plaintext:9092 bootstrap server
- client.id = src->tgt|my_mm2_connector|replication-source-admin that connects to kafa_sasl_ssl:9092 bootstrap server
Both of them was created with security.protocol=PLAINTEXT. If I change admin.security.protocol to SASL_SSL It will affect on both AdminClientConfigs as well.
Does in possible to replicate topics between secured and unsecured kafka ?
Here is my mm2 config:
{
"name": "my_mm2_connector",
"config": {
"connector.class": "org.apache.kafka.connect.mirror.MirrorSourceConnector",
"source.cluster.alias": "src",
"target.cluster.alias": "tgt",
"source.cluster.bootstrap.servers": "kafa_sasl_ssl:9092",
"target.cluster.bootstrap.servers": "kafka_plaintext:9092",
"topics": "test_topic",
"tasks.max": 1,
"replication.factor": 1,
"offset-syncs.topic.replication.factor": 1,
"offset-syncs.topic.location": "target",
"enabled": true,
"source.security.protocol": "SASL_SSL",
"source.ssl.keystore.type": "JKS",
"source.ssl.truststore.type": "JKS",
"source.ssl.truststore.location": "/opt/ssl/kafka.truststore.jks",
"source.ssl.keystore.password": "changeit",
"source.ssl.keystore.location": "/opt/ssl/kafka.keystore.jks",
"source.ssl.truststore.password": "changeit",
"source.sasl.mechanism": "PLAIN",
"source.sasl.jaas.config": "org.apache.kafka.common.security.plain.PlainLoginModule required username=\"kafka\" password=\"kafka-password\"",
"target.security.protocol": "PLAINTEXT",
"admin.security.protocol": "PLAINTEXT"
}
}