redis/node-redis · error · Error
No Replicas Nodes Enumerated
Error message
No Replicas Nodes Enumerated
What it means
In `getReplicaNodes()`, the loop sets `connected = true` once a sentinel responds, but if every responding sentinel returns an empty replica list (`createNodeList` length 0), no replicas are returned and it throws 'No Replicas Nodes Enumerated'. It signals 'sentinels up, but no replicas known'.
Solutions
- Provision replicas and attach them to the master.
- Wait for Sentinel discovery to pick up newly added replicas.
- Inspect `SENTINEL replicas <name>` on a live sentinel.
- Fall back to reading from the master if no replicas are required.
Defensive patterns
Strategy: fallback
Validate before calling
async function replicasAvailable(sentinel: { getReplicaNodes(): Promise<unknown[]> }): Promise<boolean> {
try { return (await sentinel.getReplicaNodes()).length > 0; }
catch { return false; }
} Try / catch
let client;
try { client = await sentinel.getReplicaClient(); }
catch (e) {
if (String(e).includes('No Replicas Nodes Enumerated')) {
client = await sentinel.getMasterClient(); // degrade reads to master
} else throw e;
} Prevention
- Provision replicas before enabling replica reads.
- Build read paths that can fall back to the master when no replicas exist.
When it happens
Trigger: Calling `getReplicaNodes()` / `getReplicaClient()` when the topology has no replicas attached, or Sentinel has not yet discovered them, or all replicas are flagged out by `createNodeList`.
Common situations: Single-master deployment with no replicas; replicas still syncing/not yet discovered; replicas flagged down so filtered out; read-scaling expected but not provisioned.
Related errors
- Couldn't connect to any sentinel node
- Master Node Not Enumerated
- no available replicas
- no replicas available for read
- no valid master node
AI-assisted analysis of redis/node-redis@90fd0652bc (2026-08-11).
Data as JSON: /api/errors/b7ffaedadba1fa90.
Report an issue: GitHub.
Appendix: 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 90fd0652bc)