From 58c12a8d77e054ece8894b226fbd1422fb4704c6 Mon Sep 17 00:00:00 2001 From: Julia McGhee Date: Sat, 21 Mar 2026 21:51:17 +0000 Subject: [PATCH] Fix harness PTY: bind to 0.0.0.0 instead of HOSTNAME In K8s, HOSTNAME is set to the pod name, so the server only listened on that interface. The PTY server's loopback fetch to 127.0.0.1 was connection-refused. Always bind to 0.0.0.0 so loopback works. --- apps/harness/server.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/harness/server.js b/apps/harness/server.js index ccf3015..05884ec 100644 --- a/apps/harness/server.js +++ b/apps/harness/server.js @@ -3,7 +3,8 @@ const path = require("path"); const { parse } = require("url"); const dev = process.env.NODE_ENV !== "production"; -const hostname = process.env.HOSTNAME || "0.0.0.0"; +// HOSTNAME in K8s is the pod name — always bind to 0.0.0.0 +const hostname = "0.0.0.0"; const port = parseInt(process.env.PORT || "3100", 10); // In production, load the standalone config to avoid webpack dependency