Bitnami Kafka Error while connecting to Kafka pod to zookeper we enable Authentication and TLS. Time out Exception

Keywords: Kafka - Microsoft Azure - Technical issue - Secure Connections (SSL/HTTPS)
Description:
We hae installed kafka alonge with zookeeper using bitnami helm chart
following is helm chart command.

helm upgrade --install kafka ./kafka --set replicaCount=1,zookeeper.replicaCount=3,zookeeper.auth.enabled=true,externalAccess.autoDiscovery.enabled=true,serviceAccount.create=true,rbac.create=true,externalAccess.enabled=true,allowPlaintextListener=false --set-string auth.clientProtocol=sasl_tls,auth.interBrokerProtocol=plaintext,auth.jksSecret=kafka-jks,auth.jksPassword=jkspass123,clientUser=brokeruser,auth.jaas.clientPassword=password123,auth.jaas.zookeeperUser=zkuser1,auth.jaas.zookeeperPassword=password123,zookeeper.auth.serverUsers=zkuser1,zookeeper.auth.serverPasswords=password123,zookeeper.auth.clientUser=zkuser1,zookeeper.auth.clientPassword=password123,externalAccess.service.type=LoadBalancer,externalAccess.service.port=9094

appropriate JKS secret is created for both kafka anf zookeper for tls

below are the zookeeper service settings

service:
type: LoadBalancer
port: 2181
followerPort: 2888
electionPort: 3888
publishNotReadyAddresses: true
tls:
client_enable: true
quorum_enable: true
disable_base_client_port: true

client_port: 3181

client_keystore_path: /certs/keystore/kafka-zk.keystore.jks
client_keystore_password: "testpass1"
client_truststore_path: /certs/keystore/kafka-zk.keystore.jks
client_truststore_password: "testpass1"

quorum_keystore_path: /certs/keystore/kafka-zk.keystore.jks
quorum_keystore_password: "testpass1"
quorum_truststore_path: /certs/keystore/kafka-zk.keystore.jks
quorum_truststore_password: "testpass1"

But we are getting below Error on kafka pods

[2020-07-15 10:06:39,354] INFO Session: 0x0 closed (org.apache.zookeeper.ZooKeeper)
[2020-07-15 10:06:39,355] INFO EventThread shut down for session: 0x0 (org.apache.zookeeper.ClientCnxn)
[2020-07-15 10:06:39,358] INFO [ZooKeeperClient Kafka server] Closed. (kafka.zookeeper.ZooKeeperClient)
[2020-07-15 10:06:39,360] ERROR Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
kafka.zookeeper.ZooKeeperClientTimeoutException: Timed out waiting for connection while in state: CONNECTING
at kafka.zookeeper.ZooKeeperClient.$anonfun$waitUntilConnected$3(ZooKeeperClient.scala:262)
at kafka.zookeeper.ZooKeeperClient.waitUntilConnected(ZooKeeperClient.scala:258)
at kafka.zookeeper.ZooKeeperClient.(ZooKeeperClient.scala:119)
at kafka.zk.KafkaZkClient$.apply(KafkaZkClient.scala:1863)
at kafka.server.KafkaServer.createZkClient$1(KafkaServer.scala:378)
at kafka.server.KafkaServer.initZkClient(KafkaServer.scala:403)
at kafka.server.KafkaServer.startup(KafkaServer.scala:210)
at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:44)
at kafka.Kafka$.main(Kafka.scala:82)
at kafka.Kafka.main(Kafka.scala)
[2020-07-15 10:06:39,363] INFO shutting down (kafka.server.KafkaServer)
[2020-07-15 10:06:39,375] INFO shut down completed (kafka.server.KafkaServer)
[2020-07-15 10:06:39,375] ERROR Exiting Kafka. (kafka.server.KafkaServerStartable)
[2020-07-15 10:06:39,376] INFO shutting down (kafka.server.KafkaServer)

Zookeeper pods are up and running

Hi, @jadhavnaren.

Thank you for using Bitnami. We provide support for our charts and containers on GitHub, so please open a new issue on https://github.com/bitnami/charts and our team will help you there.

Regards,
Alejandro