[GH-ISSUE #201] host.docker can't be resolved #82

Closed
opened 2026-02-26 04:33:59 +03:00 by kerem · 7 comments
Owner

Originally created by @c93614 on GitHub (Jun 15, 2020).
Original GitHub issue: https://github.com/mageddo/dns-proxy-server/issues/201

What is Happening

dps can't resolve host.docker and error occurs.

Steps to Reproduce

docker run --rm  --hostname dns.mageddo --name dns-proxy-server -p 5380:5380 \
-v /opt/dns-proxy-server/conf:/app/conf \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /etc/resolv.conf:/etc/resolv.conf \
defreitas/dns-proxy-server

host.docker can't be resolved both in host or in another container.

Specs:

  • OS: CentOS 8.1.1911 AND 7.6.1810
  • dps.log
Originally created by @c93614 on GitHub (Jun 15, 2020). Original GitHub issue: https://github.com/mageddo/dns-proxy-server/issues/201 ### What is Happening dps can't resolve `host.docker` and error occurs. ### Steps to Reproduce ~~~ docker run --rm --hostname dns.mageddo --name dns-proxy-server -p 5380:5380 \ -v /opt/dns-proxy-server/conf:/app/conf \ -v /var/run/docker.sock:/var/run/docker.sock \ -v /etc/resolv.conf:/etc/resolv.conf \ defreitas/dns-proxy-server ~~~ `host.docker` can't be resolved both in host or in another container. **Specs:** - OS: CentOS 8.1.1911 AND 7.6.1810 - [dps.log](https://github.com/mageddo/dns-proxy-server/files/4781850/dps.log)
kerem 2026-02-26 04:33:59 +03:00
  • closed this issue
  • added the
    bug
    triage
    labels
Author
Owner

@mageddo commented on GitHub (Jul 9, 2020):

It's crashing right here, then it means the resolved gateway IP is not a valid one, try to enable debug logs and find for
status=FindDpsNetworkGatewayIp, ip= or status=FindDockerNetworkNetworkGatewayIp, ip at the logs.

I will download centos and try to simulate the issue, maybe it's related to centos, or maybe just related with your specific installation.

<!-- gh-comment-id:656398825 --> @mageddo commented on GitHub (Jul 9, 2020): It's crashing [right here][1], then it means the resolved gateway IP is not a valid one, try to enable debug logs and find for `status=FindDpsNetworkGatewayIp, ip=` or `status=FindDockerNetworkNetworkGatewayIp, ip` at the logs. I will download centos and try to simulate the issue, maybe it's related to centos, or maybe just related with your specific installation. [1]: https://github.com/mageddo/dns-proxy-server/blob/875057b4bd58ba80e2f3fa39ae455320a9b2a7ec/proxy/system.go#L38
Author
Owner

@mageddo commented on GitHub (Jul 9, 2020):

You can change the log level by changing it's config

<!-- gh-comment-id:656399895 --> @mageddo commented on GitHub (Jul 9, 2020): You can change the log level by [changing it's config](http://mageddo.github.io/dns-proxy-server/latest/en/3-configuration/)
Author
Owner

@Sajito commented on GitHub (Aug 18, 2020):

Hello @mageddo, I'm having the same issue. Not sure what I should look for, but here's the log output with log level set to "DEBUG".

dns_1 | 2020/08/18 07:41:48.600003 DEBUG f=dns.go:50 pkg=main m=handleQuestion uuid=0b567bad22 status=begin, reqId=20215, questions=1, question=host.docker., type=TypeAAAA
dns_1 | 2020/08/18 07:41:48.600023 DEBUG f=dns.go:50 pkg=main m=handleQuestion uuid=c295ea0814 status=begin, reqId=19915, questions=1, question=host.docker., type=TypeA
dns_1 | 2020/08/18 07:41:48.600030 DEBUG f=local.go:29 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=loading, path=/app/conf/config.json
dns_1 | 2020/08/18 07:41:48.600035 DEBUG f=local.go:29 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=loading, path=/app/conf/config.json
dns_1 | 2020/08/18 07:41:48.600186 DEBUG f=dockernetwork.go:74 pkg=github.com/mageddo/dns-proxy-server/docker/dockernetwork m=FindNetworkGatewayIp status=begin, network=dps
dns_1 | 2020/08/18 07:41:48.600186 DEBUG f=dockernetwork.go:74 pkg=github.com/mageddo/dns-proxy-server/docker/dockernetwork m=FindNetworkGatewayIp status=begin, network=dps
dns_1 | 2020/08/18 07:41:48.601515 DEBUG f=dockernetwork.go:63 pkg=github.com/mageddo/dns-proxy-server/docker/dockernetwork m=GetGatewayIp status=FindDpsNetworkGatewayIp, ip=
dns_1 | 2020/08/18 07:41:48.601655 ERROR f=panic.go:523 pkg=runtime m=gopanic uuid=0b567bad22 status=fatal-error-handling-question, req=[{Name:host.docker. Qtype:28 Qclass:1}], err=runtime error: index out of range, stack=goroutine 48 [running]:
dns_1 | runtime/debug.Stack(0xc000129870, 0x7f3260, 0xbbd940)
dns_1 | /usr/local/go/src/runtime/debug/stack.go:24 +0x9d
dns_1 | main.handleQuestion.func1(0x8fede0, 0xc00049c210, 0xc00049a090)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/dns.go:32 +0x5a
dns_1 | panic(0x7f3260, 0xbbd940)
dns_1 | /usr/local/go/src/runtime/panic.go:522 +0x1b5
dns_1 | github.com/mageddo/dns-proxy-server/proxy.SystemDnsSolver.getMsg(0xc00048c2d4, 0xb, 0x0, 0x0, 0xc00048c2d4, 0xc, 0xc00001001c, 0xc0003ba000)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/proxy/system.go:38 +0x387
dns_1 | github.com/mageddo/dns-proxy-server/proxy.SystemDnsSolver.Solve(0x8fede0, 0xc00049c210, 0xc00048c2d4, 0xc, 0x1001c, 0xc00044dfa0, 0x20, 0x811aa0)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/proxy/system.go:22 +0x16e
dns_1 | github.com/mageddo/dns-proxy-server/proxy.(*DefaultDnsSolverFactory).Solve(0xbe7398, 0x8fede0, 0xc00049c210, 0xc00048c2d4, 0xc, 0xc00001001c, 0xc0000d2b80, 0x4, 0x4, 0x1, ...)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/proxy/factory.go:19 +0xd8
dns_1 | github.com/mageddo/dns-proxy-server/proxy.(*CnameDnsSolverFactory).Solve(0xc000129db0, 0x8fede0, 0xc00049c210, 0xc00048c2d4, 0xc, 0x1001c, 0xc0000d2b80, 0x4, 0x4, 0x715c85, ...)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/proxy/factory.go:48 +0xbd
dns_1 | main.handleQuestion(0x902a60, 0xc000386880, 0xc00049a090)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/dns.go:51 +0x48e
dns_1 | github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.HandlerFunc.ServeDNS(0x88a448, 0x902a60, 0xc000386880, 0xc00049a090)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:84 +0x44
dns_1 | github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.(*ServeMux).ServeDNS(0xc0002d1e30, 0x902a60, 0xc000386880, 0xc00049a090)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:210 +0x63
dns_1 | github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.(*Server).serve(0xc000356000, 0x8fad00, 0xc00049c1e0, 0x8f6c40, 0xc0002d1e30, 0xc0003f0e00, 0x1d, 0x200, 0xc000010520, 0xc00044ddc0, ...)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:579 +0x2a4
dns_1 | created by github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.(*Server).serveUDP
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:533 +0x29e
dns_1 | 2020/08/18 07:41:48.601528 DEBUG f=dockernetwork.go:63 pkg=github.com/mageddo/dns-proxy-server/docker/dockernetwork m=GetGatewayIp status=FindDpsNetworkGatewayIp, ip=
dns_1 | 2020/08/18 07:41:48.601739 ERROR f=panic.go:523 pkg=runtime m=gopanic uuid=c295ea0814 status=fatal-error-handling-question, req=[{Name:host.docker. Qtype:1 Qclass:1}], err=runtime error: index out of range, stack=goroutine 47 [running]:
dns_1 | runtime/debug.Stack(0xc0004df870, 0x7f3260, 0xbbd940)
dns_1 | /usr/local/go/src/runtime/debug/stack.go:24 +0x9d
dns_1 | main.handleQuestion.func1(0x8fede0, 0xc000089c80, 0xc0000b4bd0)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/dns.go:32 +0x5a
dns_1 | panic(0x7f3260, 0xbbd940)
dns_1 | /usr/local/go/src/runtime/panic.go:522 +0x1b5
dns_1 | github.com/mageddo/dns-proxy-server/proxy.SystemDnsSolver.getMsg(0xc00009b2d0, 0xb, 0x0, 0x0, 0xc00009b2d0, 0xc, 0xc000010001, 0xc0003ba000)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/proxy/system.go:38 +0x387
dns_1 | github.com/mageddo/dns-proxy-server/proxy.SystemDnsSolver.Solve(0x8fede0, 0xc000089c80, 0xc00009b2d0, 0xc, 0x10001, 0xa0, 0x1b, 0xbfc6ff6f23c3a082)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/proxy/system.go:22 +0x16e
dns_1 | github.com/mageddo/dns-proxy-server/proxy.(*DefaultDnsSolverFactory).Solve(0xbe7398, 0x8fede0, 0xc000089c80, 0xc00009b2d0, 0xc, 0xc000010001, 0xc0000d2b80, 0x4, 0x4, 0xc0003ae6c0, ...)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/proxy/factory.go:19 +0xd8
dns_1 | github.com/mageddo/dns-proxy-server/proxy.(*CnameDnsSolverFactory).Solve(0xc0004dfdb0, 0x8fede0, 0xc000089c80, 0xc00009b2d0, 0xc, 0x10001, 0xc0000d2b80, 0x4, 0x4, 0x715c85, ...)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/proxy/factory.go:48 +0xbd
dns_1 | main.handleQuestion(0x902a60, 0xc0003bc900, 0xc0000b4bd0)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/dns.go:51 +0x48e
dns_1 | github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.HandlerFunc.ServeDNS(0x88a448, 0x902a60, 0xc0003bc900, 0xc0000b4bd0)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:84 +0x44
dns_1 | github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.(*ServeMux).ServeDNS(0xc0002d1e30, 0x902a60, 0xc0003bc900, 0xc0000b4bd0)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:210 +0x63
dns_1 | github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.(*Server).serve(0xc000356000, 0x8fad00, 0xc00049c1b0, 0x8f6c40, 0xc0002d1e30, 0xc00038cc00, 0x1d, 0x200, 0xc000010520, 0xc00044dda0, ...)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:579 +0x2a4
dns_1 | created by github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.(*Server).serveUDP
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:533 +0x29e
dns_1 | 2020/08/18 07:41:51.102801 DEBUG f=dns.go:50 pkg=main m=handleQuestion uuid=0c536ab9a2 status=begin, reqId=20215, questions=1, question=host.docker., type=TypeAAAA
dns_1 | 2020/08/18 07:41:51.102823 DEBUG f=dns.go:50 pkg=main m=handleQuestion uuid=0ed9fec95c status=begin, reqId=19915, questions=1, question=host.docker., type=TypeA
dns_1 | 2020/08/18 07:41:51.102837 DEBUG f=local.go:29 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=loading, path=/app/conf/config.json
dns_1 | 2020/08/18 07:41:51.102823 DEBUG f=local.go:29 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=loading, path=/app/conf/config.json
dns_1 | 2020/08/18 07:41:51.103415 DEBUG f=dockernetwork.go:74 pkg=github.com/mageddo/dns-proxy-server/docker/dockernetwork m=FindNetworkGatewayIp status=begin, network=dps
dns_1 | 2020/08/18 07:41:51.103732 DEBUG f=dockernetwork.go:74 pkg=github.com/mageddo/dns-proxy-server/docker/dockernetwork m=FindNetworkGatewayIp status=begin, network=dps
dns_1 | 2020/08/18 07:41:51.105339 DEBUG f=dockernetwork.go:63 pkg=github.com/mageddo/dns-proxy-server/docker/dockernetwork m=GetGatewayIp status=FindDpsNetworkGatewayIp, ip=
dns_1 | 2020/08/18 07:41:51.105580 ERROR f=panic.go:523 pkg=runtime m=gopanic uuid=0c536ab9a2 status=fatal-error-handling-question, req=[{Name:host.docker. Qtype:28 Qclass:1}], err=runtime error: index out of range, stack=goroutine 59 [running]:
dns_1 | runtime/debug.Stack(0xc0004db870, 0x7f3260, 0xbbd940)
dns_1 | /usr/local/go/src/runtime/debug/stack.go:24 +0x9d
dns_1 | main.handleQuestion.func1(0x8fede0, 0xc00048e510, 0xc0003c9290)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/dns.go:32 +0x5a
dns_1 | panic(0x7f3260, 0xbbd940)
dns_1 | /usr/local/go/src/runtime/panic.go:522 +0x1b5
dns_1 | github.com/mageddo/dns-proxy-server/proxy.SystemDnsSolver.getMsg(0xc0003d7a34, 0xb, 0x0, 0x0, 0xc0003d7a34, 0xc, 0xc00001001c, 0xc0004e6000)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/proxy/system.go:38 +0x387
dns_1 | github.com/mageddo/dns-proxy-server/proxy.SystemDnsSolver.Solve(0x8fede0, 0xc00048e510, 0xc0003d7a34, 0xc, 0x1001c, 0xa3, 0x1b, 0xbfc6ff6fc620a19a)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/proxy/system.go:22 +0x16e
dns_1 | github.com/mageddo/dns-proxy-server/proxy.(*DefaultDnsSolverFactory).Solve(0xbe7398, 0x8fede0, 0xc00048e510, 0xc0003d7a34, 0xc, 0xc00001001c, 0xc0000d2b80, 0x4, 0x4, 0xc00022c840, ...)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/proxy/factory.go:19 +0xd8
dns_1 | github.com/mageddo/dns-proxy-server/proxy.(*CnameDnsSolverFactory).Solve(0xc0004dbdb0, 0x8fede0, 0xc00048e510, 0xc0003d7a34, 0xc, 0x1001c, 0xc0000d2b80, 0x4, 0x4, 0x715c85, ...)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/proxy/factory.go:48 +0xbd
dns_1 | main.handleQuestion(0x902a60, 0xc000374680, 0xc0003c9290)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/dns.go:51 +0x48e
dns_1 | github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.HandlerFunc.ServeDNS(0x88a448, 0x902a60, 0xc000374680, 0xc0003c9290)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:84 +0x44
dns_1 | github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.(*ServeMux).ServeDNS(0xc0002d1e30, 0x902a60, 0xc000374680, 0xc0003c9290)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:210 +0x63
dns_1 | github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.(*Server).serve(0xc000356000, 0x8fad00, 0xc00048e4e0, 0x8f6c40, 0xc0002d1e30, 0xc0004ea200, 0x1d, 0x200, 0xc000010520, 0xc0004ac660, ...)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:579 +0x2a4
dns_1 | created by github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.(*Server).serveUDP
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:533 +0x29e
dns_1 | 2020/08/18 07:41:51.105360 DEBUG f=dockernetwork.go:63 pkg=github.com/mageddo/dns-proxy-server/docker/dockernetwork m=GetGatewayIp status=FindDpsNetworkGatewayIp, ip=
dns_1 | 2020/08/18 07:41:51.105656 ERROR f=panic.go:523 pkg=runtime m=gopanic uuid=0ed9fec95c status=fatal-error-handling-question, req=[{Name:host.docker. Qtype:1 Qclass:1}], err=runtime error: index out of range, stack=goroutine 58 [running]:
dns_1 | runtime/debug.Stack(0xc0000fb870, 0x7f3260, 0xbbd940)
dns_1 | /usr/local/go/src/runtime/debug/stack.go:24 +0x9d
dns_1 | main.handleQuestion.func1(0x8fede0, 0xc0004d0120, 0xc0000b4cf0)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/dns.go:32 +0x5a
dns_1 | panic(0x7f3260, 0xbbd940)
dns_1 | /usr/local/go/src/runtime/panic.go:522 +0x1b5
dns_1 | github.com/mageddo/dns-proxy-server/proxy.SystemDnsSolver.getMsg(0xc00009b650, 0xb, 0x0, 0x0, 0xc00009b650, 0xc, 0xc000010001, 0xc0004e6000)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/proxy/system.go:38 +0x387
dns_1 | github.com/mageddo/dns-proxy-server/proxy.SystemDnsSolver.Solve(0x8fede0, 0xc0004d0120, 0xc00009b650, 0xc, 0x10001, 0xa0, 0x1b, 0xbfc6ff6fc620f5fb)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/proxy/system.go:22 +0x16e
dns_1 | github.com/mageddo/dns-proxy-server/proxy.(*DefaultDnsSolverFactory).Solve(0xbe7398, 0x8fede0, 0xc0004d0120, 0xc00009b650, 0xc, 0xc000010001, 0xc0000d2b80, 0x4, 0x4, 0xc0003aea80, ...)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/proxy/factory.go:19 +0xd8
dns_1 | github.com/mageddo/dns-proxy-server/proxy.(*CnameDnsSolverFactory).Solve(0xc0000fbdb0, 0x8fede0, 0xc0004d0120, 0xc00009b650, 0xc, 0x10001, 0xc0000d2b80, 0x4, 0x4, 0x715c85, ...)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/proxy/factory.go:48 +0xbd
dns_1 | main.handleQuestion(0x902a60, 0xc0003bca00, 0xc0000b4cf0)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/dns.go:51 +0x48e
dns_1 | github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.HandlerFunc.ServeDNS(0x88a448, 0x902a60, 0xc0003bca00, 0xc0000b4cf0)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:84 +0x44
dns_1 | github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.(*ServeMux).ServeDNS(0xc0002d1e30, 0x902a60, 0xc0003bca00, 0xc0000b4cf0)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:210 +0x63
dns_1 | github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.(*Server).serve(0xc000356000, 0x8fad00, 0xc00048e4b0, 0x8f6c40, 0xc0002d1e30, 0xc0004ea000, 0x1d, 0x200, 0xc000010520, 0xc0004ac640, ...)
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:579 +0x2a4
dns_1 | created by github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.(*Server).serveUDP
dns_1 | /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:533 +0x29e

As OS I'm using Ubuntu 20.04.
Docker version: 19.03.8.

Not sure what additional information you might need.

<!-- gh-comment-id:675315460 --> @Sajito commented on GitHub (Aug 18, 2020): Hello @mageddo, I'm having the same issue. Not sure what I should look for, but here's the log output with log level set to "DEBUG". > dns_1 | 2020/08/18 07:41:48.600003 DEBUG f=dns.go:50 pkg=main m=handleQuestion uuid=0b567bad22 status=begin, reqId=20215, questions=1, question=host.docker., type=TypeAAAA dns_1 | 2020/08/18 07:41:48.600023 DEBUG f=dns.go:50 pkg=main m=handleQuestion uuid=c295ea0814 status=begin, reqId=19915, questions=1, question=host.docker., type=TypeA dns_1 | 2020/08/18 07:41:48.600030 DEBUG f=local.go:29 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=loading, path=/app/conf/config.json dns_1 | 2020/08/18 07:41:48.600035 DEBUG f=local.go:29 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=loading, path=/app/conf/config.json dns_1 | 2020/08/18 07:41:48.600186 DEBUG f=dockernetwork.go:74 pkg=github.com/mageddo/dns-proxy-server/docker/dockernetwork m=FindNetworkGatewayIp status=begin, network=dps dns_1 | 2020/08/18 07:41:48.600186 DEBUG f=dockernetwork.go:74 pkg=github.com/mageddo/dns-proxy-server/docker/dockernetwork m=FindNetworkGatewayIp status=begin, network=dps dns_1 | 2020/08/18 07:41:48.601515 DEBUG f=dockernetwork.go:63 pkg=github.com/mageddo/dns-proxy-server/docker/dockernetwork m=GetGatewayIp status=FindDpsNetworkGatewayIp, ip= dns_1 | 2020/08/18 07:41:48.601655 ERROR f=panic.go:523 pkg=runtime m=gopanic uuid=0b567bad22 status=fatal-error-handling-question, req=[{Name:host.docker. Qtype:28 Qclass:1}], err=runtime error: index out of range, stack=goroutine 48 [running]: dns_1 | runtime/debug.Stack(0xc000129870, 0x7f3260, 0xbbd940) dns_1 | /usr/local/go/src/runtime/debug/stack.go:24 +0x9d dns_1 | main.handleQuestion.func1(0x8fede0, 0xc00049c210, 0xc00049a090) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/dns.go:32 +0x5a dns_1 | panic(0x7f3260, 0xbbd940) dns_1 | /usr/local/go/src/runtime/panic.go:522 +0x1b5 dns_1 | github.com/mageddo/dns-proxy-server/proxy.SystemDnsSolver.getMsg(0xc00048c2d4, 0xb, 0x0, 0x0, 0xc00048c2d4, 0xc, 0xc00001001c, 0xc0003ba000) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/proxy/system.go:38 +0x387 dns_1 | github.com/mageddo/dns-proxy-server/proxy.SystemDnsSolver.Solve(0x8fede0, 0xc00049c210, 0xc00048c2d4, 0xc, 0x1001c, 0xc00044dfa0, 0x20, 0x811aa0) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/proxy/system.go:22 +0x16e dns_1 | github.com/mageddo/dns-proxy-server/proxy.(*DefaultDnsSolverFactory).Solve(0xbe7398, 0x8fede0, 0xc00049c210, 0xc00048c2d4, 0xc, 0xc00001001c, 0xc0000d2b80, 0x4, 0x4, 0x1, ...) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/proxy/factory.go:19 +0xd8 dns_1 | github.com/mageddo/dns-proxy-server/proxy.(*CnameDnsSolverFactory).Solve(0xc000129db0, 0x8fede0, 0xc00049c210, 0xc00048c2d4, 0xc, 0x1001c, 0xc0000d2b80, 0x4, 0x4, 0x715c85, ...) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/proxy/factory.go:48 +0xbd dns_1 | main.handleQuestion(0x902a60, 0xc000386880, 0xc00049a090) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/dns.go:51 +0x48e dns_1 | github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.HandlerFunc.ServeDNS(0x88a448, 0x902a60, 0xc000386880, 0xc00049a090) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:84 +0x44 dns_1 | github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.(*ServeMux).ServeDNS(0xc0002d1e30, 0x902a60, 0xc000386880, 0xc00049a090) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:210 +0x63 dns_1 | github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.(*Server).serve(0xc000356000, 0x8fad00, 0xc00049c1e0, 0x8f6c40, 0xc0002d1e30, 0xc0003f0e00, 0x1d, 0x200, 0xc000010520, 0xc00044ddc0, ...) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:579 +0x2a4 dns_1 | created by github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.(*Server).serveUDP dns_1 | /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:533 +0x29e dns_1 | 2020/08/18 07:41:48.601528 DEBUG f=dockernetwork.go:63 pkg=github.com/mageddo/dns-proxy-server/docker/dockernetwork m=GetGatewayIp status=FindDpsNetworkGatewayIp, ip= dns_1 | 2020/08/18 07:41:48.601739 ERROR f=panic.go:523 pkg=runtime m=gopanic uuid=c295ea0814 status=fatal-error-handling-question, req=[{Name:host.docker. Qtype:1 Qclass:1}], err=runtime error: index out of range, stack=goroutine 47 [running]: dns_1 | runtime/debug.Stack(0xc0004df870, 0x7f3260, 0xbbd940) dns_1 | /usr/local/go/src/runtime/debug/stack.go:24 +0x9d dns_1 | main.handleQuestion.func1(0x8fede0, 0xc000089c80, 0xc0000b4bd0) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/dns.go:32 +0x5a dns_1 | panic(0x7f3260, 0xbbd940) dns_1 | /usr/local/go/src/runtime/panic.go:522 +0x1b5 dns_1 | github.com/mageddo/dns-proxy-server/proxy.SystemDnsSolver.getMsg(0xc00009b2d0, 0xb, 0x0, 0x0, 0xc00009b2d0, 0xc, 0xc000010001, 0xc0003ba000) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/proxy/system.go:38 +0x387 dns_1 | github.com/mageddo/dns-proxy-server/proxy.SystemDnsSolver.Solve(0x8fede0, 0xc000089c80, 0xc00009b2d0, 0xc, 0x10001, 0xa0, 0x1b, 0xbfc6ff6f23c3a082) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/proxy/system.go:22 +0x16e dns_1 | github.com/mageddo/dns-proxy-server/proxy.(*DefaultDnsSolverFactory).Solve(0xbe7398, 0x8fede0, 0xc000089c80, 0xc00009b2d0, 0xc, 0xc000010001, 0xc0000d2b80, 0x4, 0x4, 0xc0003ae6c0, ...) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/proxy/factory.go:19 +0xd8 dns_1 | github.com/mageddo/dns-proxy-server/proxy.(*CnameDnsSolverFactory).Solve(0xc0004dfdb0, 0x8fede0, 0xc000089c80, 0xc00009b2d0, 0xc, 0x10001, 0xc0000d2b80, 0x4, 0x4, 0x715c85, ...) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/proxy/factory.go:48 +0xbd dns_1 | main.handleQuestion(0x902a60, 0xc0003bc900, 0xc0000b4bd0) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/dns.go:51 +0x48e dns_1 | github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.HandlerFunc.ServeDNS(0x88a448, 0x902a60, 0xc0003bc900, 0xc0000b4bd0) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:84 +0x44 dns_1 | github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.(*ServeMux).ServeDNS(0xc0002d1e30, 0x902a60, 0xc0003bc900, 0xc0000b4bd0) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:210 +0x63 dns_1 | github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.(*Server).serve(0xc000356000, 0x8fad00, 0xc00049c1b0, 0x8f6c40, 0xc0002d1e30, 0xc00038cc00, 0x1d, 0x200, 0xc000010520, 0xc00044dda0, ...) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:579 +0x2a4 dns_1 | created by github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.(*Server).serveUDP dns_1 | /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:533 +0x29e dns_1 | 2020/08/18 07:41:51.102801 DEBUG f=dns.go:50 pkg=main m=handleQuestion uuid=0c536ab9a2 status=begin, reqId=20215, questions=1, question=host.docker., type=TypeAAAA dns_1 | 2020/08/18 07:41:51.102823 DEBUG f=dns.go:50 pkg=main m=handleQuestion uuid=0ed9fec95c status=begin, reqId=19915, questions=1, question=host.docker., type=TypeA dns_1 | 2020/08/18 07:41:51.102837 DEBUG f=local.go:29 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=loading, path=/app/conf/config.json dns_1 | 2020/08/18 07:41:51.102823 DEBUG f=local.go:29 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=loading, path=/app/conf/config.json dns_1 | 2020/08/18 07:41:51.103415 DEBUG f=dockernetwork.go:74 pkg=github.com/mageddo/dns-proxy-server/docker/dockernetwork m=FindNetworkGatewayIp status=begin, network=dps dns_1 | 2020/08/18 07:41:51.103732 DEBUG f=dockernetwork.go:74 pkg=github.com/mageddo/dns-proxy-server/docker/dockernetwork m=FindNetworkGatewayIp status=begin, network=dps dns_1 | 2020/08/18 07:41:51.105339 DEBUG f=dockernetwork.go:63 pkg=github.com/mageddo/dns-proxy-server/docker/dockernetwork m=GetGatewayIp status=FindDpsNetworkGatewayIp, ip= dns_1 | 2020/08/18 07:41:51.105580 ERROR f=panic.go:523 pkg=runtime m=gopanic uuid=0c536ab9a2 status=fatal-error-handling-question, req=[{Name:host.docker. Qtype:28 Qclass:1}], err=runtime error: index out of range, stack=goroutine 59 [running]: dns_1 | runtime/debug.Stack(0xc0004db870, 0x7f3260, 0xbbd940) dns_1 | /usr/local/go/src/runtime/debug/stack.go:24 +0x9d dns_1 | main.handleQuestion.func1(0x8fede0, 0xc00048e510, 0xc0003c9290) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/dns.go:32 +0x5a dns_1 | panic(0x7f3260, 0xbbd940) dns_1 | /usr/local/go/src/runtime/panic.go:522 +0x1b5 dns_1 | github.com/mageddo/dns-proxy-server/proxy.SystemDnsSolver.getMsg(0xc0003d7a34, 0xb, 0x0, 0x0, 0xc0003d7a34, 0xc, 0xc00001001c, 0xc0004e6000) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/proxy/system.go:38 +0x387 dns_1 | github.com/mageddo/dns-proxy-server/proxy.SystemDnsSolver.Solve(0x8fede0, 0xc00048e510, 0xc0003d7a34, 0xc, 0x1001c, 0xa3, 0x1b, 0xbfc6ff6fc620a19a) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/proxy/system.go:22 +0x16e dns_1 | github.com/mageddo/dns-proxy-server/proxy.(*DefaultDnsSolverFactory).Solve(0xbe7398, 0x8fede0, 0xc00048e510, 0xc0003d7a34, 0xc, 0xc00001001c, 0xc0000d2b80, 0x4, 0x4, 0xc00022c840, ...) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/proxy/factory.go:19 +0xd8 dns_1 | github.com/mageddo/dns-proxy-server/proxy.(*CnameDnsSolverFactory).Solve(0xc0004dbdb0, 0x8fede0, 0xc00048e510, 0xc0003d7a34, 0xc, 0x1001c, 0xc0000d2b80, 0x4, 0x4, 0x715c85, ...) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/proxy/factory.go:48 +0xbd dns_1 | main.handleQuestion(0x902a60, 0xc000374680, 0xc0003c9290) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/dns.go:51 +0x48e dns_1 | github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.HandlerFunc.ServeDNS(0x88a448, 0x902a60, 0xc000374680, 0xc0003c9290) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:84 +0x44 dns_1 | github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.(*ServeMux).ServeDNS(0xc0002d1e30, 0x902a60, 0xc000374680, 0xc0003c9290) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:210 +0x63 dns_1 | github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.(*Server).serve(0xc000356000, 0x8fad00, 0xc00048e4e0, 0x8f6c40, 0xc0002d1e30, 0xc0004ea200, 0x1d, 0x200, 0xc000010520, 0xc0004ac660, ...) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:579 +0x2a4 dns_1 | created by github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.(*Server).serveUDP dns_1 | /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:533 +0x29e dns_1 | 2020/08/18 07:41:51.105360 DEBUG f=dockernetwork.go:63 pkg=github.com/mageddo/dns-proxy-server/docker/dockernetwork m=GetGatewayIp status=FindDpsNetworkGatewayIp, ip= dns_1 | 2020/08/18 07:41:51.105656 ERROR f=panic.go:523 pkg=runtime m=gopanic uuid=0ed9fec95c status=fatal-error-handling-question, req=[{Name:host.docker. Qtype:1 Qclass:1}], err=runtime error: index out of range, stack=goroutine 58 [running]: dns_1 | runtime/debug.Stack(0xc0000fb870, 0x7f3260, 0xbbd940) dns_1 | /usr/local/go/src/runtime/debug/stack.go:24 +0x9d dns_1 | main.handleQuestion.func1(0x8fede0, 0xc0004d0120, 0xc0000b4cf0) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/dns.go:32 +0x5a dns_1 | panic(0x7f3260, 0xbbd940) dns_1 | /usr/local/go/src/runtime/panic.go:522 +0x1b5 dns_1 | github.com/mageddo/dns-proxy-server/proxy.SystemDnsSolver.getMsg(0xc00009b650, 0xb, 0x0, 0x0, 0xc00009b650, 0xc, 0xc000010001, 0xc0004e6000) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/proxy/system.go:38 +0x387 dns_1 | github.com/mageddo/dns-proxy-server/proxy.SystemDnsSolver.Solve(0x8fede0, 0xc0004d0120, 0xc00009b650, 0xc, 0x10001, 0xa0, 0x1b, 0xbfc6ff6fc620f5fb) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/proxy/system.go:22 +0x16e dns_1 | github.com/mageddo/dns-proxy-server/proxy.(*DefaultDnsSolverFactory).Solve(0xbe7398, 0x8fede0, 0xc0004d0120, 0xc00009b650, 0xc, 0xc000010001, 0xc0000d2b80, 0x4, 0x4, 0xc0003aea80, ...) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/proxy/factory.go:19 +0xd8 dns_1 | github.com/mageddo/dns-proxy-server/proxy.(*CnameDnsSolverFactory).Solve(0xc0000fbdb0, 0x8fede0, 0xc0004d0120, 0xc00009b650, 0xc, 0x10001, 0xc0000d2b80, 0x4, 0x4, 0x715c85, ...) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/proxy/factory.go:48 +0xbd dns_1 | main.handleQuestion(0x902a60, 0xc0003bca00, 0xc0000b4cf0) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/dns.go:51 +0x48e dns_1 | github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.HandlerFunc.ServeDNS(0x88a448, 0x902a60, 0xc0003bca00, 0xc0000b4cf0) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:84 +0x44 dns_1 | github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.(*ServeMux).ServeDNS(0xc0002d1e30, 0x902a60, 0xc0003bca00, 0xc0000b4cf0) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:210 +0x63 dns_1 | github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.(*Server).serve(0xc000356000, 0x8fad00, 0xc00048e4b0, 0x8f6c40, 0xc0002d1e30, 0xc0004ea000, 0x1d, 0x200, 0xc000010520, 0xc0004ac640, ...) dns_1 | /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:579 +0x2a4 dns_1 | created by github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.(*Server).serveUDP dns_1 | /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:533 +0x29e As OS I'm using Ubuntu 20.04. Docker version: 19.03.8. Not sure what additional information you might need.
Author
Owner

@ferrine commented on GitHub (Feb 16, 2022):

Same issue here, same logs and same setup

<!-- gh-comment-id:1041526976 --> @ferrine commented on GitHub (Feb 16, 2022): Same issue here, same logs and same setup
Author
Owner

@ferrine commented on GitHub (Feb 16, 2022):

Once it appears I weirdly have resolv.conf misconfigured

# nameserver 8.8.8.8 # dps-comment
# nameserver 8.8.4.4 # dps-comment
nameserver  # dps-entry
<!-- gh-comment-id:1041528045 --> @ferrine commented on GitHub (Feb 16, 2022): Once it appears I weirdly have resolv.conf misconfigured ``` # nameserver 8.8.8.8 # dps-comment # nameserver 8.8.4.4 # dps-comment nameserver # dps-entry ```
Author
Owner

@mageddo commented on GitHub (Mar 2, 2023):

Hey @ferrine your evidence is really precious, I worked at more ways to retrieve some valid IP to configure the nameserver and don't get an empty IP as in your cause, can give a try at version 3.5.2?

PSC @Sajito it may help you, if can give it a try...

<!-- gh-comment-id:1452274709 --> @mageddo commented on GitHub (Mar 2, 2023): Hey @ferrine your evidence is really precious, I worked at more ways to retrieve some valid IP to configure the nameserver and don't get an empty IP as in your cause, can give a try at version 3.5.2? PSC @Sajito it may help you, if can give it a try...
Author
Owner

@mageddo commented on GitHub (Mar 3, 2023):

I'm closing this but feel free to reopen if you need

<!-- gh-comment-id:1453375931 --> @mageddo commented on GitHub (Mar 3, 2023): I'm closing this but feel free to reopen if you need
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/dns-proxy-server-mageddo#82
No description provided.