valkey-io / valkey-glide

An open source Valkey client library that supports Valkey and Redis open source 6.2, 7.0 and 7.2. Valkey GLIDE is designed for reliability, optimized performance, and high-availability, for Valkey and Redis OSS based applications. GLIDE is a multi language client library, written in Rust with programming language bindings, such as Java and Python
Apache License 2.0
260 stars 53 forks source link

Fail to create GlideClusterClient #2533

Open ikolomi opened 1 week ago

ikolomi commented 1 week ago

Discussed in https://github.com/valkey-io/valkey-glide/discussions/2485

Originally posted by **ronenlinx** October 21, 2024 Im using AWS Elasticache with Valkey serverless instance and im failing to create `GlideClusterClient`. Im getting `ClosingError` with `timed_out` exception. When i try to connect to the instance using `redis-cli` it works. Even tried to connect using the `GlideClient` and same. What am i missing? ``` class ValkeyCache: def __init__(self, host: str, port: int = 6379): self.__addresses = [NodeAddress(host=host, port=port)] self.__client: Optional[GlideClusterClient] = None async def connect(self) -> None: try: config = GlideClusterClientConfiguration(addresses=self.__addresses, use_tls=True) # Create the cluster client self.__client = await GlideClusterClient.create(config=config) await self.__client.ping() except ClosingError as e: config = GlideClientConfiguration(addresses=self.__addresses, use_tls=True) self.__client = await GlideClient.create(config=config) await self.__client.ping() ``` This is the code im using to create the client
avifenesh commented 1 week ago

@ronenlinx Hi, we would like to get some extra information in order to recreate the issue. Can you share what is the platform you're running on, and the conf of the env? And can you connect without tls? I want to make sure it's a tls issue.