Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cluster mode (MOVED Exception) #372

Closed
OmerShemesh opened this issue Mar 30, 2023 · 3 comments · Fixed by #459
Closed

Cluster mode (MOVED Exception) #372

OmerShemesh opened this issue Mar 30, 2023 · 3 comments · Fixed by #459
Labels
Milestone

Comments

@OmerShemesh
Copy link

Questions

I'm using the RedisClusterClient which communicates with AWS elasticache cluster with 3 shards + 1 replica per shard.
While trying to write json value I'm getting this error:

 ERROR [com.del.san.SanityCheckLambda] (vert.x-eventloop-thread-1) MOVED 5776 x.x.x.x:6379

Version

Which version(s) did you encounter this bug ?

4.3.7

@pmlopes
Copy link
Member

pmlopes commented Apr 7, 2023

Hi @OmerShemesh we don't have access to an AWS cluster, can you create a reproducer with TestContainers?

@pmlopes pmlopes added this to the 5.0.0 milestone Apr 7, 2023
@pdkgamage
Copy link

I am facing this same issue. using following dependency
<dependency> <groupId>io.vertx</groupId> <artifactId>vertx-redis-client</artifactId> <version>4.4.4</version> </dependency>

Any solution or workaround for this issue?

@Ladicek
Copy link
Contributor

Ladicek commented Oct 20, 2023

Do you maybe use Command.create(String) to create an instance of command that is sent to the Redis cluster? I accidentally found out that we were doing that in Quarkus and it often results in MOVED redirects because the created Command is not key-aware and hence selecting the correct endpoint doesn't work correctly. That will be fixed (#413, #414), but until then, you should use the existing static instances of commands in Command.

If you're not doing that, please ignore the previous paragraph. Does that happen during cluster resharding? For some reason, the Vert.x Redis client automatically handles the ASKED redirect, but not MOVED. I'm not sure why, but there must have been a reason. You can retry the command manually and the client should obtain the new cluster topology and route the command correctly.

If that's not a resharding situation either, could you please upload a reproducer somewhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

4 participants