Caused by: io.lettuce.core.RedisCommandExecutionException: WRONGPASS invalid username-password pair

Redis连接报错RedisCommandExecutionException: WRONGPASS invalid username-password pair

一、问题描述
在 application.yml 中配置 Redis 连接信息如下:

Redis

redis:
host: 192.168.1.38
port: 6379
password: ‘!@abc123456’
编译时报错 RedisCommandExecutionException: WRONGPASS invalid username-password pair:

Caused by: io.lettuce.core.RedisCommandExecutionException: WRONGPASS invalid username-password pair
at io.lettuce.core.internal.ExceptionFactory.createExecutionException(ExceptionFactory.java:137)
at io.lettuce.core.internal.ExceptionFactory.createExecutionException(ExceptionFactory.java:110)
......
二、解决方法
password 的引号使用了中文引号!应使用英文引号!

Redis

redis:
host: 192.168.1.38
port: 6379
password: '!@abc123456'

posted @ 2023-01-06 14:53  Arborblog  阅读(1637)  评论(0编辑  收藏  举报