-
I have two different applications and they use the same API I coded. Both applications call api.connectRedis(). Same code, same IP address, and same port but for some reason, one application cannot connect to the Redis server. Everything works perfectly fine when I try this on my personal computer; macOS Sonoma. This is so strange and it is hard to explain why. Any idea why it is happening even though everything is the same? Connection Code // Client and connection initialization.
this.client = RedisClient.create(RedisURI.builder()
.withHost(this.host)
.withPort(this.port)
.withPassword(redisInformation.password().toCharArray())
.build());
// Base client connection.
// One connection is enough for everything.
this.connection = this.client.connect(codec);
this.connection.addListener(BaseRedisProvider.STATE_HANDLER); Error code Caused by: io.lettuce.core.RedisConnectionException: Unable to connect to localhost/<unresolved>:6379 Tests Redis-cli: Connected, everything is fine and one application connects without any problem. Specs OS: Debian 12
Redis server: Docker image -> redis:7.2.1 -> port exposed to outside and works perfectly fine. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
|
Beta Was this translation helpful? Give feedback.
-
Ah, here we go:
You're having the epoll dependency on your class path and the error indicates a missing symbol. I suspect a glibc incompatibility although I'm not fully sure. What you can do is either:
|
Beta Was this translation helpful? Give feedback.
Ah, here we go:
You're having the epoll dependency on your class path and the error indicates a missing symbol. I suspect a glibc incompatibility although I'm not fully sure.
What you can do is either:
netty-transport-native-epoll
dependency-Dio.lettuce.core.epoll=false
to instruct Lettuce to not use the epoll native transport