org.apache.kafka.common.KafkaException: Failed to construct kafka producer

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,

Make sure the file resides in the project folder if you're referencing it via a relative path. If not, use the absolute path to the file with the file extension.

Solutions on the web

via Stack Overflow by SimonGormley
, 1 year ago
via Stack Overflow by Justin
, 10 months ago
via Stack Overflow by Anant Pathak
, 4 months ago
Failed to construct kafka producer
via GitHub by ligadata-saleh
, 1 year ago
java.io.FileNotFoundException:
at java.io.FileInputStream.(FileInputStream.java:156)
at java.io.FileInputStream.(FileInputStream.java:111)
at org.apache.kafka.common.security.ssl.SSLFactory$SecurityStore.load(SSLFactory.java:201)
at org.apache.kafka.common.security.ssl.SSLFactory$SecurityStore.access$000(SSLFactory.java:186)
at org.apache.kafka.common.security.ssl.SSLFactory.createSSLContext(SSLFactory.java:123)
at org.apache.kafka.common.security.ssl.SSLFactory.configure(SSLFactory.java:97)
at org.apache.kafka.common.network.SSLChannelBuilder.configure(SSLChannelBuilder.java:41)
at org.apache.kafka.common.network.ChannelBuilders.create(ChannelBuilders.java:49)
at org.apache.kafka.clients.ClientUtils.createChannelBuilder(ClientUtils.java:79)
at org.apache.kafka.clients.producer.KafkaProducer.(KafkaProducer.java:270)
at com.example.ProducerRunnable.(ProducerRunnable.java:44)
at com.example.KafkaNativeSample.createMessageProducer(KafkaNativeSample.java:113)
at com.example.KafkaNativeSample.main(KafkaNativeSample.java:65)

Users with the same issue

Once, 6 months ago
57 times, 6 months ago
16 times, 7 months ago
2 times, 7 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.