SSL port usage giving error in kafka

When I try to connect with PLAINTEXT, it is connecting , however, when I try connecting through SSL port 9093, I am getting the following error (unable to list topics)
Error while executing topic command : The AdminClient thread has exited. Call: listTopics
[2023-01-30 23:06:00,060] ERROR org.apache.kafka.common.errors.TimeoutException: The AdminClient thread has exited. Call: listTopics
(kafka.admin.TopicCommand$)
[2023-01-30 23:06:00,062] 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.(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:113)
at org.apache.kafka.common.network.KafkaChannel.receive(KafkaChannel.java:452)
at org.apache.kafka.common.network.KafkaChannel.read(KafkaChannel.java:402)
at org.apache.kafka.common.network.Selector.attemptRead(Selector.java:674)
at org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:576)
at org.apache.kafka.common.network.Selector.poll(Selector.java:481)
at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:560)
at org.apache.kafka.clients.admin.KafkaAdminClient$AdminClientRunnable.processRequests(KafkaAdminClient.java:1415)

The command I am using is
./kafka-topics.sh --list --bootstrap-server localhost:9093

Not sure. Also, “Kafka Streams” seems not to be the best category for this question. Maybe try “tools” or “ops” ?

hey @Kopal

seems like a known bug which could happen when ssl config on client is not properly.
how did you configure your client to connect to secure cluster?

check also Java Heap Space Error - #2 by daveklein

and Encrypt with TLS | Confluent Documentation

hth,
michael

Thanks, I updated the category