Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extremely frequent DNS queries from HomeBridge; some incorrectly formed #362

Open
ericfitz opened this issue Oct 6, 2022 · 3 comments
Open

Comments

@ericfitz
Copy link

ericfitz commented Oct 6, 2022

Yesterday I noticed that my key light integration wasn't working. I unplugged and re-plugged in the key light, and it started working again.

As part of troubleshooting I also looked at the HomeBridge logs, which indicated frequent DNS queries for the key light. I then looked at my DNS server (a Pi-Hole) and was surprised to find that almost all of my DNS query traffic was HomeBridge querying for my key light.

DNS query volume last 24 hours

Screen Shot 2022-10-06 at 1 17 13 PM

Screen Shot 2022-10-06 at 1 17 40 PM

It appears that HomeBridge (or the Keylight plugin for HomeBridge) is querying for A and AAAA records for the discovered key light, every second, and is ALSO appending the local domain name (.local) and querying both again, every second.

So the problem is query volume. Querying once per second for multiple records is kind of overkill.

The second problem is that it's also appending the domain name when it already has an FQDN, and making multiple queries per second with names that cannot possibly work.

@ericfitz
Copy link
Author

ericfitz commented Oct 6, 2022

I was able to suppress the DNS query volume by enabling the advanced configuration setting "Use IP address instead of hostname" in the Keylight plugin for HomeBridge. However this just works around the problem, it doesn't solve it, and I would prefer to use DNS names.

@derjayjay
Copy link
Owner

This is definitely not intentional - can you provide a bit more information where your Homebridge is running? What OS and device are you running Homebridge on and how is DNS resolution handled?

Nothing in the plugin itself should trigger regular DNS queries, especially not that many. For now, I cannot reproduce this behaviour on my side.

As a test, can you try accessing the web interface of your keylight using the local domain?

@ericfitz
Copy link
Author

ericfitz commented Oct 7, 2022

I run pi-hole as a DNS server, running on Raspbian Buster on Raspberry Pi 4B hardware.

pi@pi-hole:~ $ uname -a
Linux pi-hole.local 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l GNU/Linux

Homebridge is running on a Raspberry Pi 4B running the Homebridge image for Raspberry Pi:

pi@homebridge:~ $ uname -a
Linux homebridge 5.15.61-v7l+ #1579 SMP Fri Aug 26 11:13:03 BST 2022 armv7l GNU/Linux

The key light is resolvable via DNS from the Homebridge instance:

pi@homebridge:~ $ ping elgato-key-light-2e1c
PING elgato-key-light-2e1c.local (192.168.1.173) 56(84) bytes of data.
64 bytes from elgato-key-light-2e1c.local (192.168.1.173): icmp_seq=1 ttl=255 time=10.9 ms
^C
--- elgato-key-light-2e1c.local ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 2.775/5.503/10.865/3.791 ms

pi@homebridge:~ $ ping elgato-key-light-2e1c.local
PING elgato-key-light-2e1c.local (192.168.1.173) 56(84) bytes of data.
64 bytes from elgato-key-light-2e1c.local (192.168.1.173): icmp_seq=1 ttl=255 time=12.0 ms
^C
--- elgato-key-light-2e1c.local ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 11.209/11.580/11.951/0.371 ms

The key light web UX is directly resolvable via DNS:
Screen Shot 2022-10-07 at 6 45 39 PM

Let me know how I can help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants