出现错误: Redis 认证错误 RedisCommandExecutionException: NOAUTH Authentication required

1)、报错如下:

1
2
3
4
5
6
2020-08-13 17:28:17.260 ERROR [http-nio-80-exec-1             ] [[dispatcherServlet]                                   ] 
Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed;
nested exception is org.springframework.data.redis.RedisSystemException: Error in execution;
nested exception is io.lettuce.core.RedisCommandExecutionException: NOAUTH Authentication required.] with root causeio.lettuce.core.RedisCommandExecutionException: NOAUTH Authentication required.
at io.lettuce.core.ExceptionFactory.createExecutionException(ExceptionFactory.java:135)
at io.lettuce.core.ExceptionFactory.createExecutionException(ExceptionFactory.java:108)

2)、解决办法

Redis 密码错误,重新填写正确的密码。

3)、如果想改密码的话,参考:

1
2
3
4
5
6
7
8
9
10
11
12
13
# 连接客户端
redis-cli # 默认 -h 127.0.0.1 -p 6379
redis-cli -h 127.0.0.1 -p 6379 # 指定 ip,port


# 配置文件永久生效(重启 Redis 服务,密码仍生效)
requirepass 123456

# 认证密码
auth 123456

# 客户端连接设临时密码(重启 Redis 服务,密码失效)
config set requirepass 123456