Unable to Connect kafka broker with TLS authetication Enabled #5003
shreyasarani23
started this conversation in
General
Replies: 1 comment 5 replies
-
If you want to access Kafka from outside, you will need to configure an external listener - there are different types, you have to choose the one which works for your environment. All the types and options are described in the docs, there was also a 5 part blog post series on the Strimzi blog about external listeners. So that should get you started. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have configured my kafka cluster with TLS authetication:
And following is the configuration of my KafkaUser:
And I am using the built-in truststore which comes in with a JDK (Java) installation.
Following are the steps I followed for client credentials
cat $USER_KEY_PASSWORD_FILE_PATH
Following are the steps I followed for server credentials
1.export CLUSTER_NAME=my-kafka-cluster
2.kubectl get secret $CLUSTER_NAME-cluster-ca-cert -o jsonpath='{.data.ca.crt}' -n kafka | base64 --decode > ca.crt
3. kubectl get secret $CLUSTER_NAME-cluster-ca-cert -o jsonpath='{.data.ca.password}' -n kafka | base64 --decode > ca.password
4. export CERT_FILE_PATH=ca.crt
5. export CERT_PASSWORD_FILE_PATH=ca.password
6. export KEYSTORE_LOCATION=/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/cacerts
7. sudo keytool -importcert -alias server-certificate -file $CERT_FILE_PATH -keystore $KEYSTORE_LOCATION -keypass $PASSWORD
8. sudo keytool -list -alias server-certificate -keystore $KEYSTORE_LOCATION
Following is the configuration of my properties file
I have installed kafka on my local machine and running the consumer with the below commands:
1.export KAFKA_HOME=/home/shreyas/Documents/Kafka/kafka_2.13-2.7.0
2. export TOPIC_NAME=new-topic
$KAFKA_HOME/bin/kafka-console-consumer.sh --bootstrap-server 10.0.147.119:9093 --topic $TOPIC_NAME --consumer.config client-ssl-auth.properties --from-beginning
And I am getting the following error.
I don't know why I am getting this error. For your information the kafka brokers are up and running. Please let me know if I am missing something or some configuration is incorrect.
Beta Was this translation helpful? Give feedback.
All reactions