Skip to content

Cluster mode connection error: Failed to refresh slots cache #53

@armanhi

Description

@armanhi

Hi!

I'm trying to connect to a valkey cluster on Elasticache I've just created. I'm currently testing it using ECS, with this code: (pardon the obvious Redis references)

`const IORedis = require('iovalkey');
const redisConfig = {
enableAutoPipelining: true
};

  if (config.useRedisTLS) {
    redisConfig.tls = {};
  }

    return new IORedis.Cluster(
      [
        {
          port: redisPort,
          host: redisUrl
        }
      ],
      {
        maxRedirections: 3,
        //https://github.com/redis/ioredis?tab=readme-ov-file#read-write-splitting
        scaleReads: 'slave', //master,all,slave 
        redisOptions: redisConfig
      }
    );`

redisPort is an integer. redisUrl comes from "Configuration endpoint" in Elasticache, minus the port. Am I doing anything wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions