From 13a678a41c0def78db85bc4891b9fb0d78f02dcb Mon Sep 17 00:00:00 2001 From: abs2023 <93659489+abs2023@users.noreply.github.com> Date: Tue, 22 Sep 2026 14:12:50 -0400 Subject: [PATCH] fix(market-maker): bind the health server on IPv4 The load balancer checks the task IPv4 address. listen(port) on the current node image binds IPv6 only, so those checks time out and ECS rolls the task back. Co-authored-by: Cursor --- market-maker/src/core/healthcheck.ts | 2 +- market-maker/src/core/portfolioHealth.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/market-maker/src/core/healthcheck.ts b/market-maker/src/core/healthcheck.ts index bb731bb..6ea325e 100644 --- a/market-maker/src/core/healthcheck.ts +++ b/market-maker/src/core/healthcheck.ts @@ -98,7 +98,7 @@ export class HealthCheck { const logger = this.opts.logger; const port = this.opts.port; - this.server.listen(port, () => { + this.server.listen(port, "0.0.0.0", () => { logger.info( { human: `http://localhost:${port}/health`, diff --git a/market-maker/src/core/portfolioHealth.ts b/market-maker/src/core/portfolioHealth.ts index 2c05bae..9ff9af1 100644 --- a/market-maker/src/core/portfolioHealth.ts +++ b/market-maker/src/core/portfolioHealth.ts @@ -73,7 +73,9 @@ export class PortfolioHealthCheck { } }); const { logger, port } = this.opts; - this.server.listen(port, () => { + // Bind IPv4 explicitly. listen(port) alone binds :: on current + // node:24-alpine, and the ALB health check to the task IPv4 times out. + this.server.listen(port, "0.0.0.0", () => { logger.info( { human: `http://localhost:${port}/health`,