Repository navigation
fix(cli): scope the serve port guard to the bind address - #15472
Merged
diegosouzapw merged 2 commits intoOct 6, 2026
Merged
Conversation
lsof -t reports every listener on the port, so a forwarder on another address blocked a loopback serve. Keep the listen address and ignore a listener that does not hold the address serve will bind. A wildcard still blocks loopback. The port after the colon must match exactly, so 1443 is not 443. A missing name is not a conflict. Related to diegosouzapw#15424. Signed-off-by: Minxi Hou <houminxi@gmail.com>
The bind-address guard needs its own changelog fragment so release aggregation picks it up. Signed-off-by: Minxi Hou <houminxi@gmail.com>
7 of 8 tasks
diegosouzapw
merged commit Oct 6, 2026
58269a7
into
diegosouzapw:release/v3.8.52
43 of 51 checks passed
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
omniroute servetreated every listener on the port as a conflict.lsof -tdoes not say which address is listening, so a forwarder bound to another address stopped a loopback serve (OMNIROUTE_SERVER_HOST=127.0.0.1).*,0.0.0.0,::) still does, because that bind holds loopback too.1443is not a match for443. A line with no listen address is not a conflict.0.0.0.0, and that path still probes every address.Validation
node --test tests/unit/cli-serve-port-in-use-preflight.test.mjs tests/unit/cli-serve-stop-command.test.ts tests/unit/cli-serve-hostname.test.ts— 35 pass, 0 fail1443vs443test fail. Putting it back passes.review-default. Both ended PENDING with 0 CONFIRMED. The UNCERTAIN notes are excerpt line counts (declared N, carried N-1) and restatements of the address filter. The line-count note moved between line ranges across runs and did not name a behavior change.Tests Added Or Updated
tests/unit/cli-serve-port-in-use-preflight.test.mjs192.168.1.50*:portlistener127.0.0.1:1443is not a listener on port443lsofis called without-tso the address stays in the outputCoverage Notes
lsofstdout. They do not open a real socket on a second address. The existing probe tests still bind a real port.Reviewer Notes
stopstill useslsof -t. It kills listeners; it does not decide whether a bind would succeed.resolveServerHost()is0.0.0.0. With noOMNIROUTE_SERVER_HOST, every listener is still a conflict.