[redis] redis.clients.jedis.exceptions.JedisDataException: MOVED 13102 127.0.0.1

时间:2021-11-23 17:29:16

 

这个异常上网查了很久才知道原因:

 

MOVED indicates that you're using Redis Cluster. ShardedJedis is not for Redis Cluster, so you should use JedisCluster instead. Please note that JedisCluster doesn't have pipeline mode, so you may want to send your operation one by one.

大概意思就是ShardedJedis 不能用于Redis集群,要用JedisCluster 代替ShardedJedis 才可以,而且JedisCluster 还没有pipeline 模式,所以一次只能执行一个操作.

 

 

转自:

http://blog.csdn.net/chenyuangege/article/details/51519370