Repository navigation
Conversation
1223e1f to
2349043
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1223e1fe8f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Greptile SummaryThis PR fixes a systemd/launchd crash-loop problem where Key points:
Confidence Score: 4/5
|
|
CI failures are pre-existing upstream issues, not caused by this PR:
This PR only touches |
2349043 to
869537e
Compare
|
Fixed in 869537edd4: |
869537e to
e951a42
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 869537edd4
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3b402228e5
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
The 3 remaining CI failures all point to the same test: |
3bd9ba0 to
272898c
Compare
272898c to
3fe3862
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3fe3862f3c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| token: resolvedAuthMode === "trusted-proxy" ? undefined : tokenValue, | ||
| password: resolvedAuthMode === "trusted-proxy" ? undefined : passwordValue, | ||
| tlsFingerprint: await resolveGatewayLockProbeTlsFingerprint({ cfg, tlsEnabled }), | ||
| headers: resolveTrustedProxyProbeHeaders(resolvedAuth), |
There was a problem hiding this comment.
Probe trusted-proxy listeners through a trusted source
This probe path still dials the gateway directly from the local process and only injects headers, but trusted-proxy auth also enforces source IP trust (authorizeTrustedProxy rejects when req.socket.remoteAddress is not in gateway.trustedProxies in src/gateway/auth.ts:337-339). In deployments where the trusted proxy is a different host (common with bind=lan/custom), these probes will always return ok: false, so openclaw gateway run still exits 1 on EADDRINUSE and supervised restart loops continue.
Useful? React with 👍 / 👎.
| pickLanHost: () => pickPrimaryLanIPv4() ?? null, | ||
| }); | ||
| if (bindUrl && "url" in bindUrl) { | ||
| addProbeUrl(bindUrl.url); |
There was a problem hiding this comment.
Normalize IPv6 custom bind URLs before probing
The bind-aware probe takes resolveGatewayBindUrl output as-is, but for gateway.bind=custom with an IPv6 host (for example ::1) that helper emits ws://::1:<port> (src/shared/gateway-bind-url.ts:23), which is not a valid URL and gets filtered out by isSecureWebSocketUrl. In that setup the probe falls back to 127.0.0.1 only, so an already-healthy gateway bound to IPv6 loopback is treated as unhealthy and startup still exits 1 on port conflict.
Useful? React with 👍 / 👎.
3fe3862 to
cf517c9
Compare
|
Thanks @hydro13. Closing as superseded by the shipped fix in 9289a50. Current main handles the same lock and The conflicting branch would now regress that systemd contract. Its generic WebSocket probe also synthesizes trusted-proxy identity headers and carries unrelated update-test deletion. If a current release still loops, please open a focused issue with the supervisor or unit configuration and redacted startup logs. |
Problem
When
openclaw gateway runhits EADDRINUSE, it exits with code 1. Under systemd/launchd withRestart=on-failure, this creates a tight crash-loop.Root Cause
GatewayLockErroron port conflict always exited non-zero, even when an already-healthy OpenClaw gateway was listening on that port.Fix
On EADDRINUSE, probe the gateway using the correct bind/TLS-aware URL with resolved auth credentials. Exit 0 only when a healthy OpenClaw instance is confirmed. Exit 1 for foreign processes or failed probes.
Probe handles all auth modes:
loadGatewayTlsRuntimeand pinned for the probeAlso fixes a pre-existing type error in
src/cli/update-cli.test.ts.Supersedes #29499 — thanks @BlueBirdBack for identifying the issue.
AI-assisted