[ 
https://issues.apache.org/jira/browse/KAFKA-2115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14492106#comment-14492106
 ] 

Onur Karaman commented on KAFKA-2115:
-------------------------------------

Trunk's coordinator is pretty much unimplemented. Without going into too many 
details, you're seeing this behavior because the coordinator never sends back 
the consumer id it generated for the consumer during the join group. So the 
consumer will just keep using the UNKNOWN_CONSUMER_ID (empty string). This will 
fail the heartbeat, making the consumer try to rejoin, again with 
UNKNOWN_CONSUMER_ID, causing the whole process to repeat. You can see in your 
logs the incrementing ids the coordinator made for the consumer, but the 
heartbeat logs show an empty consumer id. The 10 second gaps happens because 
heartbeats are sent at an interval of session.timeout.ms / 3.

My coordinator patch should address this: https://reviews.apache.org/r/33088

> Error updating metrics in RequestChannel
> ----------------------------------------
>
>                 Key: KAFKA-2115
>                 URL: https://issues.apache.org/jira/browse/KAFKA-2115
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Gwen Shapira
>            Assignee: Gwen Shapira
>         Attachments: KAFKA-2115.patch, KAFKA-2115_2015-04-12_21:28:12.patch
>
>
> Reported by [~jkreps] on the mailing list:
> {code}
>     kafka.common.KafkaException: Wrong request type 12
>     
>     at kafka.api.RequestKeys$.nameForKey(RequestKeys.scala:55)
>     
>     at
>     
> kafka.network.RequestChannel$Request.updateRequestMetrics(RequestChannel.scala:85)
>     
>     at kafka.network.Processor.write(SocketServer.scala:514)
>     
>     at kafka.network.Processor.run(SocketServer.scala:379)
>     
>     at java.lang.Thread.run(Thread.java:744)
>     
>     [2015-04-12 12:54:52,077] INFO [Kafka Coordinator 0]: Registered consumer
> my-group-24 for group my-group (kafka.coordinator.ConsumerCoordinator)
>     
>     [2015-04-12 12:54:52,080] INFO [Kafka Coordinator 0]: Handled join-group
>     from consumer  to group my-group (kafka.coordinator.ConsumerCoordinator)
>     [2015-04-12 12:54:52,081] ERROR Closing socket for /10.0.0.220 because of
>     error (kafka.network.Processor)
>     
>     kafka.common.KafkaException: Wrong request type 11
>     
>     at kafka.api.RequestKeys$.nameForKey(RequestKeys.scala:55)
>     
>     at
>     
> kafka.network.RequestChannel$Request.updateRequestMetrics(RequestChannel.scala:85)
>     
>     at kafka.network.Processor.write(SocketServer.scala:514)
>     
>     at kafka.network.Processor.run(SocketServer.scala:379)
>     
>      at java.lang.Thread.run(Thread.java:744)
> {code}
> This a result of KAFKA-2044 - we moved few Requests out
> of RequestKeys to the newer ApiKeys, but didn't update the metrics
> code.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to