Problem solving: io.lettuce.core.RedisCommandExecutionException: CLUSTERDOWN

Problem scenario

The program calls the rediscluster and always prompts an error intermittently. The error prompt is as follows:

org.springframework.data.redis.RedisSystemException: Error in execution; nested exception is io.lettuce.core.RedisCommandExecutionException: CLUSTERDOWN The cluster is down
        at org.springframework.data.redis.connection.lettuce.LettuceExceptionConverter.convert(LettuceExceptionConverter.java:54)
        at org.springframework.data.redis.connection.lettuce.LettuceExceptionConverter.convert(LettuceExceptionConverter.java:52)
        at org.springframework.data.redis.connection.lettuce.LettuceExceptionConverter.convert(LettuceExceptionConverter.java:41)
        at org.springframework.data.redis.PassThroughExceptionTranslationStrategy.translate(PassThroughExceptionTranslationStrategy.java:44)
        at org.springframework.data.redis.FallbackExceptionTranslationStrategy.translate(FallbackExceptionTranslationStrategy.java:42)
        at org.springframework.data.redis.connection.lettuce.LettuceConnection.convertLettuceAccessException(LettuceConnection.java:268)
        at org.springframework.data.redis.connection.lettuce.LettuceStringCommands.convertLettuceAccessException(LettuceStringCommands.java:799)
        at org.springframework.data.redis.connection.lettuce.LettuceStringCommands.set(LettuceStringCommands.java:180)
        at org.springframework.data.redis.connection.DefaultedRedisConnection.set(DefaultedRedisConnection.java:281)
        at org.springframework.data.redis.connection.DefaultStringRedisConnection.set(DefaultStringRedisConnection.java:955)
        at org.springframework.data.redis.core.DefaultValueOperations.lambda$setIfAbsent$11(DefaultValueOperations.java:310)
        at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:224)
        at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:184)
        at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:95)
        at org.springframework.data.redis.core.DefaultValueOperations.setIfAbsent(DefaultValueOperations.java:310)

This blog post is mainly about the causes and solutions of the problem.

Problem environment

software version
repeat 5

problem causes

By checking the log, it is found that there is a problem with the synchronization of the slave node, and the error message is as follows:

207636:S 04 Mar 2021 21:31:19.986 * Connecting to MASTER test:6379
207636:S 04 Mar 2021 21:31:19.986 * MASTER <-> REPLICA sync started
207636:S 04 Mar 2021 21:31:19.986 * Non blocking connect for SYNC fired the event.
207636:S 04 Mar 2021 21:31:19.986 * Master replied to PING, replication can continue...
207636:S 04 Mar 2021 21:31:19.986 * (Non critical) Master does not understand REPLCONF listening-port: -NOAUTH Authentication required.
207636:S 04 Mar 2021 21:31:19.986 * (Non critical) Master does not understand REPLCONF capa: -NOAUTH Authentication required.
207636:S 04 Mar 2021 21:31:19.986 * Partial resynchronization not possible (no cached master)
207636:S 04 Mar 2021 21:31:19.987 # Unexpected reply to PSYNC from master: -NOAUTH Authentication required.
207636:S 04 Mar 2021 21:31:19.987 * Retrying with SYNC...
207636:S 04 Mar 2021 21:31:19.987 # MASTER aborted replication with an error: NOAUTH Authentication required.

View NOAUTH Authentication requiredkeyword: . It is because the password protection is configured, but the configuration is not done properly, which causes problems in synchronizing data between the master and slave nodes.

solution

Add the following configuration to the configuration file:

masterauth ${设置的密码}

Then restart the rediscluster.

result

The exception disappears and the problem is solved.

to sum up

There is an association between the configurations, and more checks are needed.

Ask for praise

If my article is helpful to everyone, you can click like or favorite at the bottom of the article;
if there is a good discussion, you can leave a message;
if you want to continue to view my future articles, you can click Follow
You can scan the following QR code to follow me 'S public account: Fengye Zhixuege, check out my latest share!
Insert picture description here
Bye bye

Guess you like

Origin blog.csdn.net/u013084266/article/details/114380192