Record a redis switching accident in the
production environment. The redis switching in the production environment was changed from the original direct connection ip service to Ali’s redis cluster, and there was an error of link failure. The
org.springframework.data.redis.RedisSystemException: Error in execution; nested exception is io.lettuce.core.RedisCommandExecutionException: MOVED 12910 172.16.4.99:6379
reason is that the spring configuration method of the cluster is different from that of the
stand-alone machine. The connection method of the stand-alone machine
spring:
redis:
host: 127.0.0.1
port: 6379
password: 123
database: 0
Cluster configuration
spring:
redis:
cluster:
nodes: safasafdsasdasas.dsad.asf.aliyuncs.com:6379
password: dsafdfaasdf
database: 0