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

Jordan Moore commented on KAFKA-7314:
-------------------------------------

The MirrorMaker documentation could be expanded on a bit, but I have also 
tested it with two instances, and it works as expected. 

What is this port for though?
{code}
-p 9094:9094 \
{code}

And this isn't necessary either, and might be the source of the issue 
{code}
-h `hostname` \
{code}

You're only running a single Kafka instance using those commands and those 
guides. Please show your config files. 

Also DNS shouldn't work from your host to the Docker network. You also don't 
need to edit any /etc/hosts file either. If you need to expose the Kafka 
advertised listener outside of the Docker network, you need to register them as 
such. 

{code}
      -p 29092:29092 \
      -e KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=" 
PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT" \
      -e 
KAFKA_ADVERTISED_LISTENERS="PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092"
{code}

The Confluent Quickstart assumes all Kafka Clients (including MirrorMaker) will 
be *within* the Docker network. 

If you try to run MirrorMaker outside of Docker with the above environment, you 
will now need to use {{localhost:29092}} to connect to this broker. You need to 
run a second Kafka container and change the port to {{29093}}, for example, 
then connect mirror the two like that. 

> MirrorMaker example in documentation does not work
> --------------------------------------------------
>
>                 Key: KAFKA-7314
>                 URL: https://issues.apache.org/jira/browse/KAFKA-7314
>             Project: Kafka
>          Issue Type: Bug
>          Components: mirrormaker
>            Reporter: John Wilkinson
>            Priority: Critical
>
> Kafka MirrorMaker as described in the documentation 
> [here|https://kafka.apache.org/documentation/#basic_ops_mirror_maker] does 
> not work. Instead of pulling messages from the consumer-defined 
> {{bootstrap.servers}} and pushing to the producer-defined 
> {{bootstrap.servers}}, it consumes and producers on the same topic on the 
> same host repeatedly.
> To replicate, set up two instances of kafka following 
> [this|https://docs.confluent.io/current/installation/docker/docs/installation/recipes/single-node-client.html]
>  guide. The schema registry and rest proxy are unnecessary. 
> [Here|https://hub.docker.com/r/confluentinc/cp-kafka/] is the DockerHub page 
> for the image.  The Kafka version is 2.0.0.
> Using those two kafka instances, go {{docker exec}} into one and set up the 
> {{consumer.properties}} and the {{producer.properties}} following the 
> MirrorMaker guide.
> Oddly, if you put in garbage unresolvable server addresses in the config, 
> there will be an error, despite the configs not getting used.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to