Unable to connect to Redis; nested exception is io.lettuce.core.RedisCommandExecutionException: NOAU

Unable to connect to Redis; nested exception is io.lettuce.core.RedisCommandExecutionException: NOAUTH Authentication required.解决办法

启动redis服务

你首先进入到Redis的根目录,输入

redis-server.exe redis.windows.conf

若服务启动成功,出现如下界面:
然而我这里报错:

[5024] 30 Jul 10:27:23.757 # Creating Server TCP listening socket 127.0.0.1:6379: bind: No error

采用如下解决方法:

redis-cli.exe
shutdown
exit
redis-server.exe redis.windows.conf

即可成功,若输入shutdown出现认证要求

(error) NOAUTH Authentication required.

我们需要输入密码

auth redis

如果不知道密码,可在redis的配置文件redis.conf中找到

# requirepass foobard

在下面设置自己的密码

requirepass redis

之后重启服务,进行这些步骤即可

我这里配置文件有两个,redis.windows.confredis.windows-service.conf,可能是版本原因,将这两个配置文件全部修改才可行。

之后Unable to connect to Redis; nested exception is io.lettuce.core.RedisCommandExecutionException: NOAUTH Authentication required问题得到解决

若还未进行解决,可检查项目配置文件是否密码配置正确

spring.redis.host=localhost
spring.redis.port=6379
spring.redis.password=redis
  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
"Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException" 是一个Redis连接失败的异常信息。根据引用,这个异常的具体错误信息是"Unable to connect to 127.0.0.1:6379"。 根据引用提供的信息,可能是由于配置文件中的protected-mode值被设置为"no",导致无法连接。同时,也可能是由于连接密码不正确。根据引用,需要检查本地的Redis是否处于启动状态,并确保配置文件中的Redis连接密码正确。 如果仍然无法解决问题,您可以尝试以下步骤: 1. 检查Redis的运行状态,确保Redis已经正确启动。 2. 检查连接密码是否正确,并确保在Java的配置文件中正确配置了密码。 3. 检查网络连接是否正常,确保可以访问到Redis的IP地址和端口号。 4. 检查防火墙设置,确保没有阻止Java应用程序连接到Redis服务器的设置。 5. 如果使用了其他的Redis客户端工具成功连接到Redis服务器,可以尝试使用相同的配置参数来连接Redis。 通过以上的步骤,您应该能够解决"Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException"这个异常信息。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [Unable to connect to Redisnested exception is io.lettuce.core.RedisConnectionException:](https://blog.csdn.net/qq_45745319/article/details/123754785)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* [连接本机redis报错Unable to connect to Redis](https://blog.csdn.net/ooyyaa6561/article/details/127663704)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值