Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

bug in initialization of redis cluster slots, fixed #292

Conversation

afshinrudgar
Copy link

Hi
I happened to stumble upon this error with initialize phase of RedisCluster, with fetching cluster nodes the starting node with send 127.0.0.1 as host, and it should be changed to node host address.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) to 85.679% when pulling a88682d on afshinrudgar:bugfix/cluster-initialization into 187838a on Grokzen:master.

5 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) to 85.679% when pulling a88682d on afshinrudgar:bugfix/cluster-initialization into 187838a on Grokzen:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) to 85.679% when pulling a88682d on afshinrudgar:bugfix/cluster-initialization into 187838a on Grokzen:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) to 85.679% when pulling a88682d on afshinrudgar:bugfix/cluster-initialization into 187838a on Grokzen:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) to 85.679% when pulling a88682d on afshinrudgar:bugfix/cluster-initialization into 187838a on Grokzen:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) to 85.679% when pulling a88682d on afshinrudgar:bugfix/cluster-initialization into 187838a on Grokzen:master.

@Grokzen
Copy link
Owner

Grokzen commented Nov 12, 2018

@afshinrudgar I see a lot of lint fixes and some feature fix inside a single commit. Can you split them up for easier review?

@Grokzen
Copy link
Owner

Grokzen commented Nov 12, 2018

Also i do not really get what you are trying to solve here? I would argue that it is not up to this lib to magically change the host if the redis-cluster itself do not report back the correct ip/name back to the clients. I do not see me merging this becuase of that reason.

If your redis-cluster reports back 127.0.0.1 for your nodes then you probably have used 127.0.0.1 as the ip address that you connect to when your nodes try to connect to the master. If you instead use an externally available IP address to point to your cluster nodes, redis-server will record this and clients will get back that information from CLUSTER INFO command and connect to your cluster correct. I had this issue when running redis-server inside a single docker container, see my other repo docker-redis-cluster.

@afshinrudgar
Copy link
Author

Yes. you're right.
I used 127.0.0.1 in my setup, I just considered that redis would handle 127.0.0.1 and changed that to host IP or it was just some sort of bug on their side.
thanks

@Grokzen
Copy link
Owner

Grokzen commented Nov 12, 2018

I know, it was more difficult in the past to get the server to set the correct ip you wanted it to present to your clients. But it is not up to the client to solve this issue.

@Grokzen Grokzen closed this Nov 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants