Batch containing 1 record (s) expired due to timeout while requesting metadata from brokers

Source: Internet
Author: User

First, the exception information is as follows:

Java.util.concurrent.ExecutionException:org.apache.kafka.common.errors.TimeoutException:Batch containing 1 Record (s) expired due to timeout and requesting metadata from brokers for user-video-0

At Org.apache.kafka.clients.producer.internals.FutureRecordMetadata.valueOrError (futurerecordmetadata.java:65)

At Org.apache.kafka.clients.producer.internals.FutureRecordMetadata.get (futurerecordmetadata.java:52)

At Org.apache.kafka.clients.producer.internals.FutureRecordMetadata.get (futurerecordmetadata.java:25)

At Kafka.examples.Producer.run (producer.java:43)

Second, the exception information is as follows:

Failed to send producer request with correlation ID 8 to broker 2 with data for partitions [user-video,0]

Java.nio.channels.ClosedChannelException

At Kafka.network.BlockingChannel.send (blockingchannel.scala:100) ~[kafka_2.10-0.8.2.0.jar:?]

At Kafka.producer.syncproducer.liftedtree1$1 (syncproducer.scala:73) ~[kafka_2.10-0.8.2.0.jar:?]

At kafka.producer.syncproducer.kafka$producer$syncproducer$ $doSend (syncproducer.scala:72) ~[kafka_2.10-0.8.2.0. Jar:?]

At kafka.producer.syncproducer$ $anonfun $send$1$ $anonfun $apply$mcv$sp$1.apply$mcv$sp (syncproducer.scala:103) ~[ Kafka_2.10-0.8.2.0.jar:?]

At kafka.producer.syncproducer$ $anonfun $send$1$ $anonfun $apply$mcv$sp$1.apply (syncproducer.scala:103) ~[kafka_ 2.10-0.8.2.0.jar:?]

At kafka.producer.syncproducer$ $anonfun $send$1$ $anonfun $apply$mcv$sp$1.apply (syncproducer.scala:103) ~[kafka_ 2.10-0.8.2.0.jar:?]

At Kafka.metrics.KafkaTimer.time (kafkatimer.scala:33) ~[kafka_2.10-0.8.2.0.jar:?]

At kafka.producer.syncproducer$ $anonfun $send$1.apply$mcv$sp (syncproducer.scala:102) ~[kafka_2.10-0.8.2.0.jar:?]

At kafka.producer.syncproducer$ $anonfun $send$1.apply (syncproducer.scala:102) ~[kafka_2.10-0.8.2.0.jar:?]

At kafka.producer.syncproducer$ $anonfun $send$1.apply (syncproducer.scala:102) ~[kafka_2.10-0.8.2.0.jar:?]

At Kafka.metrics.KafkaTimer.time (kafkatimer.scala:33) ~[kafka_2.10-0.8.2.0.jar:?]

At Kafka.producer.SyncProducer.send (syncproducer.scala:101) ~[kafka_2.10-0.8.2.0.jar:?]

At kafka.producer.async.defaulteventhandler.kafka$producer$async$defaulteventhandler$ $send ( defaulteventhandler.scala:255) [Kafka_2.10-0.8.2.0.jar:?]

At kafka.producer.async.defaulteventhandler$ $anonfun $dispatchserializeddata$2.apply (Defaulteventhandler.scala : 106) [Kafka_2.10-0.8.2.0.jar:?]

At kafka.producer.async.defaulteventhandler$ $anonfun $dispatchserializeddata$2.apply (Defaulteventhandler.scala : +) [Kafka_2.10-0.8.2.0.jar:?]

At scala.collection.traversablelike$withfilter$ $anonfun $foreach$1.apply (traversablelike.scala:772) [ Scala-library-2.10.4.jar:?]

At scala.collection.mutable.hashmap$ $anonfun $foreach$1.apply (hashmap.scala:98) [Scala-library-2.10.4.jar:?]

At scala.collection.mutable.hashmap$ $anonfun $foreach$1.apply (hashmap.scala:98) [Scala-library-2.10.4.jar:?]

At Scala.collection.mutable.hashtable$class.foreachentry (hashtable.scala:226) [Scala-library-2.10.4.jar:?]

At Scala.collection.mutable.HashMap.foreachEntry (hashmap.scala:39) [Scala-library-2.10.4.jar:?]

At Scala.collection.mutable.HashMap.foreach (hashmap.scala:98) [Scala-library-2.10.4.jar:?]

At Scala.collection.traversablelike$withfilter.foreach (traversablelike.scala:771) [Scala-library-2.10.4.jar:?]

At Kafka.producer.async.DefaultEventHandler.dispatchSerializedData (defaulteventhandler.scala:100) [Kafka_ 2.10-0.8.2.0.jar:?]

At Kafka.producer.async.DefaultEventHandler.handle (defaulteventhandler.scala:72) [Kafka_2.10-0.8.2.0.jar:?]

At Kafka.producer.Producer.send (producer.scala:77) [Kafka_2.10-0.8.2.0.jar:?]

At Kafka.javaapi.producer.Producer.send (producer.scala:33) [Kafka_2.10-0.8.2.0.jar:?]

At Kafka.example.kafkaProducer.run (kafkaproducer.java:24) [classes/:?]

Back off for the MS before retrying send. Remaining retries = 1

From these two exception information is caused by network problems, if the exception in the local test, put the code on the cluster test, if the cluster can look at the firewall, if not, add host host name correspondence in the local hosts file.

Batch containing 1 record (s) expired due to timeout while requesting metadata from brokers

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.