Uploaded image for project: 'AMQ Streams'
  1. AMQ Streams
  2. ENTMQST-2067

[DOC RHEL] Kafka cluster set up missing security definition of REPLICATION listener

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • 2.1.0.GA
    • 1.4.1.GA, 1.5.0.GA
    • documentation
    • None

      Currently in docs there are only following options to add into server.config
      4.5. Running a multi-node Kafka cluster

      broker.id=0
      zookeeper.connect=zoo1.my-domain.com:2181,zoo2.my-domain.com:2181,zoo3.my-domain.com:2181
      listeners=REPLICATION://:9091,PLAINTEXT://:9092
      inter.broker.listener.name=REPLICATION
      log.dirs=/var/lib/kafka
      

      This fails with following exception and needs this listener definition

      listener.security.protocol.map=REPLICATION:PLAINTEXT,PLAINTEXT:PLAINTEXT
      
      /opt/kafka/bin/kafka-server-start.sh /opt/kafka/config/server.properties
      [2020-06-18 09:17:45,741] INFO Registered kafka:type=kafka.Log4jController MBean (kafka.utils.Log4jControllerRegistration$)
      [2020-06-18 09:17:46,239] INFO Setting -D jdk.tls.rejectClientInitiatedRenegotiation=true to disable client-initiated TLS renegotiation (org.apache.zookeeper.common.X509Util)
      [2020-06-18 09:17:46,254] ERROR Exiting Kafka due to fatal exception (kafka.Kafka$)
      java.lang.IllegalArgumentException: Error creating broker listeners from 'REPLICATION://:9091,PLAINTEXT://:9092': No security protocol defined for listener REPLICATION
      	at kafka.utils.CoreUtils$.listenerListToEndPoints(CoreUtils.scala:266)
      	at kafka.server.KafkaConfig.$anonfun$listeners$1(KafkaConfig.scala:1598)
      	at kafka.server.KafkaConfig.listeners(KafkaConfig.scala:1597)
      	at kafka.server.KafkaConfig.advertisedListeners(KafkaConfig.scala:1625)
      	at kafka.server.KafkaConfig.validateValues(KafkaConfig.scala:1696)
      	at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:1674)
      	at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:1238)
      	at kafka.server.KafkaConfig$.fromProps(KafkaConfig.scala:1218)
      	at kafka.server.KafkaServerStartable$.fromProps(KafkaServerStartable.scala:34)
      	at kafka.server.KafkaServerStartable$.fromProps(KafkaServerStartable.scala:29)
      	at kafka.Kafka$.main(Kafka.scala:68)
      	at kafka.Kafka.main(Kafka.scala)
      Caused by: java.lang.IllegalArgumentException: No security protocol defined for listener REPLICATION
      

       

      As a side note, there is a little problem  with checking out cluster members via echo dump | ncat zoo1.my-domain.com 2181 command. One has to add option  4lw.commands.whitelist=*  into zookeeper.config for it to work, else it won't allow response.

      echo dump | ncat host1 2181
      dump is not executed because it is not in the whitelist. 

              pmellor@redhat.com Paul Mellor
              mtoth@redhat.com Michal Toth
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: