[ https://issues.apache.org/jira/browse/KAFKA-9765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17314041#comment-17314041 ]
Mikael Carlstedt commented on KAFKA-9765: ----------------------------------------- I ran into the same issue with 2.4.1, upgraded to 2.5.0 and so far so good. > Could not add partitions to transaction due to errors > ----------------------------------------------------- > > Key: KAFKA-9765 > URL: https://issues.apache.org/jira/browse/KAFKA-9765 > Project: Kafka > Issue Type: Bug > Components: clients, producer > Affects Versions: 2.3.1 > Reporter: Prashant Waykar > Priority: Blocker > > I am following the producer with transactions example in > [https://kafka.apache.org/23/javadoc/org/apache/kafka/clients/producer/KafkaProducer.html,] > and on kafkaException, I use abortTransaction and retry. > I am seeing these exceptions. Has anyone experienced this before ? Please > suggest > {code:java} > // code placeholder > java.util.concurrent.ExecutionException: > org.apache.kafka.common.KafkaException: Could not add partitions to > transaction due to errors: {nfvAlarmJob-0=UNKNOWN_SERVER_ERROR} > at > org.apache.kafka.clients.producer.internals.FutureRecordMetadata.valueOrError(FutureRecordMetadata.java:98) > at > org.apache.kafka.clients.producer.internals.FutureRecordMetadata.get(FutureRecordMetadata.java:67) > at > org.apache.kafka.clients.producer.internals.FutureRecordMetadata.get(FutureRecordMetadata.java:30) > at > com.vmware.vchs.hybridity.messaging.kafka.KafkaProducerDelegate.publishMessageWithTransaction(KafkaProducerDelegate.java:197) > at > com.vmware.vchs.hybridity.messaging.kafka.KafkaProducerDelegate.publish(KafkaProducerDelegate.java:164) > at > com.vmware.vchs.hybridity.messaging.kafka.KafkaProducerDelegate.publish(KafkaProducerDelegate.java:158) > at > com.vmware.vchs.hybridity.messaging.adapter.JobManagerJobPublisher.publish(JobManagerJobPublisher.java:140) > at > com.vmware.vchs.hybridity.messaging.adapter.JobManager.queueJob(JobManager.java:1720) > at > com.vmware.vchs.hybridity.messaging.adapter.JobManagementAdapter.queueJob(JobManagementAdapter.java:80) > at > com.vmware.vchs.hybridity.messaging.adapter.JobManagementAdapter.queueJob(JobManagementAdapter.java:70) > at > com.vmware.vchs.hybridity.messaging.adapter.JobManagedService.queueJob(JobManagedService.java:168) > at > com.vmware.hybridity.nfvm.alarm.UpdateVcenterAlarmsJob.run(UpdateVcenterAlarmsJob.java:67) > at > com.vmware.vchs.hybridity.messaging.LoggingJobWrapper.run(LoggingJobWrapper.java:41) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > at java.util.concurrent.FutureTask.run(FutureTask.java:266) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) > 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: Could not add partitions > to transaction due to errors: {nfvAlarmJob-0=UNKNOWN_SERVER_ERROR} > at > org.apache.kafka.clients.producer.internals.TransactionManager$AddPartitionsToTxnHandler.handleResponse(TransactionManager.java:1230) > at > org.apache.kafka.clients.producer.internals.TransactionManager$TxnRequestHandler.onComplete(TransactionManager.java:1069) > at > org.apache.kafka.clients.ClientResponse.onComplete(ClientResponse.java:109) > at > org.apache.kafka.clients.NetworkClient.completeResponses(NetworkClient.java:561) > at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:553) > at > org.apache.kafka.clients.producer.internals.Sender.maybeSendAndPollTransactionalRequest(Sender.java:425) > at > org.apache.kafka.clients.producer.internals.Sender.runOnce(Sender.java:311) > at > org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:244) > ... 1 common frames omitted > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)