Description
Mirror maker hangs indefinitely upon receiving CommitFailedException. I believe this is due to CommitFailedException not caught by mirror maker and mirror maker has no way to recover from it.
A better approach will be catching the exception and rejoin the group. Here is the stack trace
[2016-03-15 09:34:36,463] ERROR Error UNKNOWN_MEMBER_ID occurred while committing offsets for group xxxxx (org.apache.kafka.clients.consumer.internals.ConsumerCoordinator)
[2016-03-15 09:34:36,463] FATAL [mirrormaker-thread-3] Mirror maker thread failure due to (kafka.tools.MirrorMaker$MirrorMakerThread)
org.apache.kafka.clients.consumer.CommitFailedException: Commit cannot be completed due to group rebalance
at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator$OffsetCommitResponseHandler.handle(ConsumerCoordinator.java:552)
at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator$OffsetCommitResponseHandler.handle(ConsumerCoordinator.java:493)
at org.apache.kafka.clients.consumer.internals.AbstractCoordinator$CoordinatorResponseHandler.onSuccess(AbstractCoordinator.java:665)
at org.apache.kafka.clients.consumer.internals.AbstractCoordinator$CoordinatorResponseHandler.onSuccess(AbstractCoordinator.java:644)
at org.apache.kafka.clients.consumer.internals.RequestFuture$1.onSuccess(RequestFuture.java:167)
at org.apache.kafka.clients.consumer.internals.RequestFuture.fireSuccess(RequestFuture.java:133)
at org.apache.kafka.clients.consumer.internals.RequestFuture.complete(RequestFuture.java:107)
at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient$RequestFutureCompletionHandler.onComplete(ConsumerNetworkClient.java:380)
at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:274)
at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.clientPoll(ConsumerNetworkClient.java:320)
at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:213)
at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:193)
at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:163)
at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.commitOffsetsSync(ConsumerCoordinator.java:358)
at org.apache.kafka.clients.consumer.KafkaConsumer.commitSync(KafkaConsumer.java:968)
at kafka.tools.MirrorMaker$MirrorMakerNewConsumer.commit(MirrorMaker.scala:548)
at kafka.tools.MirrorMaker$.commitOffsets(MirrorMaker.scala:340)
at kafka.tools.MirrorMaker$MirrorMakerThread.maybeFlushAndCommitOffsets(MirrorMaker.scala:438)
at kafka.tools.MirrorMaker$MirrorMakerThread.run(MirrorMaker.scala:399)
[2016-03-15 09:34:36,463] INFO [mirrormaker-thread-3] Flushing producer. (kafka.tools.MirrorMaker$MirrorMakerThread)
[2016-03-15 09:34:36,464] INFO [mirrormaker-thread-3] Committing consumer offsets. (kafka.tools.MirrorMaker$MirrorMakerThread)
[2016-03-15 09:34:36,477] ERROR Error UNKNOWN_MEMBER_ID occurred while committing offsets for group xxxxx (org.apache.kafka.clients.consumer.internals.ConsumerCoordinator)
Attachments
Issue Links
- is duplicated by
-
KAFKA-3056 MirrorMaker with new consumer doesn't handle CommitFailedException
- Resolved