Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebalance breaks running consumers: Cannot read property '0' of undefined #558

Open
asiborro opened this issue Nov 20, 2019 · 6 comments
Open
Labels

Comments

@asiborro
Copy link

Hello everyone,

We have a service consuming 2 topics with 32 partitions each. When a rebalance happens in the group we get the following error:

Crash: KafkaJSNumberOfRetriesExceeded: Cannot read property '0' of undefined
stack: KafkaJSNumberOfRetriesExceeded
  Caused by: TypeError: Cannot read property '0' of undefined
    at /opt/app/services/sc-portal-search-consumer/node_modules/kafkajs/src/consumer/offsetManager/index.js:219:50
    at Array.filter (<anonymous>)
    at topicsWithPartitionsToCommit.topics.map.topic (/opt/app/services/sc-portal-search-consumer/node_modules/kafkajs/src/consumer/offsetManager/index.js:230:12)
    at Array.map (<anonymous>)
    at OffsetManager.uncommittedOffsets (/opt/app/services/sc-portal-search-consumer/node_modules/kafkajs/src/consumer/offsetManager/index.js:226:8)
    at OffsetManager.commitOffsets (/opt/app/services/sc-portal-search-consumer/node_modules/kafkajs/src/consumer/offsetManager/index.js:239:27)
    at ConsumerGroup.commitOffsets (/opt/app/services/sc-portal-search-consumer/node_modules/kafkajs/src/consumer/consumerGroup.js:290:30)
    at Runner.autoCommitOffsets (/opt/app/services/sc-portal-search-consumer/node_modules/kafkajs/src/consumer/runner.js:380:33)
    at Runner.processEachBatch (/opt/app/services/sc-portal-search-consumer/node_modules/kafkajs/src/consumer/runner.js:221:18)
    at process._tickCallback (internal/process/next_tick.js:68:7)

The consumer is configured to run 2 concurrent batches.
Thanks

@asiborro asiborro changed the title Rebalance breaks running consumers Rebalance breaks running consumers: Cannot read property '0' of undefined Nov 20, 2019
@Nevon Nevon added the bug label Nov 21, 2019
@tulios
Copy link
Owner

tulios commented Dec 2, 2019

I think this is related to #555; I am currently investigating the issue

@songpr
Copy link

songpr commented Jan 2, 2020

@tulios as commented in #555, the #582 do not fix issue in #555 and this bug.

@ankon
Copy link
Contributor

ankon commented Jun 23, 2020

This looks similar to the issue we saw in #775.

@williamoliveira
Copy link

no fix yet?

@jiho-kr
Copy link

jiho-kr commented Dec 13, 2023

Is it progressing?

@woderchen
Copy link

woderchen commented Jul 2, 2024

resolve this bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants