-
Notifications
You must be signed in to change notification settings - Fork 3
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
failed to start mDNS server: no such host #34
Comments
Thanks for writing in — this is indeed a problem, I can reproduce by setting my computer's hostname to |
Serving `.local` aliases over mDNS requires broadcasting the IP address of the host machine, so that other devices on the network can connect to it. Previous to this PR, localias would do lookups by trying to lookup `{hostname}.local`. As reported in #34, and previously in #20 and #21, this had a variety of issues and did not work consistently. This PR attemtps to fix this problem once and for all by finding the host's IP by iterating through the network interfaces and looking for non-loopback IPV4 addresses. I tested that this fixes the problem reported in #34 by manually setting my hostname to `something.fritz.box`, seeing that `localias` would fail to determine the IP address, then running this code and seeing that it worked correctly. In addition to the IPV4 addresses that are found, this code also broadcasts `127.0.0.1` and `::1` so that DNS requests on macOS respond instantly. For some reason, if an IPV6 address is not included in the mDNS response, running `curl myhost.local` will always have a 5-6 second delay on macOS. I can't explain it but I have a workaround.
@Flusinerd can you try using a localias binary downloaded from this release page and seeing if your problem is fixed? https://github.com/peterldowns/localias/releases/tag/2.1.0%2Bcommit.fcaac03 |
Ok, I’m pretty sure the PR above fixes this issue (based on being able to repro myself) so I’m marking this as closed. If for some reason it turns out I didn’t fix your problem, I’ll re-open. |
Hi @peterldowns Thanks for the quick fix and awesome tool :) |
@Flusinerd no need to apologize, I’m glad to hear the problem is solved! Thanks and I hope you enjoy! |
Hello,
I have have issues when running on my home network.
I have a FRITZ!Box home router and therefore devices have the hostname:
<device_name>.fritz.box
This gets assigned by the routers DHCP.
When I start localias I get an error:
The problem probably is, that it adds a .local suffix to the routers provided hostname and therefore cannot resolve it.
Output of
debug config --print
Sincerely Jan
The text was updated successfully, but these errors were encountered: