Kafka send message is failing with - Could not find a 'KafkaClient' entry in the JAAS configuration. System property 'java.security.auth.login.config' is not set at org.apache.kafka.common.security.JaasContext.defaultContext(JaasContext.java:131)
search cancel

Kafka send message is failing with - Could not find a 'KafkaClient' entry in the JAAS configuration. System property 'java.security.auth.login.config' is not set at org.apache.kafka.common.security.JaasContext.defaultContext(JaasContext.java:131)

book

Article ID: 216971

calendar_today

Updated On:

Products

Service Virtualization

Issue/Introduction

| Exception: 
============================================================================
| Message:     Error creating Kafka Producer: Failed to construct kafka producer
----------------------------------------------------------------------------
| Trapped Exception: Failed to construct kafka producer
| Trapped Message:   org.apache.kafka.common.KafkaException: Failed to construct kafka producer
----------------------------------------------------------------------------
STACK TRACE
org.apache.kafka.common.KafkaException: Failed to construct kafka producer
 at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:441)
 at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:291)
 at com.itko.lisa.messaging.providers.kafka.asset.KafkaUtils$DefaultKafkaImpl.createProducer(KafkaUtils.java:799)
 at com.itko.lisa.messaging.providers.kafka.asset.KafkaUtils.createKafkaProducer(KafkaUtils.java:276)
 at com.itko.lisa.messaging.providers.kafka.asset.KafkaProducerAsset.createInstance(KafkaProducerAsset.java:215)
 at com.itko.lisa.messaging.providers.kafka.asset.KafkaProducerAsset.createInstance(KafkaProducerAsset.java:48)
 at com.itko.lisa.asset.LocalAssetRuntime$InstanceEntry.open(LocalAssetRuntime.java:2349)
 at com.itko.lisa.asset.LocalAssetRuntime$InstanceEntry.checkOut(LocalAssetRuntime.java:1568)
 at com.itko.lisa.asset.LocalAssetRuntime$RuntimeEntry.checkOut(LocalAssetRuntime.java:824)
 at com.itko.lisa.asset.LocalAssetRuntime.doOpenAsset(LocalAssetRuntime.java:169)
 at com.itko.lisa.asset.LocalAssetRuntime.openAssetInScope(LocalAssetRuntime.java:126)
 at com.itko.lisa.asset.LocalAssetRuntime.openAsset(LocalAssetRuntime.java:117)
 at com.itko.lisa.messaging.providers.kafka.operation.KafkaSendOperation.doExecute2(KafkaSendOperation.java:259)
 at com.itko.lisa.messaging.providers.kafka.operation.KafkaSendOperation.doExecute2(KafkaSendOperation.java:48)
 at com.itko.lisa.asset.operation.AbstractRetryableRuntimeOperation.doExecute(AbstractRetryableRuntimeOperation.java:30)
 at com.itko.lisa.asset.operation.AbstractRuntimeOperation.execute(AbstractRuntimeOperation.java:167)
 at com.itko.lisa.messaging.builder.AbstractSendReceiveOperation.doExecute(AbstractSendReceiveOperation.java:156)
 at com.itko.lisa.asset.operation.AbstractRuntimeOperation.execute(AbstractRuntimeOperation.java:167)
 at com.itko.lisa.asset.operation.AbstractOperationStep.execute(AbstractOperationStep.java:176)
 at com.itko.lisa.asset.operation.AbstractOperationStep.execute(AbstractOperationStep.java:125)
 at com.itko.lisa.asset.operation.AbstractOperationStepEditor$ExecuteTask.run(AbstractOperationStepEditor.java:577)
 at com.itko.lisa.asset.ui.ProgressLog$Worker.doInBackground(ProgressLog.java:142)
 at com.itko.lisa.asset.ui.ProgressLog$Worker.doInBackground(ProgressLog.java:100)
 at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at javax.swing.SwingWorker.run(SwingWorker.java:334)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalArgumentException: Could not find a 'KafkaClient' entry in the JAAS configuration. System property 'java.security.auth.login.config' is not set
 at org.apache.kafka.common.security.JaasContext.defaultContext(JaasContext.java:131)
 at org.apache.kafka.common.security.JaasContext.load(JaasContext.java:96)
 at org.apache.kafka.common.security.JaasContext.loadClientContext(JaasContext.java:82)
 at org.apache.kafka.common.network.ChannelBuilders.create(ChannelBuilders.java:134)
 at org.apache.kafka.common.network.ChannelBuilders.clientChannelBuilder(ChannelBuilders.java:73)
 at org.apache.kafka.clients.ClientUtils.createChannelBuilder(ClientUtils.java:105)
 at org.apache.kafka.clients.producer.KafkaProducer.newSender(KafkaProducer.java:449)
 at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:430)
 ... 28 more
============================================================================

Environment

DevTest 10.6.0

Cause

The cluster is Kerberos-enabled and we do not support this.  There is no workaround at this time.

Resolution

Kafka work done with SASL or SSL_SASL, only SCRAM and Plain Authentication Mechanism is supported. 

Kerberos SASL is not supported with Kafka in DevTest at this time.