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. 五子棋js

    http://www.jb51.net/article/35993.htm <!DOCTYPE html> <html> <head> <meta http- ...

  2. World Wind Java开发之三 显示状态栏信息

    先来看下本篇博客索要达到的效果: 找到源代码下的gov.nasa.worldwind.util下的StatusBar.java文件,能够看到状态栏显示的信息主要包含视点高度以及相应空间点三维坐标以及是 ...

  3. SkipList的实现

    当做笔记记录下来:) 相比于bTree,skiplist占用更多的空间. 而在并发的环境下skiplist会比bTree效率更高. (bTree插入的时候需要rebalance,需要lock比较多的结 ...

  4. 常见的开发语言(或IT技术)一览

    Java. Android. iOS. Web前端. Python. .NET. PHP. C/C++. Linux 数据库技术

  5. Python趣味实用小工具

    代码地址如下:http://www.demodashi.com/demo/12918.html python 趣味实用小工具 概述 用python实现的三个趣味实用小工具: 图片转Execl工具 , ...

  6. java之方法的重写

    方法的重写: 1.在子类中可以根据需要对从基类中继承来的方法进行重写. 2.重写的方法和被重写的方法必须具有相同方法名称.参数列表和返回类型. 3.重写方法不能使用比被重写的方法更严格的访问权限. 程 ...

  7. 通过 P3P规范让IE跨域接受第三方cookie session

    所谓第三方 cookie,就是说你访问网页 A,却接收到域名 B 的 cookie 设定指令.这可能是由于网页 A 请求或链接了 B 的网页,比如上面提到的 iframe 以及 jsonp. 我查到了 ...

  8. atitit.atiOrmStoreService 框架的原理与设计 part1  概述与新特性

    atitit.atiOrmStoreService 框架的原理与设计 part1  概述与新特性 1. 新特性如下 支持生成sql在无数据库连接的情况下 2. Orm设计 主要的俩个以来service ...

  9. Atitit. 真正的全中国文字attilax易语言的特点以及范例

    Atitit. 真正的全中国文字attilax易语言的特点以及范例 1. 前言 attilax易语言是什么??1 2. attilax易语言的特点2 2.1. 支持多语言文字,不只汉字,还有藏文,维文 ...

  10. First MFC

    // stdafx.h : include file for standard system include files, // or project specific include files t ...