Since #1067 is merged, I noticed that I need to use RedisAutoConfiguration to connect to Redis Vectorstore. But I can't. When I checked with Redis-cli, there was no problem with the host, password, and port number. Why can't I connect?
Environment
plugins {
id 'java'
id 'org.springframework.boot' version '3.3.1'
id 'io.spring.dependency-management' version '1.1.5'
}
group = 'org.example'
version = '0.0.1-SNAPSHOT'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
repositories {
mavenCentral()
maven { url 'https://repo.spring.io/milestone' }
maven { url 'https://repo.spring.io/snapshot' }
}
ext {
set('springAiVersion', "1.0.0-SNAPSHOT")
}
dependencies {
implementation 'org.springframework.ai:spring-ai-openai-spring-boot-starter'
implementation 'org.springframework.ai:spring-ai-pdf-document-reader'
implementation 'org.springframework.ai:spring-ai-redis-store-spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
annotationProcessor 'org.projectlombok:lombok'
}
dependencyManagement {
imports {
mavenBom "org.springframework.ai:spring-ai-bom:${springAiVersion}"
}
}
tasks.named('test') {
useJUnitPlatform()
}
And this is my application.yml
spring:
ai:
openai:
api-key: ${OPENAI_API_KEY}
data:
redis:
host: ${REDIS_HOST}
port: ${REDIS_PORT}
password: ${REDIS_PASSWORD}
profiles:
include: SECRET-KEYS
I entered all key values in the application-SECRET-KEYS.properties file.
Expected behavior
redis.clients.jedis.exceptions.JedisDataException: NOAUTH Authentication required
at redis.clients.jedis.Protocol.processError(Protocol.java:105) ~[jedis-5.0.2.jar:na]
at redis.clients.jedis.Protocol.process(Protocol.java:162) ~[jedis-5.0.2.jar:na]
at redis.clients.jedis.Protocol.read(Protocol.java:221) ~[jedis-5.0.2.jar:na]
// ...
Comment From: Mr-LiuDC
@BinarySstar
Have you figure out this issue? I got a similar error.
java.lang.RuntimeException: Could not add document: redis.clients.jedis.exceptions.JedisDataException: ERR Protocol error: unauthenticated bulk length
Comment From: BinarySstar
Hello, I could not find a solution in SNAPSHOT version and eventually changed the version from 1.0.0 SNAPSHOT to 1.0.0-M1. For 1.0.0-M1, you can easily connect by typing uri in properties.
Comment From: LingLambda
Maybe this issue shouldn't be closed? I encountered the same problem.
Caused by: redis.clients.jedis.exceptions.JedisAccessControlException: NOAUTH Authentication required
at redis.clients.jedis.Protocol.processError(Protocol.java:108) ~[jedis-5.2.0.jar:na]
at redis.clients.jedis.Protocol.process(Protocol.java:158) ~[jedis-5.2.0.jar:na]
at redis.clients.jedis.Protocol.read(Protocol.java:221) ~[jedis-5.2.0.jar:na]