From e9965b969497ce70d4edf5a2fece3b98fcb8d4cc Mon Sep 17 00:00:00 2001 From: jbiskur Date: Sat, 21 Mar 2026 10:02:39 +0000 Subject: [PATCH] fix: register cluster instances with full ws:// URL including port The advertisedAddress was registered as a raw IP (e.g. "10.244.1.5") but transport.connect() needs a full WebSocket URL (e.g. "ws://10.244.1.5:3001"). This caused "Invalid url for WebSocket" errors in production. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/pathways/cluster/cluster-manager.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pathways/cluster/cluster-manager.ts b/src/pathways/cluster/cluster-manager.ts index cfd2f55..8ccdfc9 100644 --- a/src/pathways/cluster/cluster-manager.ts +++ b/src/pathways/cluster/cluster-manager.ts @@ -124,8 +124,9 @@ export class ClusterManager { advertisedAddress: this.advertisedAddress, }) - // Register this instance - await this.coordinator.register(this.instanceId, this.advertisedAddress) + // Register this instance with full WebSocket URL + const wsAddress = `ws://${this.advertisedAddress}:${this.port}` + await this.coordinator.register(this.instanceId, wsAddress) // Start WS server for accepting connections (both leader and worker need this) await this.startWsServer()