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 fails if server and client are bound to different addresses #537

Closed
antb88 opened this issue Oct 6, 2024 · 1 comment · Fixed by #546
Closed

CLUSTER fails if server and client are bound to different addresses #537

antb88 opened this issue Oct 6, 2024 · 1 comment · Fixed by #546
Labels

Comments

@antb88
Copy link

antb88 commented Oct 6, 2024

If redis mock and the client are bound to different ip addresses then CLUSTER command will return incorrect response likely causing clients to fail later on.

In both slots (code) and nodes (code)state.getHost() is used which is eventually delegated to RedisClient.getAddress() which uses socket.getInetAddress() which will return the address the socket is connected to and not the local address.

This will make the client to receive its own address instead of the server address and fail connecting to the node address.

@inponomarev
Copy link
Collaborator

Fixed in v. 1.1.5

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

Successfully merging a pull request may close this issue.

2 participants