Homebridge listens on tcp6 only
See original GitHub issueHi,
I have two HomeBridge instances running. The problematic one is on Debian:
root@supermicro:/etc# netstat -an | grep 51828 | grep LISTEN
tcp6 0 0 :::51828 :::* LISTEN
It listens on IPv6 only, but is advertised with IPv4 and IPv6:
root@supermicro:/etc# avahi-browse --verbose _hap._tcp | grep Supermicro
Server version: avahi 0.6.31; Host name: Supermicro.local
E Ifce Prot Name Type Domain
+ eth1 IPv6 Homebridge Supermicro _hap._tcp local
+ eth1 IPv4 Homebridge Supermicro _hap._tcp local
+ eth0 IPv6 Homebridge Supermicro _hap._tcp local
+ eth0 IPv4 Homebridge Supermicro _hap._tcp local
Another instance on a Mac works fine:
➜ ~ netstat -an | grep 51826
tcp46 0 0 *.51826 *.* LISTEN
This one listens on both, IPv4 and IPv6 and is advertised as such.
How can I force hombridge to use both, IPv4 and IPv6 or advertise IPv6 only?
Issue Analytics
- State:
- Created 6 years ago
- Comments:8
Top Results From Across the Web
Homebridge listens on tcp6 only · Issue #1277 - GitHub
Hi, I have two HomeBridge instances running. The problematic one is on Debian: root@supermicro:/etc# netstat -an | grep 51828 | grep LISTEN ......
Read more >Things I did (that eventually worked!) to make my RPi3 ...
Assign static IPs to everything, at least HomeKit Hub (e.g. ATV) and RPi. Disable IPV6 on RPi, see https://github.com/nfarina/homebridge/issues/ ...
Read more >Cannot access web admin after homebridge update - Help
Running pihole on a homebridge raspbian image. Earlier in the day updated homebridge to v1.1.7. Not sure if this affected anything, but nothing...
Read more >Repository: Homebridge add-on - Home Assistant Community
I just released an add-on for Homebridge. The installation procedure is explained in the README. If you're familiar with both Hass.io ...
Read more >MDNSServerOptions | @homebridge/ciao - v1.1.5
Documentation for @homebridge/ciao - v1.1.5. ... If specified, the mdns server will only listen on the specified interfaces (allowlist).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This the result of the way nodejs creates the server socket, see here: (homebridge / hap-nodejs creates the server socket without specifying a hostname)
https://github.com/nodejs/node/issues/9390 and here https://github.com/nodejs/node/commit/12cf3594235e6c4c6838ae7588b5e73ad9775dfa
It looks like the behaviour of nodejs on Ubuntu/Debian has changed, it opens only a tcp6 socket.
It is easy to test it, if you start a simple server:
The solution is to modify hap-nodejs to create a tcp4 server socket or both.
A quick fix is to modify eventedhttp.js in /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util, in line 60:
It just worked for me as well - thanks!
Any plans to include this into homebridge in some way?