io.lettuce.core.RedisCommandExecutionException: ERR Client sent AUTH解决办法

Posted wangmj518

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了io.lettuce.core.RedisCommandExecutionException: ERR Client sent AUTH解决办法相关的知识,希望对你有一定的参考价值。

今天爱分享给大家带来io.lettuce.core.RedisCommandExecutionException: ERR Client sent AUTH【解决办法】,希望能够帮助到大家。

问题:redis 密码认证失败
报错信息:Caused by: io.lettuce.core.RedisCommandExecutionException: ERR Client sent AUTH, but no password is set
报错截图:

 

报错原因:下载安装的redis默认是没有密码的,需要设置密码
解决方案:
找到 redis 文件夹下的 redis.windows.conf 文件,添加修改 requirepass。

io.lettuce.core.RedisCommandExecutionException: ERR Client sent AUTH【解决办法】插图(1)

打开 redis-cli,设置密码。

1.设置密码:config set requirepass “123456”
2.连接redis,认证:auth 123456
io.lettuce.core.RedisCommandExecutionException: ERR Client sent AUTH【解决办法】插图(2)
也可以在 application.properties 配置文件中去掉 #spring.redis.password=123456 配置。
io.lettuce.core.RedisCommandExecutionException: ERR Client sent AUTH【解决办法】插图(3)

以上是关于io.lettuce.core.RedisCommandExecutionException: ERR Client sent AUTH解决办法的主要内容,如果未能解决你的问题,请参考以下文章