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

redis-py version error #3809

Closed
battosai30 opened this issue Mar 7, 2019 · 3 comments
Closed

redis-py version error #3809

battosai30 opened this issue Mar 7, 2019 · 3 comments

Comments

@battosai30
Copy link

battosai30 commented Mar 7, 2019

Hi guys,

Describe the bug
Indico start and start again. When I ook into celery log :

> 019-03-07 12:17:43,300  INFO     celery.beat               beat: Starting...
> 2019-03-07 12:17:43,554  ERROR    celery.utils.dispatch.signal Signal handler <function _send_initial_heartbeat at 0x7fef9f23f0c8> raised: VersionMismatch(u'Redis transport requires redis-py versions 3.2.0 or later. You have 2.10.6',)
> Traceback (most recent call last):
>   File "/opt/indico/.venv/local/lib/python2.7/site-packages/celery/utils/dispatch/signal.py", line 230, in send
>     response = receiver(signal=self, sender=sender, **named)
>   File "/opt/indico/.venv/local/lib/python2.7/site-packages/indico/core/celery/__init__.py", line 68, in _send_initial_heartbeat
>     heartbeat.delay(initial=True)
>   File "/opt/indico/.venv/local/lib/python2.7/site-packages/celery/app/task.py", line 412, in delay
>     return self.apply_async(args, kwargs)
>   File "/opt/indico/.venv/local/lib/python2.7/site-packages/indico/core/celery/core.py", line 135, in apply_async
>     link=link, link_error=link_error, shadow=shadow, **options)
>   File "/opt/indico/.venv/local/lib/python2.7/site-packages/celery/app/task.py", line 535, in apply_async
>     **options
>   File "/opt/indico/.venv/local/lib/python2.7/site-packages/celery/app/base.py", line 728, in send_task
>     amqp.send_task_message(P, name, message, **options)
>   File "/opt/indico/.venv/local/lib/python2.7/site-packages/celery/app/amqp.py", line 552, in send_task_message
>     **properties
>   File "/opt/indico/.venv/local/lib/python2.7/site-packages/kombu/messaging.py", line 181, in publish
>     exchange_name, declare,
>   File "/opt/indico/.venv/local/lib/python2.7/site-packages/kombu/connection.py", line 510, in _ensured
>     return fun(*args, **kwargs)
>   File "/opt/indico/.venv/local/lib/python2.7/site-packages/kombu/messaging.py", line 187, in _publish
>     channel = self.channel
>   File "/opt/indico/.venv/local/lib/python2.7/site-packages/kombu/messaging.py", line 209, in _get_channel
>     channel = self._channel = channel()
>   File "/opt/indico/.venv/local/lib/python2.7/site-packages/kombu/utils/functional.py", line 44, in __call__
>     value = self.__value__ = self.__contract__()
>   File "/opt/indico/.venv/local/lib/python2.7/site-packages/kombu/messaging.py", line 224, in <lambda>
>     channel = ChannelPromise(lambda: connection.default_channel)
>   File "/opt/indico/.venv/local/lib/python2.7/site-packages/kombu/connection.py", line 852, in default_channel
>     self.ensure_connection(**conn_opts)
>   File "/opt/indico/.venv/local/lib/python2.7/site-packages/kombu/connection.py", line 422, in ensure_connection
>     callback, timeout=timeout)
>   File "/opt/indico/.venv/local/lib/python2.7/site-packages/kombu/utils/functional.py", line 341, in retry_over_time
>     return fun(*args, **kwargs)
>   File "/opt/indico/.venv/local/lib/python2.7/site-packages/kombu/connection.py", line 275, in connect
>     return self.connection
>   File "/opt/indico/.venv/local/lib/python2.7/site-packages/kombu/connection.py", line 823, in connection
>     self._connection = self._establish_connection()
>   File "/opt/indico/.venv/local/lib/python2.7/site-packages/kombu/connection.py", line 778, in _establish_connection
>     conn = self.transport.establish_connection()
>   File "/opt/indico/.venv/local/lib/python2.7/site-packages/kombu/transport/virtual/base.py", line 941, in establish_connection
>     self._avail_channels.append(self.create_channel(self))
>   File "/opt/indico/.venv/local/lib/python2.7/site-packages/kombu/transport/virtual/base.py", line 923, in create_channel
>     channel = self.Channel(connection)
>   File "/opt/indico/.venv/local/lib/python2.7/site-packages/kombu/transport/redis.py", line 495, in __init__
>     self.Client = self._get_client()
>   File "/opt/indico/.venv/local/lib/python2.7/site-packages/kombu/transport/redis.py", line 956, in _get_client
>     'You have {0.__version__}'.format(redis))
> 

So apparently there is a mismatch version. I am not a Python expert at all, and I spend hours trying to find a solution but I failed.

To Reproduce

Fresh install, I just followed the installation guide. Two differences in my case (i don't think the problem comes from here) :

  • it's an LXC container.
  • I use a nginx reverse proxy server to join my indico instance (but it seems to work well) so the SSL config is manage by the nginx, not the indico instance.

Regards

@ThiefMaster
Copy link
Member

ThiefMaster commented Mar 7, 2019

Looks like it's caused by celery/kombu#1016. Once again they released a new non-major version changing the requirements of their dependencies.

For now you can use this workaround:

pip uninstall -y kombu && pip install 'kombu==4.3.0'

@battosai30
Copy link
Author

Thank you so much it solved this issue. Now I can focus on the js errors ....

ThiefMaster added a commit that referenced this issue Mar 12, 2019
this fixes #3809 which was caused by the latest kombu version not being
compatible with the older python redis client
@ThiefMaster
Copy link
Member

I just released v2.1.8 which should fix this issue properly.

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

No branches or pull requests

2 participants