redis/node-redis · warning · Error

No Replicas Nodes Enumerated

Error message

No Replicas Nodes Enumerated

What it means

Thrown by RedisSentinelFactory.getReplicaNodes() when `connected` is true (a sentinel was reached) but createNodeList(replicaData) returned an empty list for every sentinel (sentinel/index.ts:1817). The sentinel is up and knows the master, but reports zero online replicas.

Source

Thrown at packages/client/lib/sentinel/index.ts:1818

      connected = true;

      try {
        const replicaData = await client.sentinel.sentinelReplicas(this.options.name);

        const replicas = createNodeList(replicaData);
        if (replicas.length == 0) {
          continue;
        }

        return replicas;
      } finally {
        client.destroy();
      }
    }

    if (connected) {
      throw new Error("No Replicas Nodes Enumerated");
    }

    throw new Error("couldn't connect to any sentinels");
  }

  async getReplicaClient() {
    const replicas = await this.getReplicaNodes();
    if (replicas.length == 0) {
      throw new Error("no available replicas");
    }

    this.#replicaIdx++;
    if (this.#replicaIdx >= replicas.length) {
      this.#replicaIdx = 0;
    }

    const replica = replicas[this.#replicaIdx];
    const socket = getMappedNode(replica.host, replica.port, this.options.nodeAddressMap);

View on GitHub (pinned to bb5beb5657)

Solutions

  1. Provision at least one replica for the monitored master (`replicaof` in redis.conf).
  2. Verify with `redis-cli -p 26379 sentinel replicas <name>` that the sentinel sees online replicas.
  3. If you don't need replicas, don't call getReplicaNodes()/getReplicaClient().
  4. Wait for replicas to come online and retry.
Defensive patterns

Strategy: validation

Validate before calling

// Before relying on replicas, check the sentinel sees at least one.
async function assertHasReplicas(sentinelNode, name) {
  const c = createClient({ socket: sentinelNode });
  c.on('error', () => {});
  await c.connect();
  try {
    const replicas = await c.sentinel.sentinelReplicas(name);
    if (!replicas || replicas.length === 0) throw new Error('no replicas visible to sentinel');
  } finally {
    await c.destroy();
  }
}

Try / catch

try {
  const replicas = await factory.getReplicaNodes();
} catch (e) {
  if (e instanceof Error && /No Replicas Nodes Enumerated/.test(e.message)) {
    // no replicas provisioned — fall back to master reads
  }
  throw e;
}

Prevention

When it happens

Trigger: Calling getReplicaNodes() on a sentinel-monitored deployment that has no replicas configured, or where all replicas are down/deselected so SENTINEL REPLICAS returns none.

Common situations: Single-node (master-only) Sentinel setup; replicas still spinning up; all replicas in sdown so the sentinel lists none; expecting read scaling without provisioning replicas.

Related errors


AI-assisted analysis of redis/node-redis@bb5beb5657 (2026-08-03). Data as JSON: /data/errors/b7ffaedadba1fa90.json. Report an issue: GitHub.