Closed lw-mcno closed 2 months ago
/cc @cescoffier (redis), @gsmet (redis), @machi1990 (redis)
Hi @Ladicek, here's the bug report that we've talked about.
This requires a fix in the Vert.x Redis client:
The PRs to Vert.x have been merged, this will be fixed when Quarkus upgrades to the next Vert.x 4.5 release.
This was fixed in Quarkus 3.8.4 / 3.9.2 by upgrading to Vert.x 4.5.7 (although the fix is in Vert.x 4.5.6, see the PR linked above).
Describe the bug
Using Quarkus 3.7.4 and the Redis extension, a connection to a Redis cluster (in cluster mode), results in an error when trying to parse one of the node addresses.
Upon connection to some endpoint, the cluster returns ":6379" for a node address (without IP / hostname), which allowed per Redis (cluster) specification. Vert.x Redis client should use the original connection's host / IP in this case, but instead it fails trying to parse an address like
redis://:6379
.See e.g. https://redis.io/docs/reference/cluster-spec/ for MOVED (a different use case than the first connection, but describes the generally expected behavior):
It fails on this line:
this.redisURI = new RedisURI(connectionString);
Full stack trace:
Expected behavior
The client can work with node address being only a port number (completing it using the original connection's host / IP address).
Actual behavior
The connection fails because of Redis URI parsing errror.
How to Reproduce?
Deploy a Redis with
cluster-preferred-endpoint-type unknown-endpoint
or probably evenbind 0.0.0.0
. Theredis-cli cluster nodes
should return a node without an IP address / hostname:Connect to the cluster from Quarkus:
Output of
uname -a
orver
No response
Output of
java -version
17
Quarkus version or git rev
3.7.4
Build tool (ie. output of
mvnw --version
orgradlew --version
)Maven 3.9.6
Additional information
No response