Skip to content

Bonjour mDNS watchdog crashes gateway on WSL2 (SIGKILL after ~7-9s) #69693

@spikefcz

Description

@spikefcz

Environment

  • OpenClaw version: 2026.4.14 and 2026.4.15 (both affected)
  • Host OS: Windows 11 (10.0.26200)
  • WSL2: Ubuntu, mirrored networking (networkingMode=mirrored equivalent)
  • Node.js: 22.22.0
  • Install method: npm install -g openclaw

Problem

Gateway starts successfully, loads all plugins, hooks, and reaches ready state — then gets killed by SIGKILL approximately 7-9 seconds later. The last log line before death is always:

[bonjour] watchdog detected non-announced service; attempting re-advertise 
(gateway fqdn=NucBoxK6 (OpenClaw)._openclaw-gw._tcp.local. host=openclaw.local. port=18789 state=probing)

The gateway enters a crash-loop with Restart=always — observed 1030+ restarts in a single session.

Root Cause

WSL2 does not support multicast/mDNS properly. The bonjour service cannot announce via mDNS, the watchdog detects the failure, and the process is terminated.

Reproduction

  1. Install OpenClaw 2026.4.14+ on WSL2
  2. Run openclaw gateway --port 18789
  3. Gateway starts, reaches "ready", loads hooks
  4. ~7-9 seconds after hooks load: [bonjour] watchdog detected non-announced service
  5. Process receives SIGKILL, exit code -9

Key observation: OpenClaw 2026.4.1 does NOT have bonjour and runs stably on the same WSL2 instance.

Attempted Workarounds (none worked)

  • discovery.wideArea.enabled: false in config — bonjour still starts
  • Environment variables: OPENCLAW_BONJOUR=off, OPENCLAW_DISABLE_BONJOUR=1 — no effect
  • gateway.bonjour.enabled: false — rejected as unrecognized key
  • No memory pressure (25 GB free), no OOM, no cgroup limits, no watchdog timer

Expected Behavior

Either:

  1. A config key to disable bonjour entirely (e.g., gateway.bonjour.enabled: false)
  2. Bonjour failures should be non-fatal — log a warning but don't kill the gateway
  3. Auto-detect WSL2 and skip bonjour

Workaround

Rolled back to OpenClaw 2026.4.1 which does not include bonjour.

Logs

# Successful startup:
[gateway] ready (8 plugins: acpx, browser, device-pair, llm-task, lobster, phone-control, talk-voice, telegram; 8.2s)
[gateway] starting channels and sidecars...
[hooks] loaded 4 internal hook handlers

# ~7 seconds later:
[bonjour] watchdog detected non-announced service; attempting re-advertise (gateway fqdn=NucBoxK6 (OpenClaw)._openclaw-gw._tcp.local. host=openclaw.local. port=18789 state=probing)

# Immediate death:
systemd: openclaw-gateway.service: Main process exited, code=killed, status=9/KILL

When run via foreground python subprocess with SIGTERM trapping:

[bonjour] watchdog detected non-announced service; attempting re-advertise
[gateway] signal SIGTERM received
[gateway] received SIGTERM; shutting down

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions