redis.clients.jedis.exceptions.JedisClusterMaxRedirectionsException: Too many Cluster redirections解决
来源:互联网 发布:淘宝卖家贷款容易吗 编辑:程序博客网 时间:2024/04/29 08:13
使用redis的jediscluster客户端进行测试出现以下异常
Exception in thread "main" redis.clients.jedis.exceptions.JedisClusterMaxRedirectionsException: Too many Cluster redirections?
错误原因:
创建redis集群的时候使用的命令是:./redis-trib.rb create --replicas 1 127.0.0.1:7001 127.0.0.1:7002 127.0.0.1:7003 127.0.0.1:7004 127.0.0.1:7005 127.0.0.1:7006
但是由于java客户端在集群之外所以是这样写的:
Set<HostAndPort> nodes=new HashSet<HostAndPort>();
nodes.add(new HostAndPort("192.168.0.104", 7001));
nodes.add(new HostAndPort("192.168.0.104", 7002));
nodes.add(new HostAndPort("192.168.0.104", 7003));
nodes.add(new HostAndPort("192.168.0.104", 7004));
nodes.add(new HostAndPort("192.168.0.104", 7005));
nodes.add(new HostAndPort("192.168.0.104", 7006));
JedisCluster jc=new JedisCluster(nodes);
jc.set("key1", "hello word");
host地址不匹配,导致Too many Cluster redirections
所以重新构建集群使用:./redis-trib.rb create --replicas 1 192.168.0.104:7001 192.168.0.104:7002 192.168.0.104:7003 192.168.0.104:7004 192.168.0.104:7005 192.168.0.104:7006
- redis.clients.jedis.exceptions.JedisClusterMaxRedirectionsException: Too many Cluster redirections解决
- JedisClusterMaxRedirectionsException: Too many Cluster redirections?
- JedisClusterMaxRedirectionsException: Too many Cluster redirections
- Too many cluster redirections redis
- Redis Cluster:Too many Cluster redirections异常
- Redis Cluster:Too many Cluster redirections异常
- Too many Cluster redirections
- JedisRedirectionException:Too many Cluster redirections
- Too many Cluster redirections?问题
- redis.clients.jedis.exceptions.JedisConnectionException: no reachable node in cluster
- redis.clients.jedis.exceptions.JedisConnectionException
- 错误:redis.clients.jedis.exceptions.JedisDataException: ERR This instance has cluster support disabled
- liunx 集群错误 redis.clients.jedis.exceptions.JedisNoReachableClusterNode No reachable node in cluster
- redis.clients.jedis.exceptions.JedisDataException: NOAUTH Authentication required.
- redis.clients.jedis.exceptions.JedisDataException: MOVED 13102 127.0.0.1
- redis.clients.jedis.exceptions.JedisDataException: ERR unknown command 'SENTINEL'
- redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resourc
- redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resourc
- 糖果
- 【51Nod】1009 - 数字1的数量(思维,好题)
- 沉浸式状态栏的使用
- tableView的cell之间的分割线长度改变方法
- POJ 3624 Charm Bracelet (01背包)
- redis.clients.jedis.exceptions.JedisClusterMaxRedirectionsException: Too many Cluster redirections解决
- JNI/NDK开发指南(六)--C/C++访问Java实例变量和静态变量
- android 左滑菜单Material Design中的DrawerLayout的使用
- Java内存模型(JMM)学习笔记
- 项目软件运行截图
- 表面张力与浮力
- 欢迎使用 CSDN-markdown 编辑器
- html 当前页面点击链接跳转到当前页面页面的某个位置
- 分享:微信支付如何设置商户支付密钥(API密钥)教程方法