Open kpramesh2212 opened 1 day ago
If epoll and kqueue thread pools are not available (see https://github.com/valkey-io/valkey-glide/blob/main/java/client/build.gradle#L23-L26), you will need support for nio or io-ring thread pools. These are not yet supported by Glide.
see: https://github.com/valkey-io/valkey-glide/blob/main/java/client/src/main/java/glide/connectors/resources/Platform.java#L26-L30
Do you use GLIDE as a maven artifact or as a local dependency?
I am using gradle to build
plugins {
java
id("org.springframework.boot") version "3.3.4"
id("io.spring.dependency-management") version "1.1.6"
id("com.google.cloud.tools.jib") version "3.4.4"
id("com.avast.gradle.docker-compose") version "0.17.9"
id("com.google.osdetector") version "1.7.3"
}
group = "com.genesys.sre"
version = "1.0.0-SNAPSHOT"
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
sourceCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_17
}
configurations {
compileOnly {
extendsFrom(configurations.annotationProcessor.get())
}
}
dependencies {
// Spring dependencies
implementation("org.springframework.boot:spring-boot-starter")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-webflux")
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-data-redis-reactive")
implementation("org.springframework.boot:spring-boot-starter-data-redis")
// Aws dependencies
implementation(aws.sqs.v1)
implementation(aws.s3.v1)
implementation(aws.dynamodb.v1)
// genesys dependencies
implementation(genesys.logging.spring)
implementation(genesys.properties.core)
implementation(genesys.properties.dynamodb)
// 3rd party
implementation(thirdParty.jcabi.manifests)
implementation(thirdParty.springdoc.openapi.ui)
implementation(thirdParty.newrelic.api)
implementation(thirdParty.jedis.client)
// AWS valkey
implementation(group="io.valkey", name="valkey-glide", version="1.+", classifier=osdetector.classifier)
// compile only dependencies
compileOnly("org.projectlombok:lombok")
annotationProcessor("org.projectlombok:lombok")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
/**
* Define tasks
*/
tasks.withType<Test> {
useJUnitPlatform()
}
val bootJar by tasks.existing(Jar::class) {
archiveVersion.set("")
}
val build by tasks.existing
val jibDockerBuild by tasks.existing
val composeUp by tasks.existing
val imagePrune by tasks.registering(Exec::class) {
executable("docker")
args("image", "prune", "--force")
}
val imageBuild by tasks.registering {
dependsOn(build, jibDockerBuild)
finalizedBy(imagePrune)
}
val buildComposeUp by tasks.registering {
dependsOn(imageBuild)
finalizedBy(composeUp)
}
/**
* Define repository
*/
val nexusRepoUrl: String by extra
val nexusUsername: String by extra
val nexusPassword: String by extra
repositories {
mavenLocal()
maven {
url = uri(nexusRepoUrl)
credentials {
username = nexusUsername
password = nexusPassword
}
}
}
jib {
from {
image = "openjdk:21-slim" // image openjdk:21 LTS is used because glide needs glibc 2.34 which is only available here
}
to {
image = "java-testing-service"
}
container {
mainClass = "com.test.cloud.bootsample.Server"
creationTime.set("USE_CURRENT_TIMESTAMP")
}
}
Would you be able to show dependencies? I'd like to know what the osclassifier is showing as your architecture: https://docs.gradle.org/current/userguide/viewing_debugging_dependencies.html
We are dependent on either kqueue or epoll libraries for netty.io. You can explicitly add those dependencies to the gradle file if it's not being pulled in automatically (depending on architecture).
Describe the bug
When attempting to connect to a Redis cluster using the Valkey Glide client in a Spring Boot 3 application on Amazon Linux 2023 (x86_64), I encounter the following error:
java.lang.RuntimeException: Current platform supports no known thread pool resources
This issue does not occur when running the same application on Ubuntu/Debian systems.
The following are system details
Amzona Linux 3:
Java version:
Expected Behavior
The application should successfully connect to the Redis cluster using the Glide client without any runtime exceptions.
Current Behavior
The application fails to establish a connection to the Redis cluster and throws a RuntimeException indicating that no known thread pool resources are available for the current platform.
Reproduction Steps
Creating the bean as follows in spring boot 3
Use the Glide client to attempt a connection to a Redis cluster on an Amazon Linux 2023 (x86_64) system.
Observe the error message in the logs.
Possible Solution
No response
Additional Information/Context
The exact application works perfectly fine on debian/ubuntu machine
Client version used
valkey-glide-1.1.0-linux-x86_64.jar
Engine type and version
AWS::ElastiCache::ReplicationGroup 7.1.0
OS
Amazon Linux 2023 - X86_64
Language
Java
Language Version
OpenJDK Runtime Environment Temurin-17.0.13+11
Cluster information
No response
Logs
No response
Other information
No response