redis / node-redis

Redis Node.js client
https://redis.js.org/
MIT License
16.9k stars 1.89k forks source link

Cluster connections fails after upgrade to 1.5.17 from 1.5.16 #2826

Open JimmyBjorklund opened 1 month ago

JimmyBjorklund commented 1 month ago

Description

After upgrade to 1.5.17 from 1.5.16 the connect function never returns.

host: clustercfg.XXXXXXXmemorydb.eu-north-1.amazonaws.com port is: 6379

    const options: RedisClusterOptions = {
      rootNodes: [{
        url:"rediss://" + this.config.redis.host + ":" + this.config.redis.port,
      }]
      ,defaults: {
        username: this.config.redis.username,
        password: this.config.redis.password,
        socket: {
          tls: false
        }
      }
    };
    this.redis = createCluster(options);
    console.log("Connecting to Redis Cluster: " + this.config.redis.host + ":" + this.config.redis.port);
    this.redis.on("error", (err) => Logger.error("Redis Cluster Error"));
    await this.redis
      .connect()
      .then(() => {
        console.log("Connected to Redis Cluster: " + this.config.redis.host + ":" + this.config.redis.port);
      })
      .catch((err) => {
        console.log("Error connecting to Redis Cluster: " + this.config.redis.host + ":" + this.config.redis.port);
        exit(1);
      });

Node.js Version

v20.15.0

Redis Server Version

Engine version 7.1

Node Redis Version

No response

Platform

AWS

Logs

No response

leibale commented 3 weeks ago

I just tried connecting to a cluster locally and it seems like it works.. I'm not sure what the bug is, and without being able to reproduce it we won't be able to fix it.. If you want we can debug this together, ping me on the redis discord (my handle is @leibale) :)