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

Solutions on the web

via GitHub by ligadata-saleh
, 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 Stack Overflow by SimonGormley
, 1 year ago
java.lang.IllegalArgumentException: You must pass java.security.auth.login.config in secure mode.
at org.apache.kafka.common.security.kerberos.Login.login(Login.java:289)
at org.apache.kafka.common.security.kerberos.Login.(Login.java:104)
at org.apache.kafka.common.security.kerberos.LoginManager.(LoginManager.java:44)
at org.apache.kafka.common.security.kerberos.LoginManager.acquireLoginManager(LoginManager.java:85)
at org.apache.kafka.common.network.SaslChannelBuilder.configure(SaslChannelBuilder.java:55)
at org.apache.kafka.common.network.ChannelBuilders.create(ChannelBuilders.java:60)
at org.apache.kafka.clients.ClientUtils.createChannelBuilder(ClientUtils.java:79)
at org.apache.kafka.clients.producer.KafkaProducer.(KafkaProducer.java:271)
at com.ligadata.tools.SimpleKafkaProducer$$anonfun$main$7$$anon$2.run(SimpleKafkaProducer.scala:636)
at scala.actors.threadpool.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1060)
at java.lang.Thread.run(Thread.java:745)

Users with the same issue

You are the first who have seen this exception.

Write tip

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