openclaw - ✅(Solved) Fix [Bug]: Default bundled plugins, especially bonjour, can block gateway startup after 2026.4.26 upgrade [4 pull requests, 4 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#74209Fetched 2026-04-30 06:27:16
View on GitHub
Comments
4
Participants
3
Timeline
14
Reactions
3
Author
Timeline (top)
cross-referenced ×8commented ×4subscribed ×2

After upgrading a Linux OpenClaw installation that previously worked on 2026.4.2 to the 2026.4.26 plugin set, the gateway became effectively unusable: many bundled plugins were enabled/loaded by default, and the bonjour advertiser repeatedly stayed in probing, triggered watchdog restarts, and coincided with repeated gateway restart/timeout behavior; after reducing the enabled plugin set to only the plugins actually needed, startup and normal operation recovered.

Root Cause

After upgrading a Linux OpenClaw installation that previously worked on 2026.4.2 to the 2026.4.26 plugin set, the gateway became effectively unusable: many bundled plugins were enabled/loaded by default, and the bonjour advertiser repeatedly stayed in probing, triggered watchdog restarts, and coincided with repeated gateway restart/timeout behavior; after reducing the enabled plugin set to only the plugins actually needed, startup and normal operation recovered.

Fix Action

Fix / Workaround

Logs, screenshots, and evidence

# Current package/status after workaround
$ openclaw --version
OpenClaw 2026.4.24 (cbcfdf6)

PR fix notes

PR #74242: fix(bonjour): cap advertiser restarts in a sliding window (#74209)

Description (problem / solution / changelog)

Fixes one of the concrete bug shapes in #74209: an indefinite bonjour: watchdog detected non-announced service; attempting re-advertise / bonjour: restarting advertiser log loop that the existing safety net was supposed to catch.

The bug

extensions/bonjour/src/advertiser.ts already has a "disable after MAX_CONSECUTIVE_RESTARTS failed restarts" cap. But the watchdog resets consecutiveRestarts = 0 on every tick where any service is observed in the "announced" state:

if (stateUnknown === "announced") {
  consecutiveRestarts = 0;
}

A flapping advertiser — e.g. a duplicate-name conflict on the LAN, or any environment where the service briefly announces and then slides back into probing — cycles between probing and announced and never accumulates 4 consecutive restarts. So the cap never fires and the watchdog churns indefinitely, exactly matching the journal excerpt in #74209 (~1.5 hours of repeating restart/re-advertise log lines).

This also keeps holding cycle state and console-log/exec patches that the disable path is supposed to clean up, which is meaningful on constrained Linux hosts during gateway startup.

The fix

Add a sliding-window absolute cap that is immune to transient announced flips:

const RESTART_WINDOW_MS = 30 * 60_000;
const MAX_RESTARTS_IN_WINDOW = 5;

The watchdog now records each restart timestamp, drops entries outside the window, and disables bonjour the moment either cap (consecutive or windowed) is exceeded. The disable log distinguishes the two reasons and still points at discovery.mdns.mode="off" / OPENCLAW_DISABLE_BONJOUR=1.

The original consecutive-restart path is preserved unchanged for healthy networks where restarts pile up without any announced reset.

Scope

This is intentionally narrow. The broader policy debate in #74209 about default-on bundled plugins and Bonjour startup activation needs maintainer judgment (per the codex review on the issue) and is out of scope for this PR.

Test

A regression test in advertiser.test.ts drives the announced ↔ probing flap through the watchdog with fake timers and asserts:

  • The new disable log ("restarts within N minutes") fires.
  • After disable, no further advertise() / createService() calls happen.

Verified that the test fails on main (the watchdog churns forever) and passes with the fix. All 44 bonjour tests still green:

✓ extensions/bonjour/src/advertiser.test.ts (26 tests)
✓ extensions/bonjour/src/ciao.test.ts (14 tests)
✓ extensions/bonjour/src/errors.test.ts (4 tests)

Refs #74209.

Changed files

  • extensions/bonjour/src/advertiser.test.ts (modified, +59/-0)
  • extensions/bonjour/src/advertiser.ts (modified, +27/-2)

PR #74778: fix(bonjour): avoid probing watchdog repair loops

Description (problem / solution / changelog)

Summary

  • treat ciao probing as an in-progress state so the Bonjour watchdog stops calling advertise() again while the service is still negotiating
  • reset the unhealthy window and add a conflict-settle grace period after name-change and hostname-change events so ciao can resolve duplicate names before OpenClaw tries to recycle the advertiser
  • add targeted advertiser regressions for probing and name-conflict loops, plus docs for the new watchdog behavior

Testing

  • pnpm exec oxfmt --check --threads=1 CHANGELOG.md docs/gateway/bonjour.md extensions/bonjour/src/advertiser.ts extensions/bonjour/src/advertiser.test.ts
  • pnpm test extensions/bonjour/src/advertiser.test.ts
  • pnpm build
  • pnpm check:changed

Changed files

  • docs/gateway/bonjour.md (modified, +5/-0)
  • extensions/bonjour/src/advertiser.test.ts (modified, +77/-13)
  • extensions/bonjour/src/advertiser.ts (modified, +29/-4)

PR #74811: fix(bonjour): auto-disable mDNS in WSL2 environments

Description (problem / solution / changelog)

Problem

In WSL2, the Bonjour/mDNS advertiser repeatedly fails because WSL2's virtualized network stack isolates the Linux guest from the host's multicast domain. This causes @homebridge/ciao to get stuck in the unannounced state and eventually exhaust its restart limit, producing warnings like:

bonjour: disabling advertiser after 3 failed restarts (service stuck in unannounced ...)
set discovery.mdns.mode=\"off\" or OPENCLAW_DISABLE_BONJOUR=1 to disable mDNS discovery

This is a common issue in WSL2 environments where multicast traffic cannot reach the Windows host network.

Solution

Automatically skip Bonjour advertisement when running in WSL2, using the existing isWSL2Sync() utility from plugin-sdk/runtime-env. This mirrors the existing behavior for container environments.

Users can still explicitly opt-in via OPENCLAW_DISABLE_BONJOUR=0 if they have a working multicast bridge setup.

Changes

  • extensions/bonjour/src/advertiser.ts: Added WSL2 detection to isDisabledByEnv()
  • extensions/bonjour/src/advertiser.test.ts:
    • Added tests for auto-disable and explicit opt-in in WSL2
    • Mocked isWSL2Sync so tests pass consistently regardless of host environment
    • Cleared WSL env vars in enableAdvertiserUnitMode() for test isolation
  • CHANGELOG.md: Added entry under Unreleased/Fixes

Testing

  • All 28 bonjour advertiser tests pass
  • New WSL2 auto-disable test verifies createService is not called
  • New WSL2 opt-in test verifies OPENCLAW_DISABLE_BONJOUR=0 overrides detection
  • Existing container tests still pass
  • Code formatting verified with oxfmt

Related

Refs #74209 (Bonjour can block gateway startup after 2026.4.26 upgrade)

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • extensions/bonjour/src/advertiser.test.ts (modified, +50/-0)
  • extensions/bonjour/src/advertiser.ts (modified, +4/-1)

PR #74820: fix(bonjour): auto-disable mDNS in WSL2 environments

Description (problem / solution / changelog)

Problem

In WSL2, the Bonjour/mDNS advertiser repeatedly fails because WSL2's virtualized network stack isolates the Linux guest from the host's multicast domain. This causes @homebridge/ciao to get stuck in the unannounced state and eventually exhaust its restart limit, producing warnings like:

bonjour: disabling advertiser after 3 failed restarts (service stuck in unannounced ...)
set discovery.mdns.mode=\"off\" or OPENCLAW_DISABLE_BONJOUR=1 to disable mDNS discovery

While c39ca49 (merged) and #74778 (pending) address the symptoms by limiting restart loops, they do not prevent the unnecessary churn in environments where multicast is fundamentally unsupported.

Solution

Automatically skip Bonjour advertisement when running in WSL2, using the existing isWSL2Sync() utility from plugin-sdk/runtime-env. This mirrors the existing behavior for container environments and avoids wasting resources on doomed advertisement attempts.

Users can still explicitly opt-in via OPENCLAW_DISABLE_BONJOUR=0 if they have a working multicast bridge setup.

How This Complements Existing Fixes

  • c39ca49: Caps restart loops (symptom mitigation) — still valuable for other constrained environments
  • #74778: Fixes probing state handling (bug fix) — orthogonal to this change
  • This PR: Prevents WSL2 from entering the failure path entirely (environment-aware optimization)

Changes

  • extensions/bonjour/src/advertiser.ts: Added WSL2 detection to isDisabledByEnv()
  • extensions/bonjour/src/advertiser.test.ts:
    • Added tests for auto-disable and explicit opt-in in WSL2
    • Mocked isWSL2Sync so tests pass consistently regardless of host environment
    • Cleared WSL env vars in enableAdvertiserUnitMode() for test isolation

Testing

  • All 28 bonjour advertiser tests pass
  • New WSL2 auto-disable test verifies createService is not called
  • New WSL2 opt-in test verifies OPENCLAW_DISABLE_BONJOUR=0 overrides detection
  • Existing container tests still pass
  • Code formatting verified with oxfmt

Related

Refs #74209

Changed files

  • docs/gateway/bonjour.md (modified, +5/-2)
  • docs/gateway/discovery.md (modified, +2/-2)
  • extensions/bonjour/src/advertiser.test.ts (modified, +50/-0)
  • extensions/bonjour/src/advertiser.ts (modified, +4/-1)

Code Example

# Current package/status after workaround
$ openclaw --version
OpenClaw 2026.4.24 (cbcfdf6)

$ openclaw gateway status
OpenClaw 2026.4.24 (cbcfdf6)
Runtime: running (pid 2919662, state active, sub running, last exit 0, reason 0)
Connectivity probe: ok
File logs: /tmp/openclaw/openclaw-2026-04-29.log

# Current package manager state after recovery/downgrade
$ npm list -g openclaw --depth=0
openclaw@2026.4.24

# 2026.4.26 plugin/runtime artifacts are present locally even though the current package is 2026.4.24:
# - ~/.openclaw/plugin-runtime-deps/openclaw-2026.4.26-*/...
# - ~/.openclaw/plugins/installs.json contained hostContractVersion: 2026.4.26 in a prior read-only inspection.

# systemd showed a gateway timeout during the broken period
$ systemctl status openclaw --no-pager
openclaw.service
  Active: failed (Result: timeout) since Mon 2026-04-27 22:21:47 EDT
  Main PID: 2882282 (code=killed, signal=KILL)
  Mem peak: 1.3G
  CPU: 4min 31.523s
  Apr 27 22:18:08 [gateway] loading configuration…
  Apr 27 22:18:08 [gateway] resolving authentication…
  Apr 27 22:18:08 [gateway] starting...
  Apr 27 22:18:29 [gateway] starting HTTP server...
  Apr 27 22:18:29 [health-monitor] started (interval: 300s, startup-grace: 60s, channel-connect-grace: 120s)

# Repeated bonjour probing/watchdog/restart cycle from journalctl -u openclaw --since 2026-04-24
Apr 27 19:58:34 [plugins] bonjour: watchdog detected non-announced service; attempting re-advertise (gateway fqdn=... state=probing)
Apr 27 19:58:49 [plugins] bonjour: restarting advertiser (service stuck in probing for 15120ms (... state=probing))
Apr 27 19:58:49 [plugins] bonjour: advertised gateway ... state=unannounced
Apr 27 20:01:08 [plugins] bonjour: watchdog detected non-announced service; attempting re-advertise (... state=probing)
Apr 27 20:01:23 [plugins] bonjour: restarting advertiser (service stuck in probing for 15161ms (... state=probing))
Apr 27 20:03:42 [plugins] bonjour: watchdog detected non-announced service; attempting re-advertise (... state=probing)
Apr 27 20:03:57 [plugins] bonjour: restarting advertiser (service stuck in probing for 15150ms (... state=probing))
# This pattern repeated many times between about 19:58 and 21:39 on Apr 27.

# Plugin/channel load errors during the same broken window
Apr 27 21:00:23 [channels] failed to load bundled channel bluebubbles: ENOTEMPTY: directory not empty, rmdir '.../plugin-runtime-deps/openclaw-2026.4.24-.../dist/extensions/node_modules/openclaw/plugin-sdk'
Apr 27 21:00:36 [channels] failed to load bundled channel zalouser: ENOTEMPTY: directory not empty, rmdir '.../plugin-runtime-deps/openclaw-2026.4.24-.../dist/extensions/node_modules/openclaw/plugin-sdk'
Apr 27 21:03:06 [channels] failed to load bundled channel mattermost: ENOTEMPTY: directory not empty, rmdir '.../plugin-runtime-deps/openclaw-2026.4.24-.../dist/extensions/node_modules/openclaw/plugin-sdk'

# Other observed gateway failure symptoms during recovery attempts
Apr 27 21:53:50 Gateway failed to start: another gateway instance is already listening on ws://0.0.0.0:18789 | listen EADDRINUSE: address already in use 0.0.0.0:18789
Apr 27 22:02:25 Gateway failed to start: another gateway instance is already listening on ws://0.0.0.0:18789 | listen EADDRINUSE: address already in use 0.0.0.0:18789
Apr 27 22:17:51 Gateway failed to start: another gateway instance is already listening on ws://0.0.0.0:18789 | listen EADDRINUSE: address already in use 0.0.0.0:18789

# Read-only plugin inspection captured default/enabled plugin expansion:
# - current plugin index effective enabled plugins: 69
# - local 2026.4.24 runtime deps marked enabledByDefault/recommended: 61
# - current status after partial trimming still printed "Plugins (10/13 loaded)"
# The gateway now reaches ready after trimming to the required plugins:
2026-04-29T02:47:58-04:00 [gateway] ready (3 plugins: acpx, browser, nextcloud-talk; 18.6s)
2026-04-29T02:51:19-04:00 [gateway] ready (3 plugins: acpx, browser, nextcloud-talk; 18.4s)
2026-04-29T04:01:43-04:00 [gateway] ready (3 plugins: acpx, browser, nextcloud-talk; 18.4s)
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

After upgrading a Linux OpenClaw installation that previously worked on 2026.4.2 to the 2026.4.26 plugin set, the gateway became effectively unusable: many bundled plugins were enabled/loaded by default, and the bonjour advertiser repeatedly stayed in probing, triggered watchdog restarts, and coincided with repeated gateway restart/timeout behavior; after reducing the enabled plugin set to only the plugins actually needed, startup and normal operation recovered.

Steps to reproduce

  1. Start from an existing OpenClaw installation that was working on 2026.4.2.
  2. Upgrade through the 2026.4.26 release/plugin set on Linux.
  3. Start the gateway with the expanded/default bundled plugin set.
  4. Observe startup/restart churn and plugin-related errors/timeouts in the gateway/system logs.
  5. Reduce the enabled plugin set to the required plugins only.
  6. Start the gateway again and observe that it reaches ready with a small plugin set.

Expected behavior

A version upgrade should not enable a large set of unused bundled plugins in a way that can block gateway startup or normal message handling. Optional discovery/provider/voice plugins should not make the gateway effectively unusable if the user does not configure or use them.

Actual behavior

On this host, after the upgrade, logs show repeated bonjour advertiser watchdog cycles stuck in probing, repeated gateway starts, systemd timeout failure, bundled channel/plugin load errors, and later task/session lock timeouts while OpenClaw was effectively not working. After trimming to the needed plugins, the gateway reached ready consistently with 3 plugins.

OpenClaw version

Last known good: 2026.4.2. First observed bad upgrade target/plugin set: 2026.4.26. Current local package after recovery/downgrade: OpenClaw 2026.4.24 (cbcfdf6); local plugin runtime deps and plugin index still include 2026.4.26 artifacts.

Operating system

Debian GNU/Linux 13 (trixie), Linux 6.12.63+deb13-amd64 x86_64, Node.js v22.22.1.

Install method

npm global, user systemd gateway service.

Model

Not model-specific. Observed with the normal local OpenClaw agent/provider setup.

Provider / routing chain

Not provider-specific. The failure is in gateway startup/plugin loading before normal agent/provider operation.

Additional provider/model setup details

NOT_ENOUGH_INFO

Logs, screenshots, and evidence

# Current package/status after workaround
$ openclaw --version
OpenClaw 2026.4.24 (cbcfdf6)

$ openclaw gateway status
OpenClaw 2026.4.24 (cbcfdf6)
Runtime: running (pid 2919662, state active, sub running, last exit 0, reason 0)
Connectivity probe: ok
File logs: /tmp/openclaw/openclaw-2026-04-29.log

# Current package manager state after recovery/downgrade
$ npm list -g openclaw --depth=0
[email protected]

# 2026.4.26 plugin/runtime artifacts are present locally even though the current package is 2026.4.24:
# - ~/.openclaw/plugin-runtime-deps/openclaw-2026.4.26-*/...
# - ~/.openclaw/plugins/installs.json contained hostContractVersion: 2026.4.26 in a prior read-only inspection.

# systemd showed a gateway timeout during the broken period
$ systemctl status openclaw --no-pager
openclaw.service
  Active: failed (Result: timeout) since Mon 2026-04-27 22:21:47 EDT
  Main PID: 2882282 (code=killed, signal=KILL)
  Mem peak: 1.3G
  CPU: 4min 31.523s
  Apr 27 22:18:08 [gateway] loading configuration…
  Apr 27 22:18:08 [gateway] resolving authentication…
  Apr 27 22:18:08 [gateway] starting...
  Apr 27 22:18:29 [gateway] starting HTTP server...
  Apr 27 22:18:29 [health-monitor] started (interval: 300s, startup-grace: 60s, channel-connect-grace: 120s)

# Repeated bonjour probing/watchdog/restart cycle from journalctl -u openclaw --since 2026-04-24
Apr 27 19:58:34 [plugins] bonjour: watchdog detected non-announced service; attempting re-advertise (gateway fqdn=... state=probing)
Apr 27 19:58:49 [plugins] bonjour: restarting advertiser (service stuck in probing for 15120ms (... state=probing))
Apr 27 19:58:49 [plugins] bonjour: advertised gateway ... state=unannounced
Apr 27 20:01:08 [plugins] bonjour: watchdog detected non-announced service; attempting re-advertise (... state=probing)
Apr 27 20:01:23 [plugins] bonjour: restarting advertiser (service stuck in probing for 15161ms (... state=probing))
Apr 27 20:03:42 [plugins] bonjour: watchdog detected non-announced service; attempting re-advertise (... state=probing)
Apr 27 20:03:57 [plugins] bonjour: restarting advertiser (service stuck in probing for 15150ms (... state=probing))
# This pattern repeated many times between about 19:58 and 21:39 on Apr 27.

# Plugin/channel load errors during the same broken window
Apr 27 21:00:23 [channels] failed to load bundled channel bluebubbles: ENOTEMPTY: directory not empty, rmdir '.../plugin-runtime-deps/openclaw-2026.4.24-.../dist/extensions/node_modules/openclaw/plugin-sdk'
Apr 27 21:00:36 [channels] failed to load bundled channel zalouser: ENOTEMPTY: directory not empty, rmdir '.../plugin-runtime-deps/openclaw-2026.4.24-.../dist/extensions/node_modules/openclaw/plugin-sdk'
Apr 27 21:03:06 [channels] failed to load bundled channel mattermost: ENOTEMPTY: directory not empty, rmdir '.../plugin-runtime-deps/openclaw-2026.4.24-.../dist/extensions/node_modules/openclaw/plugin-sdk'

# Other observed gateway failure symptoms during recovery attempts
Apr 27 21:53:50 Gateway failed to start: another gateway instance is already listening on ws://0.0.0.0:18789 | listen EADDRINUSE: address already in use 0.0.0.0:18789
Apr 27 22:02:25 Gateway failed to start: another gateway instance is already listening on ws://0.0.0.0:18789 | listen EADDRINUSE: address already in use 0.0.0.0:18789
Apr 27 22:17:51 Gateway failed to start: another gateway instance is already listening on ws://0.0.0.0:18789 | listen EADDRINUSE: address already in use 0.0.0.0:18789

# Read-only plugin inspection captured default/enabled plugin expansion:
# - current plugin index effective enabled plugins: 69
# - local 2026.4.24 runtime deps marked enabledByDefault/recommended: 61
# - current status after partial trimming still printed "Plugins (10/13 loaded)"
# The gateway now reaches ready after trimming to the required plugins:
2026-04-29T02:47:58-04:00 [gateway] ready (3 plugins: acpx, browser, nextcloud-talk; 18.6s)
2026-04-29T02:51:19-04:00 [gateway] ready (3 plugins: acpx, browser, nextcloud-talk; 18.4s)
2026-04-29T04:01:43-04:00 [gateway] ready (3 plugins: acpx, browser, nextcloud-talk; 18.4s)

Impact and severity

Affected: at least this Linux/npm-global OpenClaw gateway after upgrading from a known-good 2026.4.2 installation through the 2026.4.26 plugin set.

Severity: High / workflow-blocking. During the broken period OpenClaw was effectively not usable: the service hit timeouts/restart churn, gateway starts conflicted, and agent work later produced session/write-lock timeouts instead of normal replies.

Frequency: Repeatedly observed during the broken window; the bonjour stuck-in-probing watchdog cycle repeated many times.

Consequence: The gateway can appear started or repeatedly restarting while actual agent/channel work is blocked. Recovery required reducing the plugin set to only needed plugins.

Additional information

This looks like a regression in plugin default enablement/isolation rather than a single provider/model issue. Suggested triage direction:

  • Do not enable optional bundled plugins by default unless they are needed for core operation or explicitly configured.
  • bonjour should be opt-in or fully non-blocking; mDNS probing/advertising should never block gateway readiness or normal agent/channel work.
  • Plugin/channel dependency setup should be isolated so unused bundled channels such as bluebubbles, zalouser, or mattermost cannot affect users who did not configure them.
  • Consider a startup mode that loads only configured channels/providers plus a minimal core, and reports optional plugin failures without blocking readiness.

extent analysis

TL;DR

Reducing the enabled plugin set to only the required plugins may resolve the gateway startup and operation issues after upgrading to the 2026.4.26 plugin set.

Guidance

  • Review the list of enabled plugins and disable any that are not necessary for core operation or explicitly configured.
  • Consider setting bonjour to opt-in or non-blocking to prevent it from affecting gateway readiness.
  • Verify that plugin/channel dependency setup is isolated to prevent unused bundled channels from impacting users who did not configure them.
  • Test the gateway with a minimal set of plugins to identify if any specific plugins are causing the issues.

Example

No specific code changes are suggested at this time, but reviewing the plugin configuration and adjusting as needed may help resolve the issue.

Notes

The root cause of the issue appears to be related to the default enablement of optional bundled plugins, which can cause conflicts and timeouts. Reducing the plugin set to only required plugins may be a temporary workaround, but a more permanent solution may involve changes to the plugin enablement and dependency setup.

Recommendation

Apply the workaround of reducing the enabled plugin set to only the required plugins, as this has been shown to resolve the issue in the provided example. This will allow for temporary resolution of the gateway startup and operation issues while a more permanent solution is developed.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

A version upgrade should not enable a large set of unused bundled plugins in a way that can block gateway startup or normal message handling. Optional discovery/provider/voice plugins should not make the gateway effectively unusable if the user does not configure or use them.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix [Bug]: Default bundled plugins, especially bonjour, can block gateway startup after 2026.4.26 upgrade [4 pull requests, 4 comments, 3 participants]