I have a Redis cluster with the following nodes:

192.168.0.14:6379 master (slots from 0 to 16383)
192.168.0.15:6379 slave (slots from 0 to 16383)
192.168.0.16:6379 master (without slots)

Documentation says that any node can redirect queries to the properly node. But I can not redirect requests from 192.168.0.16:6379 master node. Here is what I tried:

192.168.0.16:6379> set myKey myValue
(error) MOVED 16281 192.168.0.14:6379
192.168.0.16:6379> get myKey
(error) MOVED 16281 192.168.0.14:6379

It neither writes nor reads. When I try to get "myKey" from 192.168.0.14:6379 it shows next:

127.0.0.1:6379> get myKey
(nil)

What is wrong with my requests? I am using redis server version 3.2.5

解决方法:

The node did redirect you.

As the documentation explains, the client is expected to connect to the specified node to retry the request. The server does not do this.

If you're using redis-cli, then you must use the -c option if you want it to follow these redirects.

Redis Cluster: (error) MOVED的更多相关文章

  1. Redis Cluster

    使用 Redis Cluster Redis 3.0 在2015年出了Stable版本,3.0版本相对于2.8版本带来的主要新特性包括: 实现了Redis Cluster,从而做到了对集群的支持: 引 ...

  2. Redis Cluster架构和设计机制简单介绍

    之前另一篇文章也介绍了 Redis Cluster (link,在文章的后半部分) 今天看到这一篇,简单说一下(http://hot66hot.iteye.com/blog/2050676) 作者的目 ...

  3. 全面剖析Redis Cluster原理和应用 (转)

    1.Redis Cluster总览 1.1 设计原则和初衷 在官方文档Cluster Spec中,作者详细介绍了Redis集群为什么要设计成现在的样子.最核心的目标有三个: 性能:这是Redis赖以生 ...

  4. Redis Cluster 实践

    一:关于redis cluster 1:redis cluster的现状 reids-cluster计划在redis3.0中推出,可以看作者antirez的声明:http://antirez.com/ ...

  5. 全面剖析Redis Cluster原理和应用

    全面剖析Redis Cluster原理和应用 1.Redis Cluster总览 1.1 设计原则和初衷 在官方文档Cluster Spec中,作者详细介绍了Redis集群为什么要设计成现在的样子.最 ...

  6. 高可用Redis(十二):Redis Cluster

    Redis Cluster是Redis官方提供的Redis集群功能 1.为什么要实现Redis Cluster 1.主从复制不能实现高可用 2.随着公司发展,用户数量增多,并发越来越多,业务需要更高的 ...

  7. 深入理解Redis Cluster

    Redis Cluster采用虚拟槽分区,所有的key根据哈希函数映射到0~16383槽内,计算公式: slot = CRC16(key) & 16383 每个节点负责维护一部分槽以及槽所映射 ...

  8. Redis cluster集群模式的原理

    redis cluster redis cluster是Redis的分布式解决方案,在3.0版本推出后有效地解决了redis分布式方面的需求 自动将数据进行分片,每个master上放一部分数据 提供内 ...

  9. phpredis Redis集群 Redis Cluster

    官方url: https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#readme 2017年10月29日20:44:25 ...

随机推荐

  1. 冰多多团队-第三次Scrum会议

    冰多多团队-第三次Scrum会议 会议基本情况 会议时间:4月9日 21:30 - 21:45 会议地点:新主楼F座2楼沙发休息处 工作情况 团队成员 已完成任务 待完成任务 zpj 接入Action ...

  2. 6条shell小技巧,让脚本显得不再业余【转】

    如何能让自己的shell显得不那么业余?下面6点实践一定有用. 画外音:本篇文章源自Google的一篇实践,抽取了部分1分钟能读完的内容,加入了一些分析. 一.以下面的语句开场 set -o noun ...

  3. url的长度问题

    url最长支持多少字符? 在http协议中,其实并没有对url长度作出限制,往往url的最大长度和用户浏览器和Web服务器有关,不一样的浏览器,能接受的最大长度往往是不一样的,当然,不一样的Web服务 ...

  4. Ubuntu宝塔面板设置网站 Apache Server API为Apache 2.0 Handler模式

    用过宝塔面板(https://www.bt.cn)的谁用谁知道:  以下来自官网的介绍: “宝塔Linux面板是提升运维效率的服务器管理软件,支持一键LAMP/LNMP/集群/监控/网站/FTP/数据 ...

  5. revit 碰撞检测相关

    Revit二次开发:由房间获取房间的墙     之前用的方法是由房间边界构成的Solid,计算与该Solid相交的Element,然后判断是否为墙.相对来说这个方法比较通用,可以检索出房间的楼板.窗户 ...

  6. Spring 内部机制 Spring AOP

    https://my.oschina.net/zhangxufeng/blog/2219005 Spring Bean注册解析(一)和Spring Bean注册解析(二) 彻底征服 Spring AO ...

  7. C++ Multimap运用实例

    C++ Multimap运用实例 #include <map> #include <string> #include <iostream> #include < ...

  8. shell比较浮点数

    1 t1="3123982193.090000000"; 2 t2="7872348342.003000000"; 3 if [ `expr $t2 \> ...

  9. Python 处理异常栈模块——traceback 模块

    异常捕捉 通常我们在项目中,针对异常的捕捉会使用 try + except,基本形式如下: try: # 主代码 except IndexError as e: # 索引异常时执行这里 logger. ...

  10. 百度网盘快速下载工具下载:Pandownload下载

    众所周知的百度网盘下载限速很厉害,所以就有了快速下载工具出现了.一般情况下,按照家里网速有多快,使用工具下载就有多快. 可以直接复制如下图进行下载: 另外,PanDownload[百度网盘下载工具]无 ...