Created 08-06-2018 08:52 AM
Hello,
Trying to push message to kafka using PublishKafka processor.
Getting Error as given below:
2018-08-06 13:55:42,563 ERROR [Timer-Driven Process Thread-4] o.a.n.p.kafka.pubsub.PublishKafka_0_10 PublishKafka_0_10[id=01641014-a4dd-1982-315b-470a1ec73b5b] PublishKafka_0_10[id=01641014-a4dd-1982-315b-470a1ec73b5b] failed to process session due to org.apache.kafka.common.KafkaException: Failed to construct kafka producer: {} org.apache.kafka.common.KafkaException: Failed to construct kafka producer at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:342) at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:166) at org.apache.nifi.processors.kafka.pubsub.PublisherPool.createLease(PublisherPool.java:61) at org.apache.nifi.processors.kafka.pubsub.PublisherPool.obtainPublisher(PublisherPool.java:56) at org.apache.nifi.processors.kafka.pubsub.PublishKafka_0_10.onTrigger(PublishKafka_0_10.java:312) at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1122) at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:147) at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47) at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:128) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) 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: org.apache.kafka.common.KafkaException: javax.security.auth.login.LoginException: ICMP Port Unreachable at org.apache.kafka.common.network.SaslChannelBuilder.configure(SaslChannelBuilder.java:94) at org.apache.kafka.common.network.ChannelBuilders.create(ChannelBuilders.java:93) at org.apache.kafka.common.network.ChannelBuilders.clientChannelBuilder(ChannelBuilders.java:51) at org.apache.kafka.clients.ClientUtils.createChannelBuilder(ClientUtils.java:84) at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:305) ... 16 common frames omitted
Created on 08-06-2018 11:41 AM - edited 08-17-2019 10:05 PM
@Gitanjali Bare - Please confirm you have the correct settings in the Nifi Processor PublishKafka.
Here is a working example:
Important settings:
If this answer helps, please click ACCEPT.
Created 08-06-2018 01:48 PM
Hi Steven,
Thanks For Reply.
1. Kafka Broker: hostname:6667 - many times documentation shows a different port, use 6667=== Used same port 6667
We are using Kerberized Kafka. Keytab and principal have defined in properties.
PFA for properties.
Thanks,
Gitanjali