ARTICLE DETAIL

建站实战干货

来自一线的建站与推广经验沉淀,每一条都经过真实交付验证。

io.lettuce.core.RedisCommandExecutionException: NOAUTH Authentication required.

2026/9/14 9:10:54 拓冰建站 浏览量
io.lettuce.core.RedisCommandExecutionException: NOAUTH Authentication required.

报错信息:

浏览器中的报错信息

IDEA中的报错信息

报错原因:

SpringBoot整合Redis使用的默认配置,但是我们设置了Redis的密码,而默认配置中密码是为空的,导致不能够连接

浏览器中的报错信息

There was an unexpected error (type=Internal Server Error, status=500).

Unable to connect to Redis

org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis

IDEA中的报错信息
2024-01-12T14:58:40.297+08:00 ERROR 10516 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis] with root cause

io.lettuce.core.RedisCommandExecutionException: NOAUTH Authentication required.

 

解决方案: 

在application.properties配置文件中加一行Redis服务器的连接密码的配置

spring.data.redis.password=123456