Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Jan 31 2019 15:45
    seanpar203 commented #278
  • Jan 31 2019 15:45
    seanpar203 commented #278
  • Jan 29 2019 23:31
    ankitpatel96 commented #291
  • Jan 29 2019 21:39
    akrylysov commented #244
  • Jan 05 2019 08:42
    qianShaw commented #131
  • Jan 04 2019 13:18
    Grokzen commented #131
  • Jan 04 2019 03:35
    qianShaw commented #131
  • Jan 03 2019 14:41
    Grokzen closed #301
  • Jan 03 2019 14:41
    Grokzen commented #301
  • Jan 03 2019 14:04
    15astro commented #301
  • Jan 03 2019 00:04
    Grokzen commented #301
  • Jan 02 2019 17:54
    15astro edited #301
  • Jan 02 2019 17:47
    15astro opened #301
  • Dec 27 2018 15:17
    Grokzen commented #296
  • Dec 26 2018 17:16
    CheViana commented #296
  • Dec 26 2018 17:06
    CheViana commented #295
  • Dec 26 2018 13:10
    Grokzen synchronize #296
  • Dec 26 2018 13:10

    Grokzen on redis-py-3.0

    Ported in a few new testcases t… More unicode, bytestring fixes.… (compare)

  • Dec 25 2018 12:35
    coveralls commented #300
  • Dec 25 2018 12:35
    coveralls commented #300
are you able to connect to all nodes in the docker cluster with the regular redis-cli client from outside the container?
enter your container and look if all redis-server processes is running and if they are using the correct ports
On the node that works, what do you get back when you run CLUSTER INFO command?
I do think that you are using a redis client that is not compatible with a redis cluster and you should look into using a client that is for your usecase
@Grokzen Hi, its ok. as the setup was on single container so and also was not able to figure out the problem So i started Sentinel configuration. but here also am not able to configure and understand the configuration I have some points please have a look.
As per the tutorial (https://github.com/AliyunContainerService/redis-cluster )the configuration is created with local IP of docker( when I do port forwarding in Docker file for the master and sentinel its available for connecting from local machine but the synchronization between the master and slave did not happen it throw below exception
Connecting to MASTER
1:S 06 Jun 06:24:12.792 MASTER <-> SLAVE sync started
1:S 06 Jun 06:24:12.800
Non blocking connect for SYNC fired the event.
1:S 06 Jun 06:24:12.862 Master replied to PING, replication can continue...
1:S 06 Jun 06:24:12.869
Partial resynchronization not possible (no cached master)
1:S 06 Jun 06:24:12.870 * Master does not support PSYNC or is in error state (reply: -ERR Can't SYNC while not connected with my master).
Again to get the Master information we need to connect with Sentinel so it needs to be on port forwarding, when I specify the port forwarding on it then unable to scale it as we need more than 1 sentinel for electing the master in case of master failover. Here below exception is thrown
ERROR: for redissentinel_sentinel_3 Cannot start service sentinel: driver failed programming external connectivity on endpoint redissentinel_sentinel_3 (91803d790d07d933f9bfc7c2c431b23f8d633db37f6981705e1f758b07080c6a): Bind for failed: port is already allocated
Apart from above blockers there are lots of question coming as below which I have also posted on the forum but did not got any response on it, some of them are :
  1. How to expose the port 26379 by using sentinel announce-ip (my system Ip) to connect from outside.
  2. As we will get the master Information from The sentinels - which one to connect as I have 3.
  3. Do we need to right the logic to connect with the master in our application (MVC C#) to connect with the Details got form the point no 2. Or How.
  4. Do we need to expose the Slaves also? How.
@santosh2812 Sentinel? I can't help you with sentinel setup, i have never used that setup. I have only used the built-in redis-cluster support inside redis. You probably have to turn to other more general redis channels to get help with sentinel setups
Another more general problem you appear to have is that you have problems with your port sharing from the docker container. There is not many things that can cause that
one main thing is that you either run multiple containers that expose the same port, run one container but try to expose the same port multiple times, or that you have redis installed/configured on your host machine and try to start a container with the same setup and they both want to use the sam port
the error port is already allocated is usually a indication or either point 1 or 3 from ^
Angus Pearson
This PR andymccurdy/redis-py#866 at redis-py might have some interesting implications for this cluster impl if merged
seems to make fairly big changes to the client methods, by adding support for namespacing functions. I haven't had a play with the code yet but this might be useful for auto hashtagging keys (hashtag as in https://redis.io/topics/cluster-spec#keys-hash-tags)
@AngusP Is that not the third/fourth time that a namespace MR has been created? O.o
but still no merge yet
@Grokzen Re: that earlier work I was doing to find a good way to support lazy initialization, we were able to solve it at the application layer.
We have a delegate object we use via something like this:
def getattr(self, attr):
if not self._redis:
self._redis = initializeRedisClient(self._clusterEnabled, self._config)
res = getattr(self._redis, attr)
return res
works a lot better than expected
without needing to touch the library code at all
I'm now looking to add something like your https://github.com/Grokzen/docker-redis-cluster docker container to our testing setup. Would it be possible for you to add on an MIT license to that repro? I'd love to use your work directly, but it always nice to be sure there is a license explicit.
@AlexBoyd Woot? O.o is there not MIT license for that repo already?
It should have been that added to the repo already
i will add
awesome. Thanks for that :)
Grokzen/docker-redis-cluster#25 PR to add the default MIT license if that would at all help.
Kyle Fuhrmann
Hi there! I've been using the redis-py-cluster module for a few days now, and I've run into an issue. For rc.cluster_nodes(), I run into an issue where my port is returned as 6379@16379, and it errors out because in the utils.py, def parse_cluster_nodes(...) uses 'port': int(port). I've changed this to str(port) which hasn't caused any issues in my setup, but I'm not sure if it would cause issues elsewhere.
John Loehrer
@Grokzen just started playing around with hyperloglog commands and noticed that pfcount is blocked on pipeline mode: https://github.com/Grokzen/redis-py-cluster/blob/unstable/rediscluster/pipeline.py#L322-L323
is there a good reason for that? it should have the same restriction as the non-pipelined mode and only works with keys mapped to the same hashslot but I'm only planning on using single-key calls anyway.
John Loehrer

I have a workaround:

rediscluster.pipeline.StrictClusterPipeline.pfcount = rediscluster.client.StrictRedis.pfcount

But I'd rather not have to use it.

Put up a small patch to fix a bug I found in the retry logic when hitting a timeout / connection error in pipelines
just a really small fix where a return was inside rather than after a loop.
I had install redis-python-cluster model on AWS VM, then test the redis cluster connect failed. So is that only support redis 3.0+ version?
But I use jedis test it was successfully
Hello everyone! I am new to redis-py-cluster . I run a rediscluster with redis4.0.1, redis-py-cluster proper functioning. But redis-py-cluster's document said that It only support redis 3.0.x. I am confused.
And What redis version redis-py-cluster can realy supported? the redis-py-cluster i am using is redis_py_cluster-1.3.4.
morning guys! i anybody can recommend async/await style rediscluster client for py3.6 what better to use with aiohttp / sanic or any async io http servers ?
hello, how about let pipeline.watch() and pipeline.multi() support unique slot operation? Is there a good method to solve this problem before watch() and multi() available?
@alwaysR9 There is not that i know of
Joshua Gardner
I'm getting an error AttributeError: 'ConnectionPool' object has no attribute 'nodes'
@Grokzen can you tell me which company is using this lib? Thank you.
Hi everyone :) I have some trouble connecting redis in python. When I do it in a simple programm it works but when I connect to redis an another programm via in a docker image, it doesn't work anymore. Did someone have an issue like this one ? Thanks in advance
hi all, im using macOS, why I can't use redis cluster even I set the IP= in the environment
Leon Lee
Hello, anyone can help me with the hset command in redis-py-cluster? It hangs there when I use hset command
anyone know how to use lua to run script?
rediscluster_.eval(lua, 1, key, int(time.time()), auth["nonce"])
these errors come out:
Error running script (call to f_d8fc9f4469dc3bea9662f1af23a225c6fbd33622): @user_script:12: @user_script: 12: Wrong number of args calling Redis command From Lua script : ResponseError
Traceback (most recent call last):
File "/var/task/lambda_function.py", line 115, in POSTCheckin
return checkin(request)
File "/var/task/lambda_function.py", line 147, in checkin
get_secret_and_expiry(r, auth)
File "/var/task/lambda_function.py", line 315, in get_secret_and_expiry
int(time.time()), auth["nonce"])
File "/var/task/redis/client.py", line 2067, in eval
return self.execute_command('EVAL', script, numkeys, keys_and_args)
File "/var/task/rediscluster/utils.py", line 101, in inner
return func(
args, kwargs)
File "/var/task/rediscluster/client.py", line 371, in execute_command
return self.parse_response(r, command,
File "/var/task/redis/client.py", line 680, in parse_response
response = connection.read_response()
File "/var/task/redis/connection.py", line 629, in read_response
raise response
ResponseError: Error running script (call to f_d8fc9f4469dc3bea9662f1af23a225c6fbd33622): @user_script:12: @user_script: 12: Wrong number of args calling Redis command From Lua script
hi, anyone know Why doesn't redis-py-cluster support python redis 3.2.1.