• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

redis-(error) CLUSTERDOWN Hash slot not served

武飞扬头像
童安格粉丝
帮助1

背景

搭建redis集群,使用redis-cli连接客户端,设置键值对报错

学新通

原因

没有分配槽,因为redis集群要分配16384个槽来储存数据,那么没有分配槽则报如上错误

解决方案

  1.  
    [root@sg193 redis-6.2.5]# redis-cli -a DDSS1234 --cluster fix 10.35.23.193:46379
  2.  
    Warning: Using a password with '-a' or '-u' option on the command line interface may not b e safe.
  3.  
    10.35.23.193:46379 (c07e95a1...) -> 0 keys | 0 slots | 0 slaves.
  4.  
    [OK] 0 keys in 1 masters.
  5.  
    0.00 keys per slot on average.
  6.  
    >>> Performing Cluster Check (using node 10.35.23.193:46379)
  7.  
    M: c07e95a163297f7172695910c2cf41501765e2c1 10.35.23.193:46379
  8.  
    slots: (0 slots) master
  9.  
    [OK] All nodes agree about slots configuration.
  10.  
    >>> Check for open slots...
  11.  
    >>> Check slots coverage...
  12.  
    [ERR] Not all 16384 slots are covered by nodes.
  13.  
     
  14.  
    >>> Fixing slots coverage...
  15.  
    The following uncovered slots have no keys across the cluster:
  16.  
    [0-16383]
  17.  
    Fix these slots by covering with a random node? (type 'yes' to accept): yes
  18.  
    >>> Covering slot 660 with 10.35.23.193:46379
  19.  
    >>> Covering slot 4315 with 10.35.23.193:46379
  20.  
    >>> Covering slot 13760 with 10.35.23.193:46379
  21.  
    >>> Covering slot 10315 with 10.35.23.193:46379
  22.  
    >>> Covering slot 3334 with 10.35.23.193:46379
  23.  
    >>> Covering slot 7290 with 10.35.23.193:46379
  24.  
    >>> Covering slot 10269 with 10.35.23.193:46379
  25.  
    >>> Covering slot 9950 with 10.35.23.193:46379
  26.  
    >>> Covering slot 4886 with 10.35.23.193:46379
学新通

学新通

PS:

        一定要输入yes而不是y

        -a 后接redis设置的密码

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhgfjakj
系列文章
更多 icon
同类精品
更多 icon
继续加载