KafkaProducer: исключение IllegalMonitorStateException

#apache-kafka #kafka-producer-api

#apache-kafka #kafka-producer-api

Вопрос:

Производитель Kafka выдает следующее исключение при отправке записи в раздел kafka:

 {"log":"java.lang.IllegalMonitorStateException: current thread is not owner\n","stream":"stdout","time":"2020-10-23T12:48:50.415014714Z"}"}
 java.base/java.lang.Object.wait(Native Method)\n","stream":"stdout","time":"2020-10-23T12:48:50.41502027Z"}"}
org.apache.kafka.common.utils.SystemTime.waitObject(SystemTime.java:55)\n","stream":"stdout","time":"2020-10-23T12:48:50.415024923Z"}"}
at org.apache.kafka.clients.producer.internals.ProducerMetadata.awaitUpdate(ProducerMetadata.java:119)\n","stream":"stdout","time":"2020-10-23T12:48:50.415029863Z"}"}
org.apache.kafka.clients.producer.KafkaProducer.waitOnMetadata(KafkaProducer.java:1029)\n","stream":"stdout","time":"2020-10-23T12:48:50.415034336Z"}"}
org.apache.kafka.clients.producer.KafkaProducer.doSend(KafkaProducer.java:883)\n","stream":"stdout","time":"2020-10-23T12:48:50.415038722Z"}"}
org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:862)\n","stream":"stdout","time":"2020-10-23T12:48:50.415042939Z"}"}
org.springframework.kafka.core.DefaultKafkaProducerFactory$CloseSafeProducer.send(DefaultKafkaProducerFactory.java:781)\n","stream":"stdout","time":"2020-10-23T12:48:50.415047238Z"}"}
org.springframework.kafka.core.KafkaTemplate.doSend(KafkaTemplate.java:562)\n","stream":"stdout","time":"2020-10-23T12:48:50.415051555Z"}"}
org.springframework.kafka.core.KafkaTemplate.send(KafkaTemplate.java:369)\n","stream":"stdout","time":"2020-10-23T12:48:50.415055882Z"}"}
  

Есть идеи?

Комментарии:

1. что-нибудь новое относительно этого?

Ответ №1:

На данный момент это ошибка в компоненте Kafka producer, соответствующий тикет JIRA приведен ниже.

https://issues.apache.org/jira/browse/KAFKA-10902