Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-25838

Add kafka_listeners to kafka to fix startup failures on kerberos enabled

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.8.0
    • 2.8.0
    • stacks
    • None
    • Centos7
      Ambari-2.8.0

    Description

      1. When kerberos enabled, kafka failed to start.

      The listeners' protocol needs to be changed from PLAINTEXT to SASL_PLAINTEXT when kerberos is enabled, an attribute controlled by kafka_listeners.

      [2023-01-10 08:40:18,783] INFO [KafkaServer id=1001] shut down completed (kafka.server.KafkaServer)
      [2023-01-10 08:43:13,215] INFO Registered kafka:type=kafka.Log4jController MBean (kafka.utils.Log4jControllerRegistration$)
      [2023-01-10 08:43:14,230] ERROR Exiting Kafka due to fatal exception (kafka.Kafka$)
      java.lang.IllegalArgumentException: requirement failed: inter.broker.listener.name must be a listener name defined in advertised.listeners. The valid options based on currently configured listeners are PLAINTEXT
      	at scala.Predef$.require(Predef.scala:281)
      	at kafka.server.KafkaConfig.validateValues(KafkaConfig.scala:1933)
      	at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:1896)
      	at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:1389)
      	at kafka.server.KafkaConfig$.fromProps(KafkaConfig.scala:1327)
      	at kafka.Kafka$.buildServer(Kafka.scala:67)
      	at kafka.Kafka$.main(Kafka.scala:87)
      	at kafka.Kafka.main(Kafka.scala)
      [2023-01-10 08:53:37,390] INFO Registered kafka:type=kafka.Log4jController MBean (kafka.utils.Log4jControllerRegistration$)
      [2023-01-10 08:53:38,214] ERROR Exiting Kafka due to fatal exception (kafka.Kafka$)
      java.lang.IllegalArgumentException: requirement failed: inter.broker.listener.name must be a listener name defined in advertised.listeners. The valid options based on currently configured listeners are PLAINTEXT
      	at scala.Predef$.require(Predef.scala:281)
      	at kafka.server.KafkaConfig.validateValues(KafkaConfig.scala:1933)
      	at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:1896)
      	at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:1389)
      	at kafka.server.KafkaConfig$.fromProps(KafkaConfig.scala:1327)
      	at kafka.Kafka$.buildServer(Kafka.scala:67)
      	at kafka.Kafka$.main(Kafka.scala:87)
      	at kafka.Kafka.main(Kafka.scala)
      [2023-01-10 08:57:26,554] INFO Registered kafka:type=kafka.Log4jController MBean (kafka.utils.Log4jControllerRegistration$)
      [2023-01-10 08:57:27,377] ERROR Exiting Kafka due to fatal exception (kafka.Kafka$)
      org.apache.kafka.common.config.ConfigException: Only one of inter.broker.listener.name and security.inter.broker.protocol should be set.
      	at kafka.server.KafkaConfig.getInterBrokerListenerNameAndSecurityProtocol(KafkaConfig.scala:1851)
      	at kafka.server.KafkaConfig.interBrokerListenerName(KafkaConfig.scala:1722)
      	at kafka.server.KafkaConfig.validateValues(KafkaConfig.scala:1932)
      	at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:1896)
      	at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:1389)
      	at kafka.server.KafkaConfig$.fromProps(KafkaConfig.scala:1327)
      	at kafka.Kafka$.buildServer(Kafka.scala:67)
      	at kafka.Kafka$.main(Kafka.scala:87)
      	at kafka.Kafka.main(Kafka.scala)
      [2023-01-10 08:59:21,462] INFO Registered kafka:type=kafka.Log4jController MBean (kafka.utils.Log4jControllerRegistration$)
      [2023-01-10 08:59:22,239] ERROR Exiting Kafka due to fatal exception (kafka.Kafka$)
      java.lang.IllegalArgumentException: requirement failed: inter.broker.listener.name must be a listener name defined in advertised.listeners. The valid options based on currently configured listeners are PLAINTEXT
      	at scala.Predef$.require(Predef.scala:281)
      	at kafka.server.KafkaConfig.validateValues(KafkaConfig.scala:1933)
      	at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:1896)
      	at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:1389)
      	at kafka.server.KafkaConfig$.fromProps(KafkaConfig.scala:1327)
      	at kafka.Kafka$.buildServer(Kafka.scala:67)
      	at kafka.Kafka$.main(Kafka.scala:87)
      	at kafka.Kafka.main(Kafka.scala)
      
      

      2. Remove the DEPRECATED attribute port

      Attachments

        1. screenshot-1.png
          36 kB
          Yu Hou

        Issue Links

          Activity

            People

              houyu Yu Hou
              houyu Yu Hou
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m