Support Questions

Find answers, ask questions, and share your expertise

Publish Kafka Error --- Time out


We have already done with the configuration for Publishkafka_0_10 kerberized kafka for DEV server. The configuration we done are as follows:

1. relnm entry in krb5.conf.

2. Done with kinit using keytab file and principal/ checked with klist.

3.change in nifi_jaas.conf.

4. added entry for jaas in bootstrap.conf file.

with above configuration we were able to send messages in DEV kafka server topics.

Now, we want to point the same to PROD server, so we have made same changes to point it to PROD from the same source server. checked telnet with the KDC port (88) , kafka broker port (6667) and zookeeper port (2181). changed relnm.

But still we are facing time out error.

kindly help.




Rising Star

Hi @Gitanjali Bare,

Could you please share the complete error you are getting?


New Contributor

@Gitanjali Bare Check if kafka broker port is blocked to outside world or any firewall blocking traffic.

@Gitanjali Bare

Even i have faced the timeout error. There are two ways to solve this error:

1) Validate the KDC port 88 is allowed to ESTABLISH for both TCP and UDP connections.

netstat -an | grep 88

2) If the UDP is not allowed to used, add the following entry in krb5.conf under [libdefaults]

udp_preference_limit = 1

This worked for me . Hope this will help you also.



please find logs in detail:

Exception in thread "main" org.apache.kafka.common.KafkaException: Failed to construct kafka producer at org.apache.kafka.clients.producer.KafkaProducer.<init>( at org.apache.kafka.clients.producer.KafkaProducer.<init>( at Caused by: org.apache.kafka.common.KafkaException: Receive timed out at at at org.apache.kafka.clients.ClientUtils.createChannelBuilder( at org.apache.kafka.clients.producer.KafkaProducer.<init>( ... 2 more Caused by: Receive timed out at at at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( at sun.reflect.DelegatingMethodAccessorImpl.invoke( at java.lang.reflect.Method.invoke( at at$000( at$ at$ at Method) at at at at at<init>( at at ... 5 more Caused by: Receive timed out at Method) at at at at$ at$ at Method) at at at at at at at ... 22 more

@Rohit Sharma

Thanks for the reply.

I have followed same steps.

It also worked for me.

Its Either way, the UDP connections should open for KDC port OR add "udp_preference_limit =1" in krb5.conf file.