Skip to content

asyncio RedisCluster is not working for Amazon Elasticache #2233

Closed
@0xD09CD196D188D0B0

Description

@0xD09CD196D188D0B0

Version:
Redis-py
redis==4.3.3 (hiredis==2.0.0)

Redis 6.0.5 on Amazon Elasticache

Platform:

Python 3.9.11 on Debian GNU/Linux 11 (bullseye)

Description:

asyncio RedisCluster client is hanging when trying to be connected to Redis Cluster hosted on Amazon Elasticache. No exception raised, it's just freezing on initialize() forever. At the same time, using blocking RedisCluster for the same cluster with the same parameters is working fine. Single-node asyncio Redis client is also working when connecting directly to a cluster node.

A small snippet of how to reproduce:

import asyncio
from redis.asyncio.cluster import RedisCluster as AsyncRedisCluster


redis_cluster = AsyncRedisCluster.from_url(
    "rediss://:REDACTED@clustercfg.REDACTED.REDACTED.REDACTED.cache.amazonaws.com:6379",
    decode_responses=True,
    require_full_coverage=False
)


async def go():
    await redis_cluster.initialize()
    await redis_cluster.ping()


asyncio.run(go())

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions