2

I get this problem when I'm trying to use kafka-mirror-maker.sh
By Running this command:

bin/kafka-mirror-maker.sh --consumer.config config/consumer.properties --producer.config config/producer.properties --whitelist "topicName"

Here are my configuration files:
1.producer.properties

bootstrap.servers=target_server_cluster_ips_with_kafka_port
acks=-1
linger.ms=100
batch.size=16384
retries=3
security.protocol=SASL_PLAINTEXT
sasl.mechanism=PLAIN
sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username="username" password="password";
compression.type=none

2.consumer.properties

bootstrap.servers=source_server_cluster_ips_with_kafka_port
enable.auto.commit=true
auto.offset.reset=earliest
auto.commit.interval.ms=1000
security.protocol=SASL_PLAINTEXT
sasl.mechanism=PLAIN
sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username="username" password="password";
group.id=mirror-maker-group

Apache Kafka Version Info: kafka_2.13-2.7.2
Reference Link: https://cwiki.apache.org/confluence/display/KAFKA/KIP-382%3A+MirrorMaker+2.0

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
QIAN KEQIAO
  • 541
  • 1
  • 4
  • 7
  • `kafka-mirror-maker` is for MirrorMaker1, so you have the wrong reference link. You should be using `connect-mirror.sh` - https://github.com/apache/kafka/tree/trunk/connect/mirror – OneCricketeer Jul 25 '22 at 18:08

1 Answers1

0

It's not the answer to the issue but it can solve this problem.

Later on I changed my configuration in another way, it works.

I’m doing the one direction kafka cluster sync, you can simply set T->S to true if you need both direction sync.

Please note that this is only for mirror maker 2, which means your kafka version should be kafka 2.4.0 or later.

I use command:

nohup bin/connect-mirror-maker.sh config/mirror-maker.properties > mirrormaker.nohup &

My configuration file:

    clusters = S,T
    S.bootstrap.servers = source_ip:port
    T.bootstrap.servers = target_ip:port

    topics = topic1,topic2
    groups = .*
    emit.checkpoints.interval.seconds = 10

    S->T.enabled = true
    T->S.enabled = false

    S.offset.storage.topic = S-mirrormaker2-offsets-topic
    T.offset.storage.topic = T-mirrormaker2-offsets-topic

    security.protocol=your_protocol
    sasl.mechanism=your_choice
    sasl.jaas.config=your login module with username and password
QIAN KEQIAO
  • 541
  • 1
  • 4
  • 7