[jira] [Commented] (KAFKA-8052) Intermittent INVALID_FETCH_SESSION_EPOCH error on FETCH request
[ https://issues.apache.org/jira/browse/KAFKA-8052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17181079#comment-17181079 ] Akshay Sharma commented on KAFKA-8052: -- [~rsivaram], Hi i'm seeing this issue in 2.3.0 kafka build also. I've raised a bug for the same. https://issues.apache.org/jira/browse/KAFKA-10423 > Intermittent INVALID_FETCH_SESSION_EPOCH error on FETCH request > > > Key: KAFKA-8052 > URL: https://issues.apache.org/jira/browse/KAFKA-8052 > Project: Kafka > Issue Type: Bug > Components: clients >Affects Versions: 2.1.0 >Reporter: Bartek Jakub >Assignee: Rajini Sivaram >Priority: Major > Fix For: 2.3.0 > > > I noticed in my logs some weird behavior. I see in logs intermittent log: > {noformat} > 2019-03-06 14:02:13.024 INFO 1 --- [container-1-C-1] > o.a.kafka.clients.FetchSessionHandler : [Consumer clientId=consumer-4, > groupId=service-main] Node 2 was unable to process the fetch request with > (sessionId=1321134604, epoch=125730): INVALID_FETCH_SESSION_EPOCH.{noformat} > which happens every ~1 hour. > > I was wondering if it's my Kafka provider fault so I decided to investigate > the problem and I tried to reproduce the issue on my local - with success. My > configuration is: > * Kafka Clients version - 2.0.1 > * Kafka - 2.12_2.1.0 > > I enabled trace logs for 'org.apache.kafka.clients' and that's what I get: > {noformat} > 2019-03-05 21:04:16.161 DEBUG 3052 --- [container-0-C-1] > o.a.kafka.clients.FetchSessionHandler : [Consumer clientId=consumer-3, > groupId=service-main] Built incremental fetch (sessionId=197970881, > epoch=525) for node 1001. Added (), altered (), removed () out of > (itunes-command-19, itunes-command-18, itunes-command-11, itunes-command-10, > itunes-command-13, itunes-command-12, itunes-command-15, itunes-command-14, > itunes-command-17, itunes-command-16) > 2019-03-05 21:04:16.161 DEBUG 3052 --- [container-0-C-1] > o.a.k.c.consumer.internals.Fetcher : [Consumer clientId=consumer-3, > groupId=service-main] Sending READ_UNCOMMITTED > IncrementalFetchRequest(toSend=(), toForget=(), implied=(itunes-command-19, > itunes-command-18, itunes-command-11, itunes-command-10, itunes-command-13, > itunes-command-12, itunes-command-15, itunes-command-14, itunes-command-17, > itunes-command-16)) to broker localhost:9092 (id: 1001 rack: null) > 2019-03-05 21:04:16.161 TRACE 3052 --- [container-0-C-1] > org.apache.kafka.clients.NetworkClient : [Consumer clientId=consumer-3, > groupId=service-main] Sending FETCH > {replica_id=-1,max_wait_time=500,min_bytes=1,max_bytes=52428800,isolation_level=0,session_id=197970881,epoch=525,topics=[],forgotten_topics_data=[]} > with correlation id 629 to node 1001 > 2019-03-05 21:04:16.664 TRACE 3052 --- [container-0-C-1] > org.apache.kafka.clients.NetworkClient : [Consumer clientId=consumer-3, > groupId=service-main] Completed receive from node 1001 for FETCH with > correlation id 629, received > {throttle_time_ms=0,error_code=0,session_id=197970881,responses=[]} > 2019-03-05 21:04:16.664 DEBUG 3052 --- [container-0-C-1] > o.a.kafka.clients.FetchSessionHandler : [Consumer clientId=consumer-3, > groupId=service-main] Node 1001 sent an incremental fetch response for > session 197970881 with response=(), implied=(itunes-command-19, > itunes-command-18, itunes-command-11, itunes-command-10, itunes-command-13, > itunes-command-12, itunes-command-15, itunes-command-14, itunes-command-17, > itunes-command-16) > 2019-03-05 21:04:16.665 DEBUG 3052 --- [container-0-C-1] > o.a.kafka.clients.FetchSessionHandler : [Consumer clientId=consumer-3, > groupId=service-main] Built incremental fetch (sessionId=197970881, > epoch=526) for node 1001. Added (), altered (), removed () out of > (itunes-command-19, itunes-command-18, itunes-command-11, itunes-command-10, > itunes-command-13, itunes-command-12, itunes-command-15, itunes-command-14, > itunes-command-17, itunes-command-16) > 2019-03-05 21:04:16.665 DEBUG 3052 --- [container-0-C-1] > o.a.k.c.consumer.internals.Fetcher : [Consumer clientId=consumer-3, > groupId=service-main] Sending READ_UNCOMMITTED > IncrementalFetchRequest(toSend=(), toForget=(), implied=(itunes-command-19, > itunes-command-18, itunes-command-11, itunes-command-10, itunes-command-13, > itunes-command-12, itunes-command-15, itunes-command-14, itunes-command-17, > itunes-command-16)) to broker localhost:9092 (id: 1001 rack: null) > 2019-03-05 21:04:16.665 TRACE 3052 --- [container-0-C-1] > org.apache.kafka.clients.NetworkClient : [Consumer clientId=consumer-3, > groupId=service-main - F630] Sending FETCH > {replica_id=-1,max_wait_time=500,min_bytes=1,max_bytes=52428800,isolation_level=0,session_id=197970881,epoch=526,topics=[],
[jira] [Commented] (KAFKA-8052) Intermittent INVALID_FETCH_SESSION_EPOCH error on FETCH request
[ https://issues.apache.org/jira/browse/KAFKA-8052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16845248#comment-16845248 ] ASF GitHub Bot commented on KAFKA-8052: --- rajinisivaram commented on pull request #6582: KAFKA-8052; Ensure fetch session epoch is updated before new request URL: https://github.com/apache/kafka/pull/6582 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Intermittent INVALID_FETCH_SESSION_EPOCH error on FETCH request > > > Key: KAFKA-8052 > URL: https://issues.apache.org/jira/browse/KAFKA-8052 > Project: Kafka > Issue Type: Bug > Components: clients >Affects Versions: 2.1.0 >Reporter: Bartek Jakub >Assignee: Rajini Sivaram >Priority: Major > > I noticed in my logs some weird behavior. I see in logs intermittent log: > {noformat} > 2019-03-06 14:02:13.024 INFO 1 --- [container-1-C-1] > o.a.kafka.clients.FetchSessionHandler : [Consumer clientId=consumer-4, > groupId=service-main] Node 2 was unable to process the fetch request with > (sessionId=1321134604, epoch=125730): INVALID_FETCH_SESSION_EPOCH.{noformat} > which happens every ~1 hour. > > I was wondering if it's my Kafka provider fault so I decided to investigate > the problem and I tried to reproduce the issue on my local - with success. My > configuration is: > * Kafka Clients version - 2.0.1 > * Kafka - 2.12_2.1.0 > > I enabled trace logs for 'org.apache.kafka.clients' and that's what I get: > {noformat} > 2019-03-05 21:04:16.161 DEBUG 3052 --- [container-0-C-1] > o.a.kafka.clients.FetchSessionHandler : [Consumer clientId=consumer-3, > groupId=service-main] Built incremental fetch (sessionId=197970881, > epoch=525) for node 1001. Added (), altered (), removed () out of > (itunes-command-19, itunes-command-18, itunes-command-11, itunes-command-10, > itunes-command-13, itunes-command-12, itunes-command-15, itunes-command-14, > itunes-command-17, itunes-command-16) > 2019-03-05 21:04:16.161 DEBUG 3052 --- [container-0-C-1] > o.a.k.c.consumer.internals.Fetcher : [Consumer clientId=consumer-3, > groupId=service-main] Sending READ_UNCOMMITTED > IncrementalFetchRequest(toSend=(), toForget=(), implied=(itunes-command-19, > itunes-command-18, itunes-command-11, itunes-command-10, itunes-command-13, > itunes-command-12, itunes-command-15, itunes-command-14, itunes-command-17, > itunes-command-16)) to broker localhost:9092 (id: 1001 rack: null) > 2019-03-05 21:04:16.161 TRACE 3052 --- [container-0-C-1] > org.apache.kafka.clients.NetworkClient : [Consumer clientId=consumer-3, > groupId=service-main] Sending FETCH > {replica_id=-1,max_wait_time=500,min_bytes=1,max_bytes=52428800,isolation_level=0,session_id=197970881,epoch=525,topics=[],forgotten_topics_data=[]} > with correlation id 629 to node 1001 > 2019-03-05 21:04:16.664 TRACE 3052 --- [container-0-C-1] > org.apache.kafka.clients.NetworkClient : [Consumer clientId=consumer-3, > groupId=service-main] Completed receive from node 1001 for FETCH with > correlation id 629, received > {throttle_time_ms=0,error_code=0,session_id=197970881,responses=[]} > 2019-03-05 21:04:16.664 DEBUG 3052 --- [container-0-C-1] > o.a.kafka.clients.FetchSessionHandler : [Consumer clientId=consumer-3, > groupId=service-main] Node 1001 sent an incremental fetch response for > session 197970881 with response=(), implied=(itunes-command-19, > itunes-command-18, itunes-command-11, itunes-command-10, itunes-command-13, > itunes-command-12, itunes-command-15, itunes-command-14, itunes-command-17, > itunes-command-16) > 2019-03-05 21:04:16.665 DEBUG 3052 --- [container-0-C-1] > o.a.kafka.clients.FetchSessionHandler : [Consumer clientId=consumer-3, > groupId=service-main] Built incremental fetch (sessionId=197970881, > epoch=526) for node 1001. Added (), altered (), removed () out of > (itunes-command-19, itunes-command-18, itunes-command-11, itunes-command-10, > itunes-command-13, itunes-command-12, itunes-command-15, itunes-command-14, > itunes-command-17, itunes-command-16) > 2019-03-05 21:04:16.665 DEBUG 3052 --- [container-0-C-1] > o.a.k.c.consumer.internals.Fetcher : [Consumer clientId=consumer-3, > groupId=service-main] Sending READ_UNCOMMITTED > IncrementalFetchRequest(toSend=(), toForget=(), implied=(itunes-command-19, > itunes-command-18, itunes-command-11, itunes-command-10, itunes-command-13, > itunes-command-12, itunes-command-15, itunes-command-14, itunes-command-17, > itunes-command-16)) to broker localhost:9092 (id: 1001 rac
[jira] [Commented] (KAFKA-8052) Intermittent INVALID_FETCH_SESSION_EPOCH error on FETCH request
[ https://issues.apache.org/jira/browse/KAFKA-8052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16842386#comment-16842386 ] Andrew Olson commented on KAFKA-8052: - [~rsivaram] There are some comments on your pull request, as well as a merge conflict that needs resolved. > Intermittent INVALID_FETCH_SESSION_EPOCH error on FETCH request > > > Key: KAFKA-8052 > URL: https://issues.apache.org/jira/browse/KAFKA-8052 > Project: Kafka > Issue Type: Bug > Components: clients >Affects Versions: 2.1.0 >Reporter: Bartek Jakub >Assignee: Rajini Sivaram >Priority: Major > > I noticed in my logs some weird behavior. I see in logs intermittent log: > {noformat} > 2019-03-06 14:02:13.024 INFO 1 --- [container-1-C-1] > o.a.kafka.clients.FetchSessionHandler : [Consumer clientId=consumer-4, > groupId=service-main] Node 2 was unable to process the fetch request with > (sessionId=1321134604, epoch=125730): INVALID_FETCH_SESSION_EPOCH.{noformat} > which happens every ~1 hour. > > I was wondering if it's my Kafka provider fault so I decided to investigate > the problem and I tried to reproduce the issue on my local - with success. My > configuration is: > * Kafka Clients version - 2.0.1 > * Kafka - 2.12_2.1.0 > > I enabled trace logs for 'org.apache.kafka.clients' and that's what I get: > {noformat} > 2019-03-05 21:04:16.161 DEBUG 3052 --- [container-0-C-1] > o.a.kafka.clients.FetchSessionHandler : [Consumer clientId=consumer-3, > groupId=service-main] Built incremental fetch (sessionId=197970881, > epoch=525) for node 1001. Added (), altered (), removed () out of > (itunes-command-19, itunes-command-18, itunes-command-11, itunes-command-10, > itunes-command-13, itunes-command-12, itunes-command-15, itunes-command-14, > itunes-command-17, itunes-command-16) > 2019-03-05 21:04:16.161 DEBUG 3052 --- [container-0-C-1] > o.a.k.c.consumer.internals.Fetcher : [Consumer clientId=consumer-3, > groupId=service-main] Sending READ_UNCOMMITTED > IncrementalFetchRequest(toSend=(), toForget=(), implied=(itunes-command-19, > itunes-command-18, itunes-command-11, itunes-command-10, itunes-command-13, > itunes-command-12, itunes-command-15, itunes-command-14, itunes-command-17, > itunes-command-16)) to broker localhost:9092 (id: 1001 rack: null) > 2019-03-05 21:04:16.161 TRACE 3052 --- [container-0-C-1] > org.apache.kafka.clients.NetworkClient : [Consumer clientId=consumer-3, > groupId=service-main] Sending FETCH > {replica_id=-1,max_wait_time=500,min_bytes=1,max_bytes=52428800,isolation_level=0,session_id=197970881,epoch=525,topics=[],forgotten_topics_data=[]} > with correlation id 629 to node 1001 > 2019-03-05 21:04:16.664 TRACE 3052 --- [container-0-C-1] > org.apache.kafka.clients.NetworkClient : [Consumer clientId=consumer-3, > groupId=service-main] Completed receive from node 1001 for FETCH with > correlation id 629, received > {throttle_time_ms=0,error_code=0,session_id=197970881,responses=[]} > 2019-03-05 21:04:16.664 DEBUG 3052 --- [container-0-C-1] > o.a.kafka.clients.FetchSessionHandler : [Consumer clientId=consumer-3, > groupId=service-main] Node 1001 sent an incremental fetch response for > session 197970881 with response=(), implied=(itunes-command-19, > itunes-command-18, itunes-command-11, itunes-command-10, itunes-command-13, > itunes-command-12, itunes-command-15, itunes-command-14, itunes-command-17, > itunes-command-16) > 2019-03-05 21:04:16.665 DEBUG 3052 --- [container-0-C-1] > o.a.kafka.clients.FetchSessionHandler : [Consumer clientId=consumer-3, > groupId=service-main] Built incremental fetch (sessionId=197970881, > epoch=526) for node 1001. Added (), altered (), removed () out of > (itunes-command-19, itunes-command-18, itunes-command-11, itunes-command-10, > itunes-command-13, itunes-command-12, itunes-command-15, itunes-command-14, > itunes-command-17, itunes-command-16) > 2019-03-05 21:04:16.665 DEBUG 3052 --- [container-0-C-1] > o.a.k.c.consumer.internals.Fetcher : [Consumer clientId=consumer-3, > groupId=service-main] Sending READ_UNCOMMITTED > IncrementalFetchRequest(toSend=(), toForget=(), implied=(itunes-command-19, > itunes-command-18, itunes-command-11, itunes-command-10, itunes-command-13, > itunes-command-12, itunes-command-15, itunes-command-14, itunes-command-17, > itunes-command-16)) to broker localhost:9092 (id: 1001 rack: null) > 2019-03-05 21:04:16.665 TRACE 3052 --- [container-0-C-1] > org.apache.kafka.clients.NetworkClient : [Consumer clientId=consumer-3, > groupId=service-main - F630] Sending FETCH > {replica_id=-1,max_wait_time=500,min_bytes=1,max_bytes=52428800,isolation_level=0,session_id=197970881,epoch=526,topics=[],forgotten_topics_data=[]} > with correlation id 630 to node 1001 > 2019-0
[jira] [Commented] (KAFKA-8052) Intermittent INVALID_FETCH_SESSION_EPOCH error on FETCH request
[ https://issues.apache.org/jira/browse/KAFKA-8052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16817274#comment-16817274 ] ASF GitHub Bot commented on KAFKA-8052: --- rajinisivaram commented on pull request #6582: KAFKA-8052; Ensure fetch session epoch is updated before new request URL: https://github.com/apache/kafka/pull/6582 When fetch response is processed by the heartbeat thread, polling thread may send new fetch request with the same epoch as the previous fetch request if heartbeat thread hasn't yet updated the epoch. This results in INVALID_FETCH_SESSION_EPOCH error. Even though the request is retried without any disconnections, it will be good to avoid this error. The PR tracks status of previous request in the session handler and sends next fetch request only after the response from the previous request is processed. ### Committer Checklist (excluded from commit message) - [ ] Verify design and implementation - [ ] Verify test coverage and CI build status - [ ] Verify documentation (including upgrade notes) This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Intermittent INVALID_FETCH_SESSION_EPOCH error on FETCH request > > > Key: KAFKA-8052 > URL: https://issues.apache.org/jira/browse/KAFKA-8052 > Project: Kafka > Issue Type: Bug > Components: clients >Affects Versions: 2.1.0 >Reporter: Bartek Jakub >Assignee: Rajini Sivaram >Priority: Major > > I noticed in my logs some weird behavior. I see in logs intermittent log: > {noformat} > 2019-03-06 14:02:13.024 INFO 1 --- [container-1-C-1] > o.a.kafka.clients.FetchSessionHandler : [Consumer clientId=consumer-4, > groupId=service-main] Node 2 was unable to process the fetch request with > (sessionId=1321134604, epoch=125730): INVALID_FETCH_SESSION_EPOCH.{noformat} > which happens every ~1 hour. > > I was wondering if it's my Kafka provider fault so I decided to investigate > the problem and I tried to reproduce the issue on my local - with success. My > configuration is: > * Kafka Clients version - 2.0.1 > * Kafka - 2.12_2.1.0 > > I enabled trace logs for 'org.apache.kafka.clients' and that's what I get: > {noformat} > 2019-03-05 21:04:16.161 DEBUG 3052 --- [container-0-C-1] > o.a.kafka.clients.FetchSessionHandler : [Consumer clientId=consumer-3, > groupId=service-main] Built incremental fetch (sessionId=197970881, > epoch=525) for node 1001. Added (), altered (), removed () out of > (itunes-command-19, itunes-command-18, itunes-command-11, itunes-command-10, > itunes-command-13, itunes-command-12, itunes-command-15, itunes-command-14, > itunes-command-17, itunes-command-16) > 2019-03-05 21:04:16.161 DEBUG 3052 --- [container-0-C-1] > o.a.k.c.consumer.internals.Fetcher : [Consumer clientId=consumer-3, > groupId=service-main] Sending READ_UNCOMMITTED > IncrementalFetchRequest(toSend=(), toForget=(), implied=(itunes-command-19, > itunes-command-18, itunes-command-11, itunes-command-10, itunes-command-13, > itunes-command-12, itunes-command-15, itunes-command-14, itunes-command-17, > itunes-command-16)) to broker localhost:9092 (id: 1001 rack: null) > 2019-03-05 21:04:16.161 TRACE 3052 --- [container-0-C-1] > org.apache.kafka.clients.NetworkClient : [Consumer clientId=consumer-3, > groupId=service-main] Sending FETCH > {replica_id=-1,max_wait_time=500,min_bytes=1,max_bytes=52428800,isolation_level=0,session_id=197970881,epoch=525,topics=[],forgotten_topics_data=[]} > with correlation id 629 to node 1001 > 2019-03-05 21:04:16.664 TRACE 3052 --- [container-0-C-1] > org.apache.kafka.clients.NetworkClient : [Consumer clientId=consumer-3, > groupId=service-main] Completed receive from node 1001 for FETCH with > correlation id 629, received > {throttle_time_ms=0,error_code=0,session_id=197970881,responses=[]} > 2019-03-05 21:04:16.664 DEBUG 3052 --- [container-0-C-1] > o.a.kafka.clients.FetchSessionHandler : [Consumer clientId=consumer-3, > groupId=service-main] Node 1001 sent an incremental fetch response for > session 197970881 with response=(), implied=(itunes-command-19, > itunes-command-18, itunes-command-11, itunes-command-10, itunes-command-13, > itunes-command-12, itunes-command-15, itunes-command-14, itunes-command-17, > itunes-command-16) > 2019-03-05 21:04:16.665 DEBUG 3052 --- [container-0-C-1] > o.a.kafka.clients.FetchSessionHandler : [Consumer clientId=consumer-3, > groupId=service-main] Built incremental fetch (sessionId=197970881, > epoch=526) for n