Search code examples
sslapache-kafkajmeterkafka-producer-api

Exception while connecting kafka server through Pepperbox sampler in jmeter


I am using pepprBox Sample in JMeter to connect kafka server and sending messages on topic. Application team shared two JKS certificate along with password to connect Kafka server. For this, I have enabled keystore property in system.properties file: javax.net.ssl.keystore= javax.net.ssl.keystorepassword=

and index entry in jmeter.properties

https.keystoreStartIndex=0

https.keystoreEndIndex=1

I specified Broker , Zookeeper and Topic name with "SSL"security protocol. But not able to connect kafka server and getting below exception --Error While calling watcher --Java.net.connectException: connection Refused

Please share your best help to correct me if i am doing anything incorrect.


Solution

  • PepperBox Kafka Sampler doesn't respect JMeter System Properties, you need to perform the SSL configuration in the Sampler itself:

    enter image description here

    Check out Apache Kafka - How to Load Test with JMeter article for more information if needed