openclaw - ✅(Solved) Fix Bonjour/ciao mDNS causes repeated gateway crashes on headless Linux (CIAO PROBING CANCELLED) [1 pull requests, 1 comments, 2 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#72344Fetched 2026-04-27 05:31:17
View on GitHub
Comments
1
Participants
2
Timeline
9
Reactions
1
Timeline (top)
referenced ×4cross-referenced ×2closed ×1commented ×1

Error Message

  • Make the bonjour/ciao integration robust against other mDNS stacks (proper error handling on probing/announcement cancellation).

Fix Action

Fix / Workaround

Workaround that works:

"plugins": {
  "entries": {
    "bonjour": {
      "enabled": false,
      "logLevel": "silent"
    }
  }
}

(Disabling the plugin + suppressing logs stops the crashes.)

PR fix notes

PR #72332: fix(gateway): suppress Windows console flicker and prevent Bonjour fatal crashes (#70238, #72344, #72339)

Description (problem / solution / changelog)

fix(gateway): suppress Windows console flicker and prevent Bonjour fatal crashes (#70238, #72344, #72339)

Summary

  • Problem: On Windows, launching the gateway causes jarring command prompt flickers. More critically, on both Linux and Windows, the Bonjour plugin causes fatal gateway crashes due to unhandled CIAO PROBING CANCELLED rejections and hard process.exit(1) calls in the @homebridge/ciao dependency when mDNS conflicts (like Avahi) occur.
  • Why it matters: This range of issues makes the gateway appear unstable on Windows and entirely unusable on many headless Linux VPS environments where mDNS stacks often conflict.
  • What changed: - Windows Flicker Fix: Added windowsHide: true to the TUI spawn and patched 6 exec calls within @homebridge/ciao.
    • Plugin Shielding: Updated advertiser.ts with error helpers to catch and suppress CANCELLED errors, logging them as debug instead of allowing them to crash the process.
    • Dependency Hardening: Patched @homebridge/[email protected] to replace process.exit(1) with console.warn() in CiaoService.js and Responder.js recovery paths.
    • Conflict Resilience: Added detection for EADDRINUSE. If a conflict (e.g., Avahi) is detected, the plugin now logs a warning and disables itself gracefully rather than crashing the core service.
  • What did NOT change: No changes were made to core networking logic or discovery protocols.

Change Type

  • Bug fix
  • Security hardening (Stability)
  • Refactor required for the fix (Dependency patch)

Scope

  • Gateway / orchestration
  • Integrations (Bonjour/mDNS)
  • UI / DX

Linked Issues

  • Closes #70238
  • Closes #72344
  • Closes #72339
  • This PR fixes a bug or regression

Root Cause

  1. Visual Flicker: Missing windowsHide flags on child process spawns in both internal code and dependencies.
  2. Fatal Crashes: Probing cancellations from ciao were leaking as unhandled promise rejections during watchdog restarts.
  3. Hard Exits: The @homebridge/ciao library utilized process.exit(1) for internal network interface update failures, which is inappropriate for a plugin-level dependency.

User-visible / Behavior Changes

  • Windows: Silent startup without flashing cmd.exe windows.
  • Linux: Resilience against existing Avahi/mDNS stacks; the gateway logs a conflict warning and continues to run.
  • General: Improved reliability; Bonjour failures are no longer fatal to the core gateway process.

Repro + Verification

Environment

  • OS: Windows 11 / Ubuntu 24.04 (Headless VPS)
  • Runtime: Node v22+
  • Tooling: pnpm

Steps

  1. Start gateway on Windows -> Verified: No visible console flickers.
  2. Start gateway on Linux with avahi-daemon active -> Verified: Logs mDNS conflict detected, gateway remains stable.
  3. Trigger watchdog re-advertise cycle -> Verified: CANCELLED errors caught, process stays alive.

Evidence

  • All 29 bonjour extension tests pass.
  • Verified pnpm patch-commit for @homebridge/[email protected] contains both visibility flags and exit-trap removals.
  • Confidence Score: 5/5 (Greptile)

Human Verification

  • Verified scenarios: Local Windows 11 build; Headless Linux VPS (Contabo) with Avahi conflict.
  • Edge cases checked: Relaunching the gateway multiple times; manual watchdog triggers.

Changed files

  • extensions/bonjour/src/advertiser.test.ts (modified, +32/-0)
  • extensions/bonjour/src/advertiser.ts (modified, +86/-20)
  • package.json (modified, +2/-1)
  • patches/@[email protected] (added, +94/-0)
  • pnpm-lock.yaml (modified, +5/-2)
  • src/plugins/jiti-loader-cache.test.ts (modified, +1/-5)
  • src/tui/tui-launch.ts (modified, +1/-0)

Code Example

"plugins": {
  "entries": {
    "bonjour": {
      "enabled": false,
      "logLevel": "silent"
    }
  }
}
RAW_BUFFERClick to expand / collapse

Bug Report: Bonjour/ciao mDNS plugin causes repeated gateway crashes on headless Linux VPS ("CIAO PROBING CANCELLED")

Version: 2026.4.24 (and previous weeks)

Environment:

  • Ubuntu 24.04 VPS (Contabo)
  • Headless
  • gateway.mode: local, bind: loopback
  • Both Avahi daemon (avahi-daemon) and OpenClaw's bonjour plugin active → mDNS stack conflict
  • avahi-daemon explicitly logs: *** WARNING: Detected another IPv4 mDNS stack running on this host. This makes mDNS unreliable...

Symptoms:

  • Bonjour plugin watchdog gets stuck in probing / announcing state for ~12-13 seconds.
  • Triggers unhandled promise rejection: CIAO PROBING CANCELLED or CIAO ANNOUNCEMENT CANCELLED.
  • Gateway process exits with status 1.
  • systemd restarts it in a tight loop.
  • Internal WS probe fails (ECONNRESET / timeout).
  • Multiple stability bundles created (see attached pattern).

Reproduction:

  1. Run on a Debian/Ubuntu system that has Avahi installed (common on VPS).
  2. Leave plugins.bonjour.enabled default (or even set to false — watchdog still runs).
  3. Observe gateway logs + journalctl -u openclaw-gateway.service.

Workaround that works:

"plugins": {
  "entries": {
    "bonjour": {
      "enabled": false,
      "logLevel": "silent"
    }
  }
}

(Disabling the plugin + suppressing logs stops the crashes.)

Requested fix:

  • Make the bonjour/ciao integration robust against other mDNS stacks (proper error handling on probing/announcement cancellation).
  • Or add auto-disable logic when Avahi is detected.
  • Prevent unhandled rejection from crashing the entire gateway.

Attached:

  • Multiple stability bundles from /root/.openclaw/logs/stability/ (latest ones from 2026-04-26)
  • journalctl excerpts showing the exact rejection
  • openclaw security audit --deep output (shows related exposure warnings but not this bug)

This has been a recurring source of instability on this VPS.

extent analysis

TL;DR

Disabling the Bonjour plugin by setting plugins.bonjour.enabled to false and suppressing its logs is a viable workaround to prevent gateway crashes.

Guidance

  • The conflict between Avahi daemon and OpenClaw's Bonjour plugin is likely causing the mDNS stack issue, leading to gateway crashes.
  • To verify the issue, check the gateway logs and journalctl -u openclaw-gateway.service for signs of mDNS stack conflicts and unhandled promise rejections.
  • Consider implementing proper error handling on probing/announcement cancellation in the Bonjour plugin to make it robust against other mDNS stacks.
  • Auto-disable logic for the Bonjour plugin when Avahi is detected could also prevent crashes.

Example

"plugins": {
  "entries": {
    "bonjour": {
      "enabled": false,
      "logLevel": "silent"
    }
  }
}

This configuration disables the Bonjour plugin and suppresses its logs, which can help prevent gateway crashes.

Notes

The provided workaround may not be a permanent solution, and a more robust fix would involve modifying the Bonjour plugin to handle mDNS stack conflicts and unhandled promise rejections.

Recommendation

Apply the workaround by disabling the Bonjour plugin and suppressing its logs, as it is a simple and effective way to prevent gateway crashes until a more permanent fix is available.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING