zoukankan      html  css  js  c++  java
  • 错误解决:redis.exceptions.ResponseError: unknown command 'SENTINEL'

    在python连接redis的哨兵集群时,报如下错误,redis.exceptions.ResponseError: unknown command 'SENTINEL'

    原因,python连接redis的哨兵模式,直接连接redis主服务器的ip和端口,192.168.1.23, 6379

    redis的哨兵模式与其他mongodb的副本集模式,连接模式不一样,所以习惯思维

    实际上redis的哨兵模式,有专门的服务和端口,和redis的服务是完全分开的"192.168.1.24",26379

    from redis.sentinel import Sentinel
    
    sentinel_list = [("192.168.1.23",26379),("192.168.1.24",26379)  #这里是哨兵服务器启动的IP和端口
    my_sentinel = Sentinel(sentinel_list)
    
  • 相关阅读:
    2020.12.15
    2020.12.14
    2020.12.13
    2020.12.11
    2020.12.10
    语音合成标记语言(SSML)
    Skyline查询
    win10 VMware 安装 Linux 虚拟机
    图像梯度计算
    Harris Corner Detection
  • 原文地址:https://www.cnblogs.com/qumogu/p/13816461.html
Copyright © 2011-2022 走看看