Repository navigation
fix(ark-ui): pin the nginx upstreams to 127.0.0.1 - #119
Merged
Merged
Conversation
The gateway binds 127.0.0.1 by design, but nginx proxied to localhost, which /etc/hosts also maps to ::1. When nginx picks the v6 address the connection is refused and every /api/ route answers 502 while the front page still serves 200. Reproduced on a Modalix JAJ: 502 on each boot, gateway healthy on :3000 throughout, cleared by restarting nginx and fixed permanently by this change (verified across a cold boot). The /video upstream on line 57 was already pinned; this makes the other two match.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Every
/api/route can answer 502 while the front page serves 200.Problem
services/ark-ui-backend/index.jsbinds the gateway to127.0.0.1deliberately, butfrontend/ark-ui.nginxproxied tolocalhost, which/etc/hostsmaps to both127.0.0.1and::1. When nginx resolves the v6 address the connection is refused:The failure is silent from the outside: nginx still serves the SPA at
/, so the UI loads and every API call fails.Found on a Modalix JAJ, where it reproduced on each boot — the gateway answered 200 on
:3000and each manager answered 200 directly the whole time. Restarting nginx cleared it, which is why it presents as intermittent: a Modalix PAB V3 on the same package passed the same checks.Solution
Pin both upstreams to
127.0.0.1, matching the/videoupstream on line 57 which was already pinned. Verified on hardware across a cold boot: 502 -> 200 on all three manager routes.