LouisBrunner / LouisBrunner/avahi2dns
avahi2dns timeout
- Dominant language
- Go
- Stars
- 53
- Forks
- 7
- Avg merge
- 8d 5h
- Merged PRs (30d)
- 2
Description
I have a docker container, where I install only avahi2dns and avahi itself.
While there's a sleep during startup needed due to #7 both services start up.
However avahi2dns complains about timeout, which makes me think it failed to connect to the dbus service.
I wonder if the connection to the system bus is properly error handled. In my container, the socket is mounted and available under `/run/dbus/system_bus_socket` and avahi is happily using it (this is actually a volume mount so that multiple containers can make use of the same socket, including the host itself. For all other services, this is working fine.
```
avahi-1 | Registering new address record for 127.0.0.1 on lo.IPv4.
avahi-1 | Server startup complete. Host name is riley.local. Local service cookie is 2198944653.
avahi-1 | Service "riley" (/etc/avahi/services/time.service) successfully established.
avahi-1 | Service "riley" (/etc/avahi/services/ssh.service) successfully established.
avahi-1 | Service "riley" (/etc/avahi/services/sftp-ssh.service) successfully established.
avahi-1 | + exec avahi2dns --addr 0.0.0.0 --debug
avahi-1 | time="2024-07-17T14:40:37Z" level=debug msg="config parsed" func=main.parseArgs file="github.com/LouisBrunner/avahi2dns/config.go:32" config="&{[home internal intranet lan local p
rivate test] 0.0.0.0 53 true}"
avahi-1 | time="2024-07-17T14:40:37Z" level=debug msg="connection to dbus..." func=main.runServer file="github.com/LouisBrunner/avahi2dns/server.go:14"
avahi-1 | time="2024-07-17T14:40:37Z" level=debug msg="connection to avahi through dbus..." func=main.runServer file="github.com/LouisBrunner/avahi2dns/server.go:21"
avahi-1 | time="2024-07-17T14:40:37Z" level=debug msg="adding dns handler" func=main.runServer file="github.com/LouisBrunner/avahi2dns/server.go:37" domain=home
avahi-1 | time="2024-07-17T14:40:37Z" level=debug msg="adding dns handler" func=main.runServer file="github.com/LouisBrunner/avahi2dns/server.go:37" domain=internal
avahi-1 | time="2024-07-17T14:40:37Z" level=debug msg="adding dns handler" func=main.runServer file="github.com/LouisBrunner/avahi2dns/server.go:37" domain=intranet
avahi-1 | time="2024-07-17T14:40:37Z" level=debug msg="adding dns handler" func=main.runServer file="github.com/LouisBrunner/avahi2dns/server.go:37" domain=lan
avahi-1 | time="2024-07-17T14:40:37Z" level=debug msg="adding dns handler" func=main.runServer file="github.com/LouisBrunner/avahi2dns/server.go:37" domain=local
avahi-1 | time="2024-07-17T14:40:37Z" level=debug msg="adding dns handler" func=main.runServer file="github.com/LouisBrunner/avahi2dns/server.go:37" domain=private
avahi-1 | time="2024-07-17T14:40:37Z" level=debug msg="adding dns handler" func=main.runServer file="github.com/LouisBrunner/avahi2dns/server.go:37" domain=test
avahi-1 | time="2024-07-17T14:40:37Z" level=info msg="starting DNS server" func=main.runServer file="github.com/LouisBrunner/avahi2dns/server.go:46" addr="0.0.0.0:53"
avahi-1 | time="2024-07-17T14:40:56Z" level=debug msg="received request" func=main.runServer.func1 file="github.com/LouisBrunner/avahi2dns/server.go:30" component=main request=";; opcode: QUERY, status: NOERROR, id: 65327\n;; flags: rd ad; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1\n\n;; QUESTION SECTION:\n;riley.local.\tIN\t A\n\n;; ADDITIONAL SECTION:\n\n;; OPT PSEUDOSECTION:\n; EDNS: version 0; flags: ; udp: 1232\n; COOKIE: 273018f7c8ef6907\n"
avahi-1 | time="2024-07-17T14:40:56Z" level=info msg="forwarding query to avahi" func=main.avahiToRecord file="github.com/LouisBrunner/avahi2dns/query.go:52" component=main name=riley.local. protocol=0 type=A
avahi-1 | time="2024-07-17T14:41:01Z" level=error msg="avahi A lookup failed, skipping query..." func=main.createDNSReply file="github.com/LouisBrunner/avahi2dns/query.go:22" component=main error="avahi resolve failure: Timeout reached"
avahi-1 | time="2024-07-17T14:41:01Z" level=debug msg="sending reply" func=main.runServer.func1 file="github.com/LouisBrunner/avahi2dns/server.go:32" component=main reply=";; opcode: QUERY, status: NOERROR, id: 0\n;; flags:; QUERY: 0, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0\n"
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the reported Docker setup and start by reading server.go around the D-Bus connection and DNS server startup, then query.go around the Avahi lookup and timeout handling. Compare the logged connection sequence with the failed lookup and verify the completed behavior against the reported riley.local query.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100