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

ERROR sending "cluster slots" command to redis server when I set a key #198

Open
jramirezneira opened this issue Jun 2, 2021 · 0 comments

Comments

@jramirezneira
Copy link

jramirezneira commented Jun 2, 2021

Checklist

  • Python version 3.7.3
  • Using Python parser
  • Using just asyncio event loop

the cluster configuration is as follow:

Number of Nodes: 4
Mode: cluster
Password: no
Encryption in-transit: yes
Encryption at-rest: yes
Engine Version: 6.0.5

Steps to reproduce

I am trying to test the cluster client example to an redis cluster on aws, when I set a Key ( await client.set('foo', 1)), redis return an error. my code is the following:

startup_nodes = [{ "host": "xxxxxx.xxxxxx.xxxxx.cache.amazonaws.com", "port" : int(6379) }]

async def example():
    client = StrictRedisCluster(startup_nodes=startup_nodes, connect_timeout=10, stream_timeout=10, ssl=True)

    await client.set('foo', 1)
    

loop = asyncio.get_event_loop()
loop.run_until_complete(example()) 

it works by using redis-py-cluster library with the same configuration.

Expected behavior

set the key in redis

Actual behavior

The connection works, but when it tries to set a key return this exception:

Exception has occurred: RedisClusterException
ERROR sending "cluster slots" command to redis server: {'host': 'xxx.xx.xxx.xxx.cache.amazonaws.com', 'port': 6379}

set operation is timed up after n seconds, just the stream timeout, however connection to server is OK

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

1 participant