redis/node-redis · error · Error
[Proxy] No destination node
Error message
[Proxy] No destination node
What it means
triggerMigrate selects a destination node (the connectionless node for 'new', or nodes.at(-1) for 'existing') and asserts it with the non-null assertion operator. This runtime guard throws if the chosen destination is undefined — which only happens when the nodes array is empty (getProxyNodes returned no nodes).
Source
Thrown at packages/test-utils/lib/fault-injector/proxied-fault-injector-cluster.ts:126
`[Proxy] Failed to send SMIGRATING notification: ${migratingResult.error}`
);
}
// 2. Simulate maintenance delay
await setTimeout(2_000);
const isNewDestination = params.destination_type === "new";
if (isNewDestination && !nodeWithoutConnections) {
throw new Error(`[Proxy] No node with no connections`);
}
const destinationNode = isNewDestination
? nodeWithoutConnections!
: nodes.at(-1)!; // Get the last node as the destination
if (!destinationNode) {
throw new Error(`[Proxy] No destination node`);
}
const sMigratedNotification = buildSMigratedNotification([
{
targetNode: destinationNode,
slotRanges: slots,
},
]);
const migratedResult = await this.proxyController.sendToClient(
connections[sourceNode.id][0],
sMigratedNotification
);
if (!migratedResult.success) {
throw new Error(
`[Proxy] Failed to send SMIGRATED notification: ${migratedResult.error}`
);View on GitHub (pinned to 90fd0652bc)
Solutions
- Ensure the proxy has discovered cluster nodes before migrating: await proxyController.getNodes() and check ids is non-empty
- Wait for cluster topology convergence before invoking triggerAction
- Verify the cluster is actually running and announcing nodes to the proxy
Example fix
// before — migrate called with no nodes present
await proxiedFi.triggerAction({ type: 'migrate', parameters: {...} });
// Error: [Proxy] No destination node
// after — ensure topology first
const nodes = await proxiedFi.getProxyNodes();
if (nodes.length === 0) throw new Error('cluster not ready');
await proxiedFi.triggerAction({ type: 'migrate', parameters: {...} }); Defensive patterns
Strategy: validation
Validate before calling
async function assertProxyHasNodes(proxiedFi: ProxiedFaultInjectorClientForCluster): Promise<void> {
const nodes = await proxiedFi.getProxyNodes();
if (nodes.length === 0) {
throw new Error('Proxy has no cluster nodes; wait for topology before migrating');
}
} Type guard
function hasProxyNodes(nodes: ProxyNode[]): nodes is [ProxyNode, ...ProxyNode[]] {
return nodes.length > 0;
} Try / catch
try {
await proxiedFi.triggerAction({ type: 'migrate', parameters: {...} });
} catch (e) {
if (e instanceof Error && /No destination node/.test(e.message)) {
}
throw e;
} Prevention
- Wait for cluster topology convergence (getProxyNodes non-empty) before migrating
- Verify the cluster is running and announcing nodes to the proxy
- Guard migrations behind a node-count assertion at the test boundary
When it happens
Trigger: getProxyNodes() returns an empty list because the proxy controller reports zero cluster nodes; the cluster has not been discovered yet; the proxy is in a freshly-started state with no nodes registered.
Common situations: Calling triggerMigrate before the cluster topology is known to the proxy; proxy started but cluster nodes not yet announced; a prior action tore down the topology.
Related errors
- [Proxy] Failed to send SMIGRATING notification: ${migratingR
- [Proxy] No node with no connections
- [Proxy] Failed to send SMIGRATED notification: ${migratedRes
- No slots to migrate
- Could not find shard
AI-assisted analysis of redis/node-redis@90fd0652bc (2026-08-11).
Data as JSON: /api/errors/aff82266e0bac225.
Report an issue: GitHub.