1

解决方法:

不用
Jedis jed =new jedis("192.168.56.101");
jed.set(key,value);

Set<HostAndPort> jedisClusterNodes = new HashSet<HostAndPort>();
//Jedis Cluster will attempt to discover cluster nodes automatically
jedisClusterNodes.add(new HostAndPort("192.168.56.101", 6379));
jedisClusterNodes.add(new HostAndPort("192.168.56.101", 6380));
jedisClusterNodes.add(new HostAndPort("192.168.56.101", 6381));
JedisCluster jc = new JedisCluster(jedisClusterNodes);
jc.set(key,value);

2

Exception in thread "main" redis.clients.jedis.exceptions.JedisClusterMaxRedirectionsException: Too many Cluster redirections?
at redis.clients.jedis.JedisClusterCommand.runWithRetries(JedisClusterCommand.java:39)
at redis.clients.jedis.JedisClusterCommand.runWithRetries(JedisClusterCommand.java:87)
at redis.clients.jedis.JedisClusterCommand.runWithRetries(JedisClusterCommand.java:72)
at redis.clients.jedis.JedisClusterCommand.runWithRetries(JedisClusterCommand.java:87)
at redis.clients.jedis.JedisClusterCommand.runWithRetries(JedisClusterCommand.java:72)
at redis.clients.jedis.JedisClusterCommand.runWithRetries(JedisClusterCommand.java:87)
at redis.clients.jedis.JedisClusterCommand.runWithRetries(JedisClusterCommand.java:72)
at redis.clients.jedis.JedisClusterCommand.runWithRetries(JedisClusterCommand.java:87)
at redis.clients.jedis.JedisClusterCommand.runWithRetries(JedisClusterCommand.java:72)
at redis.clients.jedis.JedisClusterCommand.runWithRetries(JedisClusterCommand.java:87)
at redis.clients.jedis.JedisClusterCommand.runWithRetries(JedisClusterCommand.java:72)
at redis.clients.jedis.JedisClusterCommand.run(JedisClusterCommand.java:33)
at redis.clients.jedis.JedisCluster.set(JedisCluster.java:44)
at redisTest.MysqlToRedis.main(MysqlToRedis.java:76)

解决方法:   初始化JedisCluster时,设定JedisCluster的maxRedirections

JedisCluster(Set<HostAndPort> jedisClusterNode, int timeout, int maxRedirections) ;
JedisCluster jc = new JedisCluster(jedisClusterNodes,,);

3

无法读取 节点信息

解决办法: 用root身份启动各个节点 sudo su

4

无法存入redis集群

解决办法: 用redis-cli -c -p 6381  方式连接集群

redis 集群出现的错误的更多相关文章

  1. Redis集群错误

    部署Redis集群时出现如下错误: >>> Creating cluster>>> Performing hash slots allocation on 9 no ...

  2. Linux 下Redis集群安装部署及使用详解(在线和离线两种安装+相关错误解决方案)

    一.应用场景介绍 本文主要是介绍Redis集群在Linux环境下的安装讲解,其中主要包括在联网的Linux环境和脱机的Linux环境下是如何安装的.因为大多数时候,公司的生产环境是在内网环境下,无外网 ...

  3. redis集群错误解决:/usr/lib/ruby/gems/1.8/gems/redis-3.0.0/lib/redis/client.rb:79:in `call': ERR Slot 15495 is already busy (Redis::CommandError)

    错误信息: /usr/lib/ruby/gems/1.8/gems/redis-3.0.0/lib/redis/client.rb:79:in `call': ERR Slot 15495 is al ...

  4. redis集群环境搭建的错误

    安装redis集群需要版本号在3.0以上 redis-cluster安装前需要安装ruby环境 搭建集群需要使用到官方提供的ruby脚本. 需要安装ruby的环境. yum -y install ru ...

  5. [心得]redis集群环境搭建的错误

    安装redis集群需要版本号在3.0以上 redis-cluster安装前需要安装ruby环境 搭建集群需要使用到官方提供的ruby脚本. 需要安装ruby的环境. yum -y install ru ...

  6. window下使用Redis Cluster部署Redis集群

    日常的项目很多时候都需要用到缓存.redis算是一个比较好的选择.一般情况下做一个主从就可以满足一些比较小的项目需要.在一些并发量比较大的项目可能就需要用到集群了,redis在Windows下做集群可 ...

  7. [个人翻译]Redis 集群教程(中)

    上一篇:http://www.cnblogs.com/li-peng/p/6143709.html 官方原文地址:https://redis.io/topics/cluster-tutorial  水 ...

  8. centos7.0 安装redis集群

    生产环境下redis基本上都是用的集群,毕竟单机版随时都可能挂掉,风险太大.这里我就来搭建一个基本的redis集群,功能够用但是还需要完善,当然如果有钱可以去阿里云买云数据库Redis版的,那个还是很 ...

  9. Redis 集群的合纵与连横

    之前一篇写了关于 Redis 的性能,这篇就写写我认为比性能更重要的扩展性方面的主题. 如果再给我一次回到好几年前的机会,对于使用 Redis 我一开始就要好好考虑将来的扩展问题.就像我们做数据库分库 ...

随机推荐

  1. hbase集群安装和shell操作

    1.上传hbase安装包 2.解压 3.配置hbase集群,要修改3个文件(首先zk集群已经安装好了) 注意:要把hadoop的hdfs-site.xml和core-site.xml 放到hbase/ ...

  2. RocketMQ性能压测分析(转)

    原创文章,转载请注明出处:http://jameswxx.iteye.com/blog/2093785 一   机器部署 1.1  机器组成 1台nameserver 1台broker  异步刷盘 2 ...

  3. spring中使用 @value 简化配置文件的读取

    1.在applicationContext.xml文件中配置properties文件 <bean id="propertyConfigurer" class="or ...

  4. python中的ord,chr函数

    chr().unichr()和ord() chr()函数用一个范围在range(256)内的(就是0-255)整数作参数,返回一个对应的字符.unichr()跟它一样,只不过返回的是Unicode字符 ...

  5. QT调用C#写的Dll

    参见: https://blog.csdn.net/weixin_42420155/article/details/81060945 C#写的dll是没有dllMain入口函数的,是一种中间语言,需要 ...

  6. java集合类简单思维导图

  7. Oracle undo 表空间管理 (摘DAVID)

    Oracle 的Undo有两种方式: 一是使用undo 表空间,二是使用回滚段. 我们通过 undo_management 参数来控制使用哪种方式,如果设为auto,就使用UNDO 表空间,这时必须要 ...

  8. CentOS 6.5 X64 U盘启动盘制作

    本教程是在Linux系统下制件,可以使用虚拟机安装Linux 1.准备一个8G的U盘,在Linux下分成Fat32---500M----root, 剩下的分成Ext3 ----data,并格式化. 2 ...

  9. 美团HD(8)-利用NSPredicate匹配搜索结果

    监听文本框改变: DJSelectCityViewController.m /** 当searchBar内的文字发生改变时调用此方法 */ - (void)searchBar:(UISearchBar ...

  10. 61. Search for a Range【medium】

    61. Search for a Range[medium] Given a sorted array of n integers, find the starting and ending posi ...