GeezerVison is showing github.com — macOS: JmDNS advertiser cannot bind UDP 5353 (mDNSResponder); need native DNS-SD path · Issue #212 · hap-java/HAP-Java
macOS: JmDNS advertiser cannot bind UDP 5353 (mDNSResponder); need native DNS-SD path #212
Description
Problem
On macOS, Apple's mDNSResponder exclusively owns UDP 5353. HAP-Java's default advertising path creates a dedicated JmDNS instance that tries to bind that port, which fails with Address already in use / "no suitable mDNS". Controllers never see _hap._tcp even when the HAP TCP listener is up.
Verified locally:
lsof / bind attempts show 5353 is unavailable to the JVM
dns-sd -B _hap._tcp stays empty while using JmDNS-only advertising
Proposed direction
Add a pluggable HomekitAdvertiser and a native DNS-SD implementation that calls DNSServiceRegister via JNA (Bonjour IPC) so _hap._tcp is published without binding 5353. Keep existing JmDNS constructors for backward compatibility.
Context
Fork / WIP: https://github.com/kgoderis/HAP-Java/tree/feature/native-dnssd-advertiser
Docs draft: https://github.com/kgoderis/HAP-Java/blob/feature/native-dnssd-advertiser/docs/NATIVE_DNSSD.md
Activity
added 3 commits that reference this issue
on Oct 22, 2026This issue will close once commit 175f81a is merged into the 'master' branch.175f81a This issue will close once commit fb1842f is merged into the 'master' branch.fb1842f This issue will close once commit 9c032ca is merged into the 'master' branch.9c032ca
Metadata
Metadata
Development
No branches or pull requestsIssue actions