question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Help: What causes InvalidSessionTimeoutError?

See original GitHub issue

Hi there! Hope it’s ok that I post my question here. I tried asking at #apache-kafka channel on IRC but was unable to get help.

I’m trying to set up kafka in prod, but running my python app returns the ff error:

2016-09-30 13:14:51,876.876.533985138:kafka.coordinator:140088372619072:ERROR:7654:Attempt to join group kafka-python-default-group failed due to fatal error: [Error 26] InvalidSessionTimeoutError: JoinGroupResponse_v0(error_code=26, generation_id=0, group_protocol=u'', leader_id=u'', member_id=u'', members=[])
Traceback (most recent call last):
  File "sightline_maps_lambda/main.py", line 50, in <module>
    main()
  File "sightline_maps_lambda/main.py", line 19, in main
    for message in consumer:
  File "/home/ubuntu/.local/lib/python2.7/site-packages/kafka/vendor/six.py", line 559, in next
    return type(self).__next__(self)
  File "/home/ubuntu/.local/lib/python2.7/site-packages/kafka/consumer/group.py", line 915, in __next__
    return next(self._iterator)
  File "/home/ubuntu/.local/lib/python2.7/site-packages/kafka/consumer/group.py", line 841, in _message_generator
    self._coordinator.ensure_active_group()
  File "/home/ubuntu/.local/lib/python2.7/site-packages/kafka/coordinator/base.py", line 270, in ensure_active_group
    raise exception # pylint: disable-msg=raising-bad-type
kafka.errors.InvalidSessionTimeoutError: [Error 26] InvalidSessionTimeoutError: JoinGroupResponse_v0(error_code=26, generation_id=0, group_protocol=u'', leader_id=u'', member_id=u'', members=[])
2016-09-30 13:14:51,877.877.21991539:kafka.producer.kafka:140088372619072:INFO:7654:Closing the Kafka producer with 999999999 secs timeout.
2016-09-30 13:14:51,894.894.371032715:kafka.producer.kafka:140088372619072:INFO:7654:Kafka producer closed

Any idea what’s causing the error? Here is a gist of my server.properties config file: https://gist.github.com/gjaldon/3b858ab6bb932138f97e01a087eeb12d

The python app works fine when running locally (OSX). I’m using kafka 0.10 and zookeeper locally that’s installed via brew.

In prod, I’m using kafka 0.9 kafka-python 1.3.1. Kafka and zookeeper are running in prod in the default ports (9091 and 2181) in localhost. My prod OS is Ubuntu 14.04. I tried creating a topic and producing messages for a topic in prod using the console commands and they work.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
gjaldoncommented, Sep 30, 2016

Ok just tested it out. It turns out session_timeout_ms should be within the range of group.min.session.timeout.ms and group.max.session.timeout.ms.

0reactions
gjaldoncommented, Sep 30, 2016

Btw, thanks a lot for the help, @dpkp!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invalid session id error and early session timeouts on ... - IBM
This technote explains why the error, "Invalid session id", occurs and causes premature session timeouts when using IBM® Rational® ClearQuest® Web Java.
Read more >
Resolving Session Time-Out Errors - Support Center
If you're receiving session timeout errors and having trouble logging in, there are a few easy steps you can take to correct the...
Read more >
Kafka enabled Azure Event Hub: Invalid session timeout in ...
I'm successful in sending messages to the event hub, but each time I try to initialize the receiver, I get this invalid session...
Read more >
Troubleshooting session related errors - BMC Documentation
This might cause because of the high value in the Session Timeout in Minutes field on the AR System User Preference record for...
Read more >
Session Timeout FAQ - "Session Has Expired" error
If you are browsing anonymously or your browser does not have cookies enabled it can cause many sessions to fail. Make sure your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found