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

kafka-delegation-tokens.sh using a config file that contains security.protocol=SASL_PLAINTEXT throws OutOfMemoryError if it tries to connect to an SSL-enabled secured broker

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 1.1.0, 2.0.0
    • None
    • tools
    • None

    Description

      When the command-config file of kafka-delegation-tokens contain security.protocol=SASL_PLAINTEXT instead of SASL_SSL (i.e. due to a user error), the process throws a java.lang.OutOfMemoryError upon connection attempt to a secured (i.e. Kerberized, SSL-enabled) Kafka broker.

      [2018-12-03 11:27:13,221] ERROR Uncaught exception in thread 'kafka-admin-client-thread | adminclient-1': (org.apache.kafka.common.utils.KafkaThread)
      java.lang.OutOfMemoryError: Java heap space
      	at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:57)
      	at java.nio.ByteBuffer.allocate(ByteBuffer.java:335)
      	at org.apache.kafka.common.memory.MemoryPool$1.tryAllocate(MemoryPool.java:30)
      	at org.apache.kafka.common.network.NetworkReceive.readFrom(NetworkReceive.java:112)
      	at org.apache.kafka.common.security.authenticator.SaslClientAuthenticator.receiveResponseOrToken(SaslClientAuthenticator.java:407)
      	at org.apache.kafka.common.security.authenticator.SaslClientAuthenticator.receiveKafkaResponse(SaslClientAuthenticator.java:497)
      	at org.apache.kafka.common.security.authenticator.SaslClientAuthenticator.authenticate(SaslClientAuthenticator.java:207)
      	at org.apache.kafka.common.network.KafkaChannel.prepare(KafkaChannel.java:173)
      	at org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:533)
      	at org.apache.kafka.common.network.Selector.poll(Selector.java:468)
      	at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:535)
      	at org.apache.kafka.clients.admin.KafkaAdminClient$AdminClientRunnable.run(KafkaAdminClient.java:1125)
      	at java.lang.Thread.run(Thread.java:745)
      

      Attachments

        Issue Links

          Activity

            People

              viktorsomogyi Viktor Somogyi-Vass
              asasvari Attila Sasvári
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: