-
Notifications
You must be signed in to change notification settings - Fork 549
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
use public ip for the replica #7
Conversation
@BenoitCharret Thanks for this. I have been playing around with running multiple containers instead of having all redis servers inside one container, but this is much easier to work with :] I will push a new image to dockerhub shortly. |
I'm a little new to the docker and the clustered Redis worlds... but when I tried to use redis with redis-cli on my host machine all redirects timed out since the 172 IP address wasn't accessible from the host. Reverting this change fixed the issue for me. The timeout also happened when trying to use clustered redis from my code on my host machine. See below:
With my change:
|
@sheats Cool that you got into redis and clustering :) It is strange that you cluster is not connectable at all on the public IP address. A few controll questions that might help in solving this. What version of docker are you using to run the container? Are you using the latest commits in this repo when you build your cluster? How you are running the container? Are you running the Makefile commands that uses docker-compose. When you first connect to your cluster, what data do you get out if you run |
I'm working on making this library work with clustered redis: https://github.com/Suor/django-cacheops -- just haven't been in the code for awhile. I'm using the latest version of Docker for Mac and I'm using latest commit of this repo. I just ran docker-compose up, nothing special. Could definitely be a docker-network issue, just not sure how to troubleshoot that.
|
use public ip of the docker container to create replica so that java client on docker image can use this cluster. Otherwise java redis cluster driver will got 127.0.0.1 when discovering cluster nodes.