Django Redis错误未知命令"BZPOPMIN" [英] Django Redis Error unknown command 'BZPOPMIN'

查看:269
本文介绍了Django Redis错误未知命令"BZPOPMIN"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了 Redis 3.0.54 .Django已更新.我正在从教程页面中学习频道.

I've installed Redis 3.0.54. Django is updated. I'm learning channels from the tutorial page.

这是我的redis-cli和redis服务器的终端窗口终端的图像

This is my terminal window for redis-cli and redis server Image of Terminal

System check identified no issues (0 silenced).
August 06, 2020 - 16:04:58
Django version 3.1, using settings 'mysite.settings'
Starting ASGI/Channels version 2.4.0 development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
HTTP GET /chat/lobby/ 200 [0.02, 127.0.0.1:60841]
WebSocket HANDSHAKING /ws/chat/lobby/ [127.0.0.1:60843]
WebSocket CONNECT /ws/chat/lobby/ [127.0.0.1:60843]
Exception inside application: ERR unknown command 'BZPOPMIN'
Traceback (most recent call last):
  File "C:\Users\\Envs\py2\lib\site-packages\channels\sessions.py", line 183, in __call__
    return await self.inner(receive, self.send)
  File "C:\Users\\Envs\py2\lib\site-packages\channels\middleware.py", line 41, in coroutine_call
    await inner_instance(receive, send)
  File "C:\Users\\Envs\py2\lib\site-packages\channels\consumer.py", line 59, in __call__
    [receive, self.channel_receive], self.dispatch
  File "C:\Users\\Envs\py2\lib\site-packages\channels\utils.py", line 58, in await_many_dispatch
    await task
  File "C:\Users\\Envs\py2\lib\site-packages\channels\utils.py", line 50, in await_many_dispatch
    result = task.result()
  File "C:\Users\\Envs\py2\lib\site-packages\channels_redis\core.py", line 453, in receive
    real_channel
  File "C:\Users\\Envs\py2\lib\site-packages\channels_redis\core.py", line 508, in receive_single
    index, channel_key, timeout=self.brpop_timeout
  File "C:\Users\\Envs\py2\lib\site-packages\channels_redis\core.py", line 345, in _brpop_with_clean
    result = await connection.bzpopmin(channel, timeout=timeout)
aioredis.errors.ReplyError: ERR unknown command 'BZPOPMIN'
WebSocket DISCONNECT /ws/chat/lobby/ [127.0.0.1:60843]

推荐答案

BZPOPMIN BZPOPMAX (也是非阻塞版本 ZPOPMIN ZPOPMAX )是自5.0.0起可用".您必须将Redis至少升级到版本5才能使用它们,因为您使用的是版本3.0.54.

BZPOPMIN and BZPOPMAX(also non-blocking versions ZPOPMIN and ZPOPMAX) are "Available since 5.0.0". You need to upgrade your redis to at least version 5 to use them, since you use version 3.0.54.

您可以在下载页面中查看可用版本和下载说明.

You may check download page for available versions and instructions to download them.

这篇关于Django Redis错误未知命令"BZPOPMIN"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆