You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by cs...@dev.neoncrm.com on 2018/02/13 10:15:30 UTC

The Problem about Kafka 1.0

Hi Kafka guys,
 
I faced the following Exception when I sent message to Kafka 1.0 -
2018-02-13 04:45:49,861 INFO [STDOUT] org.apache.kafka.common.KafkaException: Cannot perform send because at least one previous transactional or idempotent request has failed with errors.
2018-02-13 04:45:49,861 ERROR [org.apache.kafka.clients.producer.internals.Sender] [TransactionalId e9ebda3a-d160-4441-b7e0-2f8ba150c59a] Aborting producer batches due to fatal error
org.apache.kafka.common.errors.ProducerFencedException: Producer attempted an operation with an old epoch. Either there is a newer producer with the same transactionalId, or the producer's transaction has been expired by the broker.
2018-02-13 04:45:49,861 INFO [STDOUT] at org.apache.kafka.clients.producer.internals.TransactionManager.failIfNotReadyForSend(TransactionManager.java:248)
2018-02-13 04:45:49,861 INFO [STDOUT] at org.apache.kafka.clients.producer.internals.TransactionManager.maybeAddPartitionToTransaction(TransactionManager.java:233)
2018-02-13 04:45:49,861 INFO [STDOUT] at org.apache.kafka.clients.producer.KafkaProducer.doSend(KafkaProducer.java:789)
2018-02-13 04:45:49,861 INFO [STDOUT] at org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:745)
2018-02-13 04:45:49,861 INFO [STDOUT] at org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:634)
2018-02-13 04:45:49,861 INFO [STDOUT] at com.z2.np.server.kafkaMQ.producer.Producer.send(Producer.java:103)
2018-02-13 04:45:49,861 INFO [STDOUT] at com.z2.np.server.kafkaMQ.producer.ProducerManager.sendMessage(ProducerManager.java:43)
2018-02-13 04:45:49,861 INFO [STDOUT] at com.z2.np.server.automation.workflow.scheduler.worker.AWAbstractScheduleWorker.sentOut(AWAbstractScheduleWorker.java:86)
2018-02-13 04:45:49,861 INFO [STDOUT] at com.z2.np.server.automation.workflow.scheduler.worker.AWTriggerScheduleWorker.doWork(AWTriggerScheduleWorker.java:114)
2018-02-13 04:45:49,861 INFO [STDOUT] at com.z2.np.server.automation.workflow.scheduler.worker.AWAbstractScheduleWorker.run(AWAbstractScheduleWorker.java:61)
2018-02-13 04:45:49,861 INFO [STDOUT] at java.util.concurrent.ForkJoinTask$AdaptedRunnable.exec(ForkJoinTask.java:1265)
2018-02-13 04:45:49,861 INFO [STDOUT] at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:334)
2018-02-13 04:45:49,861 INFO [STDOUT] at java.util.concurrent.ForkJoinWorkerThread.execTask(ForkJoinWorkerThread.java:604)
2018-02-13 04:45:49,861 INFO [STDOUT] at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:784)
2018-02-13 04:45:49,861 INFO [STDOUT] at java.util.concurrent.ForkJoinPool.work(ForkJoinPool.java:646)
2018-02-13 04:45:49,861 INFO [STDOUT] at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:398)
2018-02-13 04:45:49,861 INFO [STDOUT] Caused by: org.apache.kafka.common.errors.ProducerFencedException: Producer attempted an operation with an old epoch. Either there is a newer producer with the same transactionalId, or the producer's transaction has been expired by the broker.
What is the old epoch? I am very sure the transationalId is different  between Producers,
I have googled many many times but also can not find a real solution, I also found some other developers faced the same problem as I faced, but they also cannot get a solution.
 
Can you guys give me some help???  Thanks!!!!

Re: The Problem about Kafka 1.0

Posted by ga...@gmail.com, ga...@gmail.com.

On 2018/02/13 10:15:30, cshi@dev.neoncrm.com wrote: 
> 
> Hi Kafka guys,
>  
> I faced the following Exception when I sent message to Kafka 1.0 -
> 2018-02-13 04:45:49,861 INFO [STDOUT] org.apache.kafka.common.KafkaException: Cannot perform send because at least one previous transactional or idempotent request has failed with errors.
> 2018-02-13 04:45:49,861 ERROR [org.apache.kafka.clients.producer.internals.Sender] [TransactionalId e9ebda3a-d160-4441-b7e0-2f8ba150c59a] Aborting producer batches due to fatal error
> org.apache.kafka.common.errors.ProducerFencedException: Producer attempted an operation with an old epoch. Either there is a newer producer with the same transactionalId, or the producer's transaction has been expired by the broker.
> 2018-02-13 04:45:49,861 INFO [STDOUT] at org.apache.kafka.clients.producer.internals.TransactionManager.failIfNotReadyForSend(TransactionManager.java:248)
> 2018-02-13 04:45:49,861 INFO [STDOUT] at org.apache.kafka.clients.producer.internals.TransactionManager.maybeAddPartitionToTransaction(TransactionManager.java:233)
> 2018-02-13 04:45:49,861 INFO [STDOUT] at org.apache.kafka.clients.producer.KafkaProducer.doSend(KafkaProducer.java:789)
> 2018-02-13 04:45:49,861 INFO [STDOUT] at org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:745)
> 2018-02-13 04:45:49,861 INFO [STDOUT] at org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:634)
> 2018-02-13 04:45:49,861 INFO [STDOUT] at com.z2.np.server.kafkaMQ.producer.Producer.send(Producer.java:103)
> 2018-02-13 04:45:49,861 INFO [STDOUT] at com.z2.np.server.kafkaMQ.producer.ProducerManager.sendMessage(ProducerManager.java:43)
> 2018-02-13 04:45:49,861 INFO [STDOUT] at com.z2.np.server.automation.workflow.scheduler.worker.AWAbstractScheduleWorker.sentOut(AWAbstractScheduleWorker.java:86)
> 2018-02-13 04:45:49,861 INFO [STDOUT] at com.z2.np.server.automation.workflow.scheduler.worker.AWTriggerScheduleWorker.doWork(AWTriggerScheduleWorker.java:114)
> 2018-02-13 04:45:49,861 INFO [STDOUT] at com.z2.np.server.automation.workflow.scheduler.worker.AWAbstractScheduleWorker.run(AWAbstractScheduleWorker.java:61)
> 2018-02-13 04:45:49,861 INFO [STDOUT] at java.util.concurrent.ForkJoinTask$AdaptedRunnable.exec(ForkJoinTask.java:1265)
> 2018-02-13 04:45:49,861 INFO [STDOUT] at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:334)
> 2018-02-13 04:45:49,861 INFO [STDOUT] at java.util.concurrent.ForkJoinWorkerThread.execTask(ForkJoinWorkerThread.java:604)
> 2018-02-13 04:45:49,861 INFO [STDOUT] at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:784)
> 2018-02-13 04:45:49,861 INFO [STDOUT] at java.util.concurrent.ForkJoinPool.work(ForkJoinPool.java:646)
> 2018-02-13 04:45:49,861 INFO [STDOUT] at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:398)
> 2018-02-13 04:45:49,861 INFO [STDOUT] Caused by: org.apache.kafka.common.errors.ProducerFencedException: Producer attempted an operation with an old epoch. Either there is a newer producer with the same transactionalId, or the producer's transaction has been expired by the broker.
> What is the old epoch? I am very sure the transationalId is different  between Producers,
> I have googled many many times but also can not find a real solution, I also found some other developers faced the same problem as I faced, but they also cannot get a solution.
>  
> Can you guys give me some help???  Thanks!!!!