openclaw - 💡(How to fix) Fix Bonjour plugin crashes gateway with CIAO ANNOUNCEMENT CANCELLED when system hostname differs from cached hostname [4 comments, 4 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#72562Fetched 2026-04-28 06:34:26
View on GitHub
Comments
4
Participants
4
Timeline
5
Reactions
0
Author
Timeline (top)
commented ×4closed ×1

Error Message

[plugins] bonjour: watchdog detected non-announced service; attempting re-advertise (gateway fqdn=openclaw-gw._openclaw-gw._tcp.local. host=openclaw.local. port=18789 state=probing)
[plugins] bonjour: advertised gateway fqdn=openclaw-gw._openclaw-gw._tcp.local. host=openclaw.local. port=18789 state=announcing
[plugins] bonjour: restarting advertiser (service stuck in announcing for 10778ms (gateway fqdn=openclaw-gw._openclaw-gw._tcp.local. host=openclaw.local. port=18789 state=announcing))
[openclaw] Unhandled promise rejection: CIAO ANNOUNCEMENT CANCELLED

Root Cause

  1. OpenClaw's Bonjour plugin uses process.env.OPENCLAW_MDNS_HOSTNAME to set the hostname, but CIAO internally resolves the hostname to an IP address using system DNS. When /etc/hosts has a stale entry like 127.0.1.1 Openclaw, CIAO resolves openclaw.local to the old IP, while the service was reconfigured with the new hostname.

  2. The result is a persistent mismatch: gateway fqdn=openclaw-gw._openclaw-gw._tcp.local. host=openclaw.local. — the FQDN uses the new hostname but the host field still uses the old cached one.

  3. Even after setting OPENCLAW_MDNS_HOSTNAME environment variable, the CIAO responder still advertises the stale hostname because CIAO performs reverse DNS lookup on the local machine at advertisement time.

Fix Action

Workaround

Disable the Bonjour plugin in ~/.openclaw/openclaw.json:

{
  "plugins": {
    "entries": {
      "bonjour": { "enabled": false }
    }
  }
}

This prevents the crash but disables mDNS-based gateway discovery on the local network.

Code Example

[openclaw] Unhandled promise rejection: CIAO ANNOUNCEMENT CANCELLED

---

gateway fqdn=openclaw-gw._openclaw-gw._tcp.local. host=openclaw.local. port=18789 state=announcing

---

[plugins] bonjour: watchdog detected non-announced service; attempting re-advertise (gateway fqdn=openclaw-gw._openclaw-gw._tcp.local. host=openclaw.local. port=18789 state=probing)
[plugins] bonjour: advertised gateway fqdn=openclaw-gw._openclaw-gw._tcp.local. host=openclaw.local. port=18789 state=announcing
[plugins] bonjour: restarting advertiser (service stuck in announcing for 10778ms (gateway fqdn=openclaw-gw._openclaw-gw._tcp.local. host=openclaw.local. port=18789 state=announcing))
[openclaw] Unhandled promise rejection: CIAO ANNOUNCEMENT CANCELLED

---

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

Bug Description

The Bonjour/mDNS plugin causes an unhandled promise rejection that crashes the entire gateway process when the system hostname differs from the hostname OpenClaw has cached internally for mDNS advertising.

Steps to Reproduce

  1. Install OpenClaw Gateway v2026.4.24 on a Linux machine
  2. Change the system hostname (e.g., via hostnamectl set-hostname new-hostname)
  3. Restart the OpenClaw gateway service
  4. Observe the gateway crashing every ~30 seconds with "CIAO ANNOUNCEMENT CANCELLED"

Expected Behavior

The gateway should either:

  • Dynamically track system hostname changes
  • Use the configured OPENCLAW_MDNS_HOSTNAME environment variable correctly
  • Handle hostname conflicts gracefully without crashing

Actual Behavior

The gateway crashes with an unhandled promise rejection:

[openclaw] Unhandled promise rejection: CIAO ANNOUNCEMENT CANCELLED

The Bonjour plugin advertises the service with a mismatched hostname:

gateway fqdn=openclaw-gw._openclaw-gw._tcp.local. host=openclaw.local. port=18789 state=announcing

The host=openclaw.local is stale and does not resolve correctly on the network, causing the CIAO watchdog to detect the service is stuck in announcing state, then cancel the announcement, triggering an unhandled promise rejection that kills the process.

Root Cause Analysis

  1. OpenClaw's Bonjour plugin uses process.env.OPENCLAW_MDNS_HOSTNAME to set the hostname, but CIAO internally resolves the hostname to an IP address using system DNS. When /etc/hosts has a stale entry like 127.0.1.1 Openclaw, CIAO resolves openclaw.local to the old IP, while the service was reconfigured with the new hostname.

  2. The result is a persistent mismatch: gateway fqdn=openclaw-gw._openclaw-gw._tcp.local. host=openclaw.local. — the FQDN uses the new hostname but the host field still uses the old cached one.

  3. Even after setting OPENCLAW_MDNS_HOSTNAME environment variable, the CIAO responder still advertises the stale hostname because CIAO performs reverse DNS lookup on the local machine at advertisement time.

Environment

  • OpenClaw version: v2026.4.24
  • Node.js: v22.22.2
  • OS: Ubuntu 24.04 (Linux 6.17.0)
  • System hostname changed from openclaw to openclaw-gw
  • /etc/hosts had stale entry 127.0.1.1 Openclaw
  • systemd service with OPENCLAW_MDNS_HOSTNAME=openclaw-gw set in Environment

Logs

[plugins] bonjour: watchdog detected non-announced service; attempting re-advertise (gateway fqdn=openclaw-gw._openclaw-gw._tcp.local. host=openclaw.local. port=18789 state=probing)
[plugins] bonjour: advertised gateway fqdn=openclaw-gw._openclaw-gw._tcp.local. host=openclaw.local. port=18789 state=announcing
[plugins] bonjour: restarting advertiser (service stuck in announcing for 10778ms (gateway fqdn=openclaw-gw._openclaw-gw._tcp.local. host=openclaw.local. port=18789 state=announcing))
[openclaw] Unhandled promise rejection: CIAO ANNOUNCEMENT CANCELLED

Workaround

Disable the Bonjour plugin in ~/.openclaw/openclaw.json:

{
  "plugins": {
    "entries": {
      "bonjour": { "enabled": false }
    }
  }
}

This prevents the crash but disables mDNS-based gateway discovery on the local network.

Suggested Fix

  1. Short-term: Clear CIAO's internal hostname cache when OPENCLAW_MDNS_HOSTNAME changes, or re-initialize the CIAO responder when the environment variable is set.

  2. Long-term: Add a hostname verification check in the Bonjour plugin startup that detects mismatches between the configured hostname and what the system resolves, and either auto-fix or warn the user before advertising.

  3. Robustness: Wrap the CIAO ANNOUNCEMENT_CANCELLED error in a try-catch and attempt graceful recovery instead of crashing the entire process.

extent analysis

TL;DR

Disable the Bonjour plugin or clear CIAO's internal hostname cache to prevent the gateway from crashing due to hostname mismatches.

Guidance

  • Verify that the OPENCLAW_MDNS_HOSTNAME environment variable is set correctly and matches the system hostname.
  • Check for stale entries in /etc/hosts that may cause CIAO to resolve the hostname to an old IP address.
  • Consider implementing a hostname verification check in the Bonjour plugin to detect mismatches and prevent advertising with incorrect hostnames.
  • Wrap the CIAO ANNOUNCEMENT_CANCELLED error in a try-catch to attempt graceful recovery instead of crashing the process.

Example

To disable the Bonjour plugin, update ~/.openclaw/openclaw.json with the following configuration:

{
  "plugins": {
    "entries": {
      "bonjour": { "enabled": false }
    }
  }
}

Notes

The suggested fix requires modifications to the Bonjour plugin or CIAO responder, which may not be feasible in all environments. Disabling the Bonjour plugin prevents mDNS-based gateway discovery on the local network.

Recommendation

Apply the workaround by disabling the Bonjour plugin until a more robust fix can be implemented, as it prevents the gateway from crashing and allows for continued operation.

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