Kafka bootstrap broker disconnected after adding SSL (with debezium)

8/19/2020

I am running containerized debezium and kafka in openshift. I am using the debezium/kafka, debezium/zookeeper debezium/connect and debezium/postgres containers and inside openshift it works fine.

When being in the terminal of one of the pods i can use the kafka console consumer tools to list the topics and also consume events from kafka. Every time I make a change to the database I can see an event using this as an example:

kafka-console-consumer.sh --topic topic --from-beginning --bootstrap-server kafka-deployment.project.svc:9092

The problem is when trying to access kafka via the openshift external route that points to the service. When I try this from my local computer:

kafka-console-consumer.bat --topic topic --from-beginning --bootstrap-server https://route-url:443

Instead of the data in the topic I get these messages:

[2020-08-19 13:44:40,196] WARN [Consumer clientId=consumer-console-consumer-82606-1, groupId=console-consumer-82606] Bootstrap broker route-url:443 (id: -1 rack: null) disconnected (org.apache.kafka.clients.NetworkClient)
[2020-08-19 13:44:40,425] WARN [Consumer clientId=consumer-console-consumer-82606-1, groupId=console-consumer-82606] Bootstrap broker route-url:443 (id: -1 rack: null) disconnected (org.apache.kafka.clients.NetworkClient)
[2020-08-19 13:44:40,724] WARN [Consumer clientId=consumer-console-consumer-82606-1, groupId=console-consumer-82606] Bootstrap broker route-url:443 (id: -1 rack: null) disconnected (org.apache.kafka.clients.NetworkClient)
[2020-08-19 13:44:41,067] WARN [Consumer clientId=consumer-console-consumer-82606-1, groupId=console-consumer-82606] Bootstrap broker route-url:443 (id: -1 rack: null) disconnected (org.apache.kafka.clients.NetworkClient)

Before I had a http route and I was getting SSL handshake failures so I managed to change it to a https route with a valid certificate but it does not seem to connect through to the service.

-- Matt
apache-kafka
java
kubernetes
openshift
ssl

0 Answers