ruoyi springboot连接redis 没有权限 io.lettuce.core.RedisCommandExecutionException: NOAUTH Authentication requir

03:02:03.163 [main] ERROR o.s.b.SpringApplication - [reportFailure,858] - Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sysConfigController': Unsatisfied dependency expressed through field 'configService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sysConfigServiceImpl': Invocation of init method failed; nested exception is org.springframework.data.redis.RedisSystemException: Error in execution; nested exception is io.lettuce.core.RedisCommandExecutionException: NOAUTH Authentication required.

初判为Redis认证错误,在yml文件下找:

src/main/resources/application.yml

重新打包,卧槽问题依然存在。

看看密码对不对:

redis-cli -h 127.0.0.1
AUTH 密码

返回ok明显对的,是啥问题呢?

更新redis到最新版本,重启服务器,再回来看看。

[1]+  退出 1                nohup java -jar ruoyi-admin.jar > /dev/null 2>&1

什么情况呀?

出现错误:

Caused by: org.yaml.snakeyaml.scanner.ScannerException: while scanning a simple key
 in 'reader', line 62, column 5:
        password:passwd
        ^
could not find expected ':'
 in 'reader', line 63, column 5:
        # 连接超时时间
        ^

寻了1000遍。。。终于…

application.yml文件键值之间要用冒号:隔开,而且冒号和值之间有一个空格,否则就报上面的错误!

错误写法:

password:passwd

正确写法:

password: passwd

发表回复

您的电子邮箱地址不会被公开。