Closed dcrosta closed 4 years ago
I should be clear, I'm seeing that in the output of a logging.error
call:
2017-05-30 19:17:00,136 [kafka.future:ERROR] Error processing callback
Traceback (most recent call last):
...
I've just restarted the process again, and did not observe this error logged again. From a glance at the code in https://github.com/dpkp/kafka-python/blob/master/kafka/coordinator/consumer.py#L540-L559, it looks like this error is being 'handled' by saying, "it happened, not much we can do about it", and moving on with our lives. Presumably future offset commits will happen at their regularly scheduled intervals.
This looks like a bug caused by using a group_id while assigning partitions manually. Our test suite doesn't cover that use case particularly well yet. I suspect there are a few edge cases here and there that need to get handled in this scenario. Nonetheless, it should be fine to move on with your lives in this case :)
OK thanks -- let me know if I can help here at all.
I believe this is fixed by #1266
I have a similar issue where I have some processes consuming a topic in subscribe mode. Then I stop those processes (invoking close()). Shortly afterwards, if I try to advance the offsets (in a separate script) on the same topic I get the IllegalStateError asynchronously and the process hangs. I am basically doing the following:
consumer.assign(topicPartitions)
consumer.seek_to_end(*topicPartitions)
for tp in topicPartitions:
consumer.commit({tp: OffsetAndMetadata(consumer.position(tp), None)})
The issue disappears after several minutes.
Fixed in #1364
Kafka 0.10.0.1 Kafka-Python 1.3.3
I create a consumer like:
And then consume from it using
for message in consumer:
in the usual way.Some time later (a few seconds after beginning consuming in the for loop), I get:
I don't call
subscribe()
anywhere, norassign()
anywhere else or again. This looks like it's coming from_handle_offset_commit_response
asynchronously, but I don't know why it would be.Mostly I want to understand if I am supposed to do anything with this error, and, given that it's happening asynchronously, if I even can do anything with it (will it bubble up in a
try:
block anywhere? I think not, if it's on another thread, for instance)