You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

非Docker部署Redash 10.0.0遇Redis错误:-ERR wrong number of arguments for 'get' command

问题分析与解决

核心误区:错误访问Redis端口

浏览器直接访问localhost:6379(Redis默认端口)是错误操作。Redis使用专属协议而非HTTP协议,浏览器发送的HTTP请求会被Redis解析为不符合规范的命令,因此必然返回-ERR wrong number of arguments for 'get' command。Redash的Web服务默认监听5000端口,正确访问地址应为localhost:5000。

排查Redash服务器无法启动的步骤

1. 检查Redash服务日志

通过以下命令查看服务器启动日志,定位具体错误:

# 若使用systemd管理服务
journalctl -u redash-server -f

# 或直接查看日志文件(路径可能因部署而异)
tail -f /var/log/redash/server.log

2. 验证Redis服务与连接配置

  • 确认Redis服务正常运行:
    redis-cli ping
    
    返回PONG说明Redis服务正常。
  • 检查Redash配置文件(通常为/opt/redash/.env)中的Redis连接字符串,确保格式正确:
    REDIS_URL=redis://localhost:6379/0
    
    需指定数据库编号(如/0),避免默认配置缺失导致连接异常。

3. 确认Python依赖兼容性

Redash 10.0.0适配Python 3.8,需确保依赖版本匹配:

  • 确保redis-py版本与Redis服务端兼容:Redash 10推荐使用redis>=3.5.3,<4.0,若安装了过高版本(如4.x)可能出现兼容性问题,可重新安装指定版本:
    pip install "redis>=3.5.3,<4.0"
    
  • 重新安装Redash全部依赖,避免遗漏:
    cd /opt/redash
    pip install -r requirements.txt
    

4. 重启Redash服务

完成上述检查后,重启Redash服务器:

systemctl restart redash-server

内容的提问来源于stack exchange,提问作者Slavcho Spasenoski

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.26 20:37:19