I configured kafka (1.0) with SSL enabled and added listeners property as listeners=PLAINTEXT://:9092,SSL://:9093
And Advertised listeners as advertisted.listeners=PLAINTEXT://PUBLICIP:9092,SSL://PUBLICIP:9093
I am able to produce messages with 9092 port, but unable to do so on SSL enabled 9093. Below is the error I am getting
[2018-05-03 10:51:41,990] ERROR Error when sending message to topic test with key: null, value: 16 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)
org.apache.kafka.common.errors.TimeoutException: Failed to update metadata after 60000 ms.
Here is the producer command I am using
bin/kafka-console-producer.sh --broker-list PUBLICIP1:9093,PUBLICIP2:9093,PUBLICIP3:9093 --topic test --property security.protocol=SSL --producer.config ~/client.properties
Here are the entries in client.properties
security.protocol=SSL
ssl.truststore.location=/home/ubuntu/kafka.client.truststore.jks
ssl.truststore.password=trustpassword
Kafka Connect REST: Kafka Connect exposes a REST API that can be configured to use SSL using additional properties.
If you use 2.0+ versions below is the command for console producer
kafka-console-producer –broker-list kafka.example.com:9093 –topic securing-kafka –producer.config /etc/kafka/producer_ssl.properties
producer_ssl.properties
bootstrap.servers=kafka.example.com:9093
security.protocol=SSL
ssl.truststore.location=/etc/security/tls/kafka.client.truststore.jks
ssl.truststore.password=test1234
ssl.keystore.location=/etc/security/tls/kafka.client.keystore.jks
ssl.keystore.password=test1234
ssl.key.password=test1234
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With