Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-5458

SASL handshake fails for METADATA requests

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.10.1.1
    • Fix Version/s: None
    • Component/s: KafkaConnect
    • Labels:
      None

      Description

      i have enabled SASL Authentication for my kafka with

      listeners=SASL_PLAINTEXT://0.0.0.0:9092
      advertised.listeners=SASL_PLAINTEXT://0.0.0.0:9092
      sasl.enabled.mechanisms=PLAIN
      security.protocol=SASL_PLAINTEXT
      security.inter.broker.protocol=SASL_PLAINTEXT
      sasl.mechanism=PLAIN
      sasl.mechanism.inter.broker.protocol=PLAIN
      

      but in kafkaServer.out getting

      [2017-06-16 11:21:12,167] DEBUG Set SASL server state to HANDSHAKE_REQUEST (org.apache.kafka.common.security.authenticator.SaslServerAuthenticator)
      [2017-06-16 11:21:12,167] DEBUG Handle Kafka request METADATA (org.apache.kafka.common.security.authenticator.SaslServerAuthenticator)
      [2017-06-16 11:21:12,167] DEBUG Set SASL server state to FAILED (org.apache.kafka.common.security.authenticator.SaslServerAuthenticator)
      [2017-06-16 11:21:12,167] DEBUG Connection with /127.0.0.1 disconnected (org.apache.kafka.common.network.Selector)
      java.io.IOException: org.apache.kafka.common.errors.IllegalSaslStateException: Unexpected Kafka request of type METADATA during SASL handshake.
              at org.apache.kafka.common.security.authenticator.SaslServerAuthenticator.authenticate(SaslServerAuthenticator.java:243)
              at org.apache.kafka.common.network.KafkaChannel.prepare(KafkaChannel.java:64)
              at org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:338)
              at org.apache.kafka.common.network.Selector.poll(Selector.java:291)
              at kafka.network.Processor.poll(SocketServer.scala:476)
              at kafka.network.Processor.run(SocketServer.scala:416)
              at java.lang.Thread.run(Thread.java:745)
      

      where as in client log i observed

      #### 2017-06-16 11:33:33,501 WARN  [kafka-producer-network-thread | producer-7] NetworkClient.maybeHandleDisconnection (NetworkClient.java:568)     - Bootstrap broker 127.0.0.1:9092 disconnected
      #### 2017-06-16 11:33:33,607 WARN  [kafka-producer-network-thread | producer-7] NetworkClient.maybeHandleDisconnection (NetworkClient.java:568)     - Bootstrap broker 127.0.0.1:9092 disconnected
      #### 2017-06-16 11:33:33,721 WARN  [kafka-producer-network-thread | producer-7] NetworkClient.maybeHandleDisconnection (NetworkClient.java:568)     - Bootstrap broker 127.0.0.1:9092 disconnected
      #### 2017-06-16 11:33:33,834 WARN  [kafka-producer-network-thread | producer-7] NetworkClient.maybeHandleDisconnection (NetworkClient.java:568)     - Bootstrap broker 127.0.0.1:9092 disconnected
      #### 2017-06-16 11:33:33,952 WARN  [kafka-producer-network-thread | producer-7] NetworkClient.maybeHandleDisconnection (NetworkClient.java:568)     - Bootstrap broker 127.0.0.1:9092 disconnected
      #### 2017-06-16 11:33:34,059 WARN  [kafka-producer-network-thread | producer-7] NetworkClient.maybeHandleDisconnection (NetworkClient.java:568)     - Bootstrap broker 127.0.0.1:9092 disconnected
      #### 2017-06-16 11:33:34,162 WARN  [kafka-producer-network-thread | producer-7] NetworkClient.maybeHandleDisconnection (NetworkClient.java:568)     - Bootstrap broker 127.0.0.1:9092 disconnected
      ###
      

      metadata request are being every 100ms
      Problem :
      how can we make SASL handshake to support METADATA type requests

        Attachments

        1. server.properties
          6 kB
          Sagar Lad
        2. producer.properties
          0.2 kB
          Sagar Lad
        3. kafka_server_jaas.conf
          0.2 kB
          Sagar Lad
        4. kafka_client_jaas.conf
          0.1 kB
          Sagar Lad

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Sagar Lad Sagar Lad
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: