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

Stash with Redis-clustr #7

Closed
sharpn opened this issue Apr 6, 2018 · 3 comments
Closed

Stash with Redis-clustr #7

sharpn opened this issue Apr 6, 2018 · 3 comments

Comments

@sharpn
Copy link

sharpn commented Apr 6, 2018

Hey,

We are trying to use stash with redis-clustr and everytime it tries to connect it errors out with couldn't get subscriber client, after looking into the code the only reason i can see that this is happening is because none of the clients are currently ready.

Is this possible and if so is there an example

Nick

@jbt
Copy link
Member

jbt commented Apr 6, 2018

This is something we've also run into on occasion - I believe the issue shows up if your initial connection to the cluster is made via a hostname rather than IP address.

There's some mismatch where after getting the original cluster configuration, connections to each individual node have to be made, and subscribe expects at least one connection to already be ready (which is the case if your initial seed connection is one of the known node addresses - but if it's via hostname then it's been thrown away once the initial node list was loaded)

The Proper Fix here would be to make subscribeAll asynchronous and always call back with a connection, rather than synchronously returning a client or false if not ready yet which is what I think is causing this. Then _subscribe can be refactored so it doesn't expect subscribeAll to always synchronously return a client. I'll see if we put this together, unless anyone can PR something before we can get round to it.

An interim way to work around this is to use explicit IP addresses in your connection configuration rather than hostnames. But obviously that's not ideal.

@sharpn
Copy link
Author

sharpn commented Apr 6, 2018

Thanks for the reply.

We are creating the cluster with an ip address already.

EDIT:
magically started working, thanks for the information

@aadi99999
Copy link

Has this issue fixed ?
I am making a connection to the cluster via hostname.

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

No branches or pull requests

3 participants