Yelp/kafka-utils

Help with configuration file (SSL enabled kafka cluster)

Closed this issue · 2 comments

I have a bit of problem connecting to our cluster, our kafka cluster is SSL-configured and I am getting NoBrokersAvailable exception. I assume it has something to do with SSL-configuration but I can't find a sample config file to point the ssl/certs. Any help on this one?
also, our zookeeper and JMX port is not ssl-configured (at least not yet), so I had no problem getting stats using kafka-cluster-manager.

Hi @johnjang, unfortunately ssl is not currently supported by the kafka-utils scripts that actually connects to Kafka. Tools such as kafka-cluster-manager do not require any kafka connection to work (they interact directly with zookeeper) and they should work just fine.

I don't think it should be too hard to implement it, BrokerConnection used by SimpleClient (https://github.com/dpkp/kafka-python/blob/0c78f704520a42d0935cb87298dd69f8e4af5894/kafka/client.py) already supports it. We also already extend the SimpleClient in kafka-utils using https://github.com/Yelp/kafka-utils/blob/master/kafka_utils/util/client.py#L49. I think we could add the ssl configuration to the configuration file used by kafka-utils, add support in KafkaToolClient to pass the proper arguments when creating the BrokerConnection.

I'm not sure we can allocate time for this right now, but feel free to open a pr if you wish to contribute.

@ecanzonieri got it! thanks for the reply.