[GH-ISSUE #424] Standalone setup doesn't resolve Docker hosts, after switching from Docker and older version #147

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

Originally created by @SimJoSt on GitHub (Jul 29, 2023).
Original GitHub issue: https://github.com/mageddo/dns-proxy-server/issues/424

Continuation from https://github.com/mageddo/dns-proxy-server/issues/251#issuecomment-1653813515

What is Happening / What is expected

  • Please describe how to reproduce the issue with a minimal example
    • Run the Docker version of DPS in an older version
    • Switch to the standalone version of DPS in the newest version
    • Docker hosts don't resolve anymore with e.g. host nextcloud.docker
  • Describe what you expected to happen and why
    • The Docker hosts resolve properly
    • Breaking of DNS resolution in Docker hosts doesn't occur anymore

Additional information

I also tried to install it as a Linux service following the instructions: https://github.com/mageddo/dns-proxy-server/blob/master/docs/content/2-features/installing-as-service/_index.en.md?plain=1#L23
Checking the --help, I also tried -service=normal instead of -service=docker from the docs. None of the registered a service.

Is there anything obvious I might have missed, switching from Docker to binary?
This problem can be moved to a new issue, I just wanted to document the results here, as I have not been able to get it running to test, if the original issue has been resolved.

Specs

  • OS: Debian 10.13
  • Docker Version: 24.0.5
  • DPS Version:
    • When running on standalone mode: 3.15.13-snapshot
    • When using docker: 2.19.0
  • Attach DPS Log file
11:49:37.856 [main           ] INF com.mageddo.dnsproxyserver.config.Configs         l=166  m=build                           status=configuring, configFile=/***REDACTED***/dns-proxy-server/bin/conf/config.json
11:49:37.863 [main           ] INF com.mageddo.dnsproxyserver.docker.EventListener   l=33   m=onStart                         status=binding-docker-events, dockerConnected=true
11:49:37.863 [main           ] INF c.m.dnsproxyserver.docker.DpsContainerManager     l=40   m=setupNetwork                    status=dpsNetwork, active=false
11:49:37.863 [main           ] INF com.mageddo.dnsproxyserver.docker.EventListener   l=41   m=onStart                         status=autoConnectDpsNetworkDisabled, dpsNetwork=false, dpsNetworkAutoConnect=false
11:49:37.864 [main           ] INF c.mageddo.dnsproxyserver.server.dns.UDPServerPool l=31   m=start                           Starting UDP server, addresses=/0.0.0.0:53
11:49:37.867 [main           ] INF c.mageddo.dnsproxyserver.server.dns.ServerStarter l=32   m=start                           status=startingDnsServer, protocol=UDP_TCP, port=53
11:49:37.867 [Thread-4       ] INF com.mageddo.dnsproxyserver.server.dns.TCPServer   l=50   m=start0                          status=tcpServerStarting, port=53
11:49:37.868 [main           ] INF com.mageddo.http.WebServer                        l=134  m=start                           status=startingWebServer, port=5380
11:49:42.870 [Thread-2       ] INF c.m.d.dnsconfigurator.DnsConfigurators            l=112  m=getInstance0                    usingDnsConfigurator=DnsConfiguratorLinux
11:49:42.870 [Thread-2       ] INF c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux  l=91   m=lambda$findBestConfFile$0       status=noValidConfFile, file=/host/etc/systemd/resolved.conf
11:49:42.870 [Thread-2       ] INF c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux  l=91   m=lambda$findBestConfFile$0       status=noValidConfFile, file=/host/etc/resolv.conf
11:49:42.870 [Thread-2       ] INF c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux  l=122  m=init                            status=using, configFile=ResolvFile(path=/etc/systemd/resolved.conf, type=SYSTEMD_RESOLVED)
Originally created by @SimJoSt on GitHub (Jul 29, 2023). Original GitHub issue: https://github.com/mageddo/dns-proxy-server/issues/424 Continuation from https://github.com/mageddo/dns-proxy-server/issues/251#issuecomment-1653813515 ### What is Happening / What is expected * Please describe how to reproduce the issue with a minimal example * Run the Docker version of DPS in an older version * Switch to the standalone version of DPS in the newest version * Docker hosts don't resolve anymore with e.g. `host nextcloud.docker` * Describe what you expected to happen and why * The Docker hosts resolve properly * Breaking of DNS resolution in Docker hosts doesn't occur anymore #### Additional information I also tried to install it as a Linux service following the instructions: https://github.com/mageddo/dns-proxy-server/blob/master/docs/content/2-features/installing-as-service/_index.en.md?plain=1#L23 Checking the `--help`, I also tried `-service=normal` instead of `-service=docker` from the docs. None of the registered a service. Is there anything obvious I might have missed, switching from Docker to binary? This problem can be moved to a new issue, I just wanted to document the results here, as I have not been able to get it running to test, if the original issue has been resolved. ### Specs * OS: Debian 10.13 * Docker Version: 24.0.5 * DPS Version: * When running on standalone mode: 3.15.13-snapshot * When using docker: 2.19.0 * Attach DPS Log file ``` 11:49:37.856 [main ] INF com.mageddo.dnsproxyserver.config.Configs l=166 m=build status=configuring, configFile=/***REDACTED***/dns-proxy-server/bin/conf/config.json 11:49:37.863 [main ] INF com.mageddo.dnsproxyserver.docker.EventListener l=33 m=onStart status=binding-docker-events, dockerConnected=true 11:49:37.863 [main ] INF c.m.dnsproxyserver.docker.DpsContainerManager l=40 m=setupNetwork status=dpsNetwork, active=false 11:49:37.863 [main ] INF com.mageddo.dnsproxyserver.docker.EventListener l=41 m=onStart status=autoConnectDpsNetworkDisabled, dpsNetwork=false, dpsNetworkAutoConnect=false 11:49:37.864 [main ] INF c.mageddo.dnsproxyserver.server.dns.UDPServerPool l=31 m=start Starting UDP server, addresses=/0.0.0.0:53 11:49:37.867 [main ] INF c.mageddo.dnsproxyserver.server.dns.ServerStarter l=32 m=start status=startingDnsServer, protocol=UDP_TCP, port=53 11:49:37.867 [Thread-4 ] INF com.mageddo.dnsproxyserver.server.dns.TCPServer l=50 m=start0 status=tcpServerStarting, port=53 11:49:37.868 [main ] INF com.mageddo.http.WebServer l=134 m=start status=startingWebServer, port=5380 11:49:42.870 [Thread-2 ] INF c.m.d.dnsconfigurator.DnsConfigurators l=112 m=getInstance0 usingDnsConfigurator=DnsConfiguratorLinux 11:49:42.870 [Thread-2 ] INF c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux l=91 m=lambda$findBestConfFile$0 status=noValidConfFile, file=/host/etc/systemd/resolved.conf 11:49:42.870 [Thread-2 ] INF c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux l=91 m=lambda$findBestConfFile$0 status=noValidConfFile, file=/host/etc/resolv.conf 11:49:42.870 [Thread-2 ] INF c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux l=122 m=init status=using, configFile=ResolvFile(path=/etc/systemd/resolved.conf, type=SYSTEMD_RESOLVED) ```
kerem 2026-02-26 04:34:11 +03:00
Author
Owner

@SimJoSt commented on GitHub (Sep 23, 2023):

@mageddo if you need any additional debugging information, I am happy to provide it. I'm just lost on my own.

<!-- gh-comment-id:1732258187 --> @SimJoSt commented on GitHub (Sep 23, 2023): @mageddo if you need any additional debugging information, I am happy to provide it. I'm just lost on my own.
Author
Owner

@mageddo commented on GitHub (Jul 22, 2024):

Hey @SimJoSt, I tried to reproduce your scenario but wasn't able to get the issue, all worked just fine, some reprodution steps were missing, they can be the cause of the issue, below the steps I assumed you followed.

Be aware that to solve docker containers from they host name, you need to set "registerContainerNames": true in both versions.

I also noticed that one line is missing at your logs and present on the mine at the standalone version, maybe did you have suppress it?

09:02:14.318 [Thread-8       ] DEB c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux  l=57   m=configure                       status=configured, path=ResolvFile(path=/etc/systemd/resolved.conf, type=SYSTEMD_RESOLVED)

Env

Client:
 Version:           24.0.7
 API version:       1.43
 Go version:        go1.22.2
 Git commit:        24.0.7-0ubuntu4
 Built:             Wed Apr 17 20:08:25 2024
 OS/Arch:           linux/amd64
 Context:           default

Server:
 Engine:
  Version:          24.0.7
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.22.2
  Git commit:       24.0.7-0ubuntu4
  Built:            Wed Apr 17 20:08:25 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.7.12
  GitCommit:        
 runc:
  Version:          1.1.12-0ubuntu3
  GitCommit:        
 docker-init:
  Version:          0.19.0
  GitCommit:  

Creating a docker container to be solved

$ docker run --name nextcloud --rm  nginx

Running the docker version 2.19.0

The config file, same as the default just changed the "registerContainerNames": true flag

$ cat conf/config.json

{
  "version": 2,
  "remoteDnsServers": [],
  "envs": [
    {
      "name": ""
    }
  ],
  "activeEnv": "",
  "webServerPort": 0,
  "dnsServerPort": 0,
  "defaultDns": null,
  "logLevel": "",
  "logFile": "",
  "registerContainerNames": true,
  "hostMachineHostname": "",
  "domain": "",
  "dpsNetwork": false,
  "dpsNetworkAutoConnect": false
}

Running the container and set as the default host DNS server

$ docker run --name dps --rm -v ./conf/config.json:/app/conf/config.json \
  -v /etc/resolv.conf:/etc/resolv.conf \
  -v /var/run/docker.sock:/var/run/docker.sock \
  defreitas/dns-proxy-server:2.19.0

Solving

$ nslookup nextcloud.docker
Server:         172.17.0.3
Address:        172.17.0.3#53

Non-authoritative answer:
Name:   nextcloud.docker
Address: 172.17.0.2
Name:   nextcloud.docker
Address: 172.17.0.2

Testing the Standalone Version 3.15.13-snapshot

Using the same config file, just changed to the port to 5355

{
  "version": 2,
  "remoteDnsServers": [],
  "envs": [
    {
      "name": ""
    }
  ],
  "activeEnv": "",
  "webServerPort": 0,
  "dnsServerPort": 5355,
  "defaultDns": null,
  "logLevel": "",
  "logFile": "",
  "registerContainerNames": true,
  "hostMachineHostname": "",
  "domain": "",
  "dpsNetwork": false,
  "dpsNetworkAutoConnect": false
}

Running DPS

sudo ./dns-proxy-server 
09:01:28.921 [main           ] INF com.mageddo.dnsproxyserver.config.Configs         l=166  m=build                           status=configuring, configFile=/home/typer/Downloads/dps/424/dns-proxy-server-linux-amd64-3.15.13/conf/config.json
09:01:28.922 [main           ] DEB c.m.dnsproxyserver.docker.DockerConnectionCheck   l=50   m=updateStatus                    status=updatingDockerStatus, null=true, expired=false
09:01:28.930 [main           ] INF com.mageddo.dnsproxyserver.docker.EventListener   l=33   m=onStart                         status=binding-docker-events, dockerConnected=true
09:01:28.930 [main           ] INF c.m.dnsproxyserver.docker.DpsContainerManager     l=40   m=setupNetwork                    status=dpsNetwork, active=false
09:01:28.930 [main           ] INF com.mageddo.dnsproxyserver.docker.EventListener   l=41   m=onStart                         status=autoConnectDpsNetworkDisabled, dpsNetwork=false, dpsNetworkAutoConnect=false
09:01:28.930 [main           ] DEB c.m.d.dnsconfigurator.DnsConfigurators            l=36   m=onStart                         action=setAsDefaultDns, active=true
09:01:28.931 [main           ] INF c.mageddo.dnsproxyserver.server.dns.UDPServerPool l=31   m=start                           Starting UDP server, addresses=/0.0.0.0:5355
09:01:28.931 [main           ] DEB com.mageddo.dnsproxyserver.server.dns.TCPServer   l=42   m=start                           status=tcpServerStartScheduled, port=5355
09:01:28.934 [main           ] INF c.mageddo.dnsproxyserver.server.dns.ServerStarter l=32   m=start                           status=startingDnsServer, protocol=UDP_TCP, port=5355
09:01:28.934 [Thread-4       ] INF com.mageddo.dnsproxyserver.server.dns.TCPServer   l=50   m=start0                          status=tcpServerStarting, port=5355
09:01:28.935 [main           ] INF com.mageddo.http.WebServer                        l=134  m=start                           status=startingWebServer, port=5380
09:01:33.936 [Thread-2       ] INF c.m.d.dnsconfigurator.DnsConfigurators            l=112  m=getInstance0                    usingDnsConfigurator=DnsConfiguratorLinux
09:01:33.937 [Thread-2       ] INF c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux  l=91   m=lambda$findBestConfFile$0       status=noValidConfFile, file=/host/etc/systemd/resolved.conf
09:01:33.937 [Thread-2       ] INF c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux  l=91   m=lambda$findBestConfFile$0       status=noValidConfFile, file=/host/etc/resolv.conf
09:01:33.937 [Thread-2       ] INF c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux  l=122  m=init                            status=using, configFile=ResolvFile(path=/etc/systemd/resolved.conf, type=SYSTEMD_RESOLVED)
09:01:34.297 [Thread-2       ] DEB c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux  l=57   m=configure                       status=configured, path=ResolvFile(path=/etc/systemd/resolved.conf, type=SYSTEMD_RESOLVED)
09:01:54.307 [Thread-5       ] DEB c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux  l=57   m=configure                       status=configured, path=ResolvFile(path=/etc/systemd/resolved.conf, type=SYSTEMD_RESOLVED)
09:01:56.523 [Thread-11      ] DEB c.m.d.server.dns.RequestHandlerDefault            l=48   m=solve                           status=solveReq, kind=udp, query=query=A:nextcloud.docker
09:01:56.540 [Thread-11      ] DEB c.m.dnsproxyserver.docker.ContainerSolvingService l=90   m=findBestIpMatch                 status=networkNotFoundForContainer, name=dps
09:01:56.540 [Thread-11      ] DEB c.m.dnsproxyserver.docker.ContainerSolvingService l=95   m=findBestIpMatch                 status=foundIp, network=bridge, container=/nextcloud, ip=172.17.0.2
09:01:56.540 [Thread-11      ] DEB c.m.d.server.dns.RequestHandlerDefault            l=87   m=solve0                          status=solved, currentSolverTime=16, totalTime=16, solver=SolverDocker, req=query=A:nextcloud.docker, res=rc=0, res=nextcloud.docker.  30  IN  A  172.17.0.2
09:01:56.540 [Thread-11      ] DEB c.m.d.server.dns.RequestHandlerDefault            l=102  m=solve0                          status=solveSummary, summary=[(SolverSystem,0), (SolverDocker,16)]
09:01:56.540 [Thread-11      ] DEB c.m.dnsproxyserver.server.dns.solver.SolverCache  l=44   m=lambda$handleRes$0              status=hotload, k=A-nextcloud.docker, ttl=PT30S, simpleMsg=query=A:nextcloud.docker
09:01:56.540 [Thread-11      ] DEB c.m.d.server.dns.RequestHandlerDefault            l=53   m=solve                           status=solveRes, kind=udp, time=16, res=rc=0, res=nextcloud.docker.  30  IN  A  172.17.0.2, req=query=A:nextcloud.docker
09:01:56.540 [Thread-11      ] DEB com.mageddo.dnsproxyserver.server.dns.UDPServer   l=58   m=handle                          status=success, query=query=A:nextcloud.docker, res=rc=0, res=nextcloud.docker.  30  IN  A  172.17.0.2, serverAddr=/0:0:0:0:0:0:0:0, clientAddr=/10.0.2.15:41576, dataLength=512, datagramLength=45
09:01:56.541 [Thread-12      ] DEB c.m.d.server.dns.RequestHandlerDefault            l=48   m=solve                           status=solveReq, kind=udp, query=query=AAAA:nextcloud.docker
09:01:56.543 [Thread-12      ] DEB c.m.dnsproxyserver.docker.ContainerSolvingService l=90   m=findBestIpMatch                 status=networkNotFoundForContainer, name=dps
09:01:56.543 [Thread-12      ] DEB c.m.dnsproxyserver.docker.ContainerSolvingService l=95   m=findBestIpMatch                 status=foundIp, network=bridge, container=/nextcloud, ip=null
09:01:56.543 [Thread-12      ] DEB c.m.dnsproxyserver.docker.ContainerSolvingService l=100  m=findBestIpMatch                 status=predefinedNetworkNotFound, action=findSecondOption, searchedNetworks=[dps, bridge], container=/nextcloud
09:01:56.544 [Thread-12      ] DEB c.m.dnsproxyserver.docker.DockerNetworkDAODefault l=53   m=findByName                      queryName=bridge, foundName=bridge
09:01:56.545 [Thread-12      ] DEB c.m.dnsproxyserver.docker.ContainerSolvingService l=120  m=lambda$findBestIpMatch$3        status=foundIp, networks=[bridge], networkName=bridge, driver=bridge, foundIp=null
09:01:56.545 [Thread-12      ] DEB c.mageddo.dnsproxyserver.docker.DockerDAODefault  l=64   m=findBestNetwork                 status=bestNetwork, network=trash1, ip=172.18.0.1
09:01:56.545 [Thread-12      ] DEB c.m.dnsproxyserver.docker.ContainerSolvingService l=132  m=lambda$findBestIpMatch$4        status=noNetworkAvailable, usingHostMachineIp=fddb:21e4:36d4:1:0:0:0:1
09:01:56.545 [Thread-12      ] DEB c.m.d.server.dns.RequestHandlerDefault            l=87   m=solve0                          status=solved, currentSolverTime=4, totalTime=4, solver=SolverDocker, req=query=AAAA:nextcloud.docker, res=rc=0, res=nextcloud.docker.  30  IN  AAAA  fddb:21e4:36d4:1:0:0:0:1
09:01:56.545 [Thread-12      ] DEB c.m.d.server.dns.RequestHandlerDefault            l=102  m=solve0                          status=solveSummary, summary=[(SolverSystem,0), (SolverDocker,4)]
09:01:56.545 [Thread-12      ] DEB c.m.dnsproxyserver.server.dns.solver.SolverCache  l=44   m=lambda$handleRes$0              status=hotload, k=AAAA-nextcloud.docker, ttl=PT30S, simpleMsg=query=AAAA:nextcloud.docker
09:01:56.546 [Thread-12      ] DEB c.m.d.server.dns.RequestHandlerDefault            l=53   m=solve                           status=solveRes, kind=udp, time=4, res=rc=0, res=nextcloud.docker.  30  IN  AAAA  fddb:21e4:36d4:1:0:0:0:1, req=query=AAAA:nextcloud.docker
09:01:56.546 [Thread-12      ] DEB com.mageddo.dnsproxyserver.server.dns.UDPServer   l=58   m=handle                          status=success, query=query=AAAA:nextcloud.docker, res=rc=0, res=nextcloud.docker.  30  IN  AAAA  fddb:21e4:36d4:1:0:0:0:1, serverAddr=/0:0:0:0:0:0:0:0, clientAddr=/10.0.2.15:54640, dataLength=512, datagramLength=45
09:02:14.318 [Thread-8       ] DEB c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux  l=57   m=configure                       status=configured, path=ResolvFile(path=/etc/systemd/resolved.conf, type=SYSTEMD_RESOLVED)

Solving

$ nslookup nextcloud.docker
Server:         127.0.0.53
Address:        127.0.0.53#53

Non-authoritative answer:
Name:   nextcloud.docker
Address: 172.17.0.2
Name:   nextcloud.docker
Address: fddb:21e4:36d4:1::1

<!-- gh-comment-id:2242806761 --> @mageddo commented on GitHub (Jul 22, 2024): Hey @SimJoSt, I tried to reproduce your scenario but wasn't able to get the issue, all worked just fine, some reprodution steps were missing, they can be the cause of the issue, below the steps I assumed you followed. Be aware that to solve docker containers from they host name, you need to set `"registerContainerNames": true` in both versions. I also noticed that one line is missing at your logs and present on the mine at the standalone version, maybe did you have suppress it? ``` 09:02:14.318 [Thread-8 ] DEB c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux l=57 m=configure status=configured, path=ResolvFile(path=/etc/systemd/resolved.conf, type=SYSTEMD_RESOLVED) ``` ### Env ``` Client: Version: 24.0.7 API version: 1.43 Go version: go1.22.2 Git commit: 24.0.7-0ubuntu4 Built: Wed Apr 17 20:08:25 2024 OS/Arch: linux/amd64 Context: default Server: Engine: Version: 24.0.7 API version: 1.43 (minimum version 1.12) Go version: go1.22.2 Git commit: 24.0.7-0ubuntu4 Built: Wed Apr 17 20:08:25 2024 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.7.12 GitCommit: runc: Version: 1.1.12-0ubuntu3 GitCommit: docker-init: Version: 0.19.0 GitCommit: ``` Creating a docker container to be solved ```bash $ docker run --name nextcloud --rm nginx ``` ### Running the docker version 2.19.0 The config file, same as the default just changed the `"registerContainerNames": true` flag ```json $ cat conf/config.json { "version": 2, "remoteDnsServers": [], "envs": [ { "name": "" } ], "activeEnv": "", "webServerPort": 0, "dnsServerPort": 0, "defaultDns": null, "logLevel": "", "logFile": "", "registerContainerNames": true, "hostMachineHostname": "", "domain": "", "dpsNetwork": false, "dpsNetworkAutoConnect": false } ``` Running the container and set as the default host DNS server ```bash $ docker run --name dps --rm -v ./conf/config.json:/app/conf/config.json \ -v /etc/resolv.conf:/etc/resolv.conf \ -v /var/run/docker.sock:/var/run/docker.sock \ defreitas/dns-proxy-server:2.19.0 ``` Solving ```bash $ nslookup nextcloud.docker Server: 172.17.0.3 Address: 172.17.0.3#53 Non-authoritative answer: Name: nextcloud.docker Address: 172.17.0.2 Name: nextcloud.docker Address: 172.17.0.2 ``` ### Testing the Standalone Version 3.15.13-snapshot Using the same config file, just changed to the port to **5355** ```json { "version": 2, "remoteDnsServers": [], "envs": [ { "name": "" } ], "activeEnv": "", "webServerPort": 0, "dnsServerPort": 5355, "defaultDns": null, "logLevel": "", "logFile": "", "registerContainerNames": true, "hostMachineHostname": "", "domain": "", "dpsNetwork": false, "dpsNetworkAutoConnect": false } ``` Running DPS ``` sudo ./dns-proxy-server 09:01:28.921 [main ] INF com.mageddo.dnsproxyserver.config.Configs l=166 m=build status=configuring, configFile=/home/typer/Downloads/dps/424/dns-proxy-server-linux-amd64-3.15.13/conf/config.json 09:01:28.922 [main ] DEB c.m.dnsproxyserver.docker.DockerConnectionCheck l=50 m=updateStatus status=updatingDockerStatus, null=true, expired=false 09:01:28.930 [main ] INF com.mageddo.dnsproxyserver.docker.EventListener l=33 m=onStart status=binding-docker-events, dockerConnected=true 09:01:28.930 [main ] INF c.m.dnsproxyserver.docker.DpsContainerManager l=40 m=setupNetwork status=dpsNetwork, active=false 09:01:28.930 [main ] INF com.mageddo.dnsproxyserver.docker.EventListener l=41 m=onStart status=autoConnectDpsNetworkDisabled, dpsNetwork=false, dpsNetworkAutoConnect=false 09:01:28.930 [main ] DEB c.m.d.dnsconfigurator.DnsConfigurators l=36 m=onStart action=setAsDefaultDns, active=true 09:01:28.931 [main ] INF c.mageddo.dnsproxyserver.server.dns.UDPServerPool l=31 m=start Starting UDP server, addresses=/0.0.0.0:5355 09:01:28.931 [main ] DEB com.mageddo.dnsproxyserver.server.dns.TCPServer l=42 m=start status=tcpServerStartScheduled, port=5355 09:01:28.934 [main ] INF c.mageddo.dnsproxyserver.server.dns.ServerStarter l=32 m=start status=startingDnsServer, protocol=UDP_TCP, port=5355 09:01:28.934 [Thread-4 ] INF com.mageddo.dnsproxyserver.server.dns.TCPServer l=50 m=start0 status=tcpServerStarting, port=5355 09:01:28.935 [main ] INF com.mageddo.http.WebServer l=134 m=start status=startingWebServer, port=5380 09:01:33.936 [Thread-2 ] INF c.m.d.dnsconfigurator.DnsConfigurators l=112 m=getInstance0 usingDnsConfigurator=DnsConfiguratorLinux 09:01:33.937 [Thread-2 ] INF c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux l=91 m=lambda$findBestConfFile$0 status=noValidConfFile, file=/host/etc/systemd/resolved.conf 09:01:33.937 [Thread-2 ] INF c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux l=91 m=lambda$findBestConfFile$0 status=noValidConfFile, file=/host/etc/resolv.conf 09:01:33.937 [Thread-2 ] INF c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux l=122 m=init status=using, configFile=ResolvFile(path=/etc/systemd/resolved.conf, type=SYSTEMD_RESOLVED) 09:01:34.297 [Thread-2 ] DEB c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux l=57 m=configure status=configured, path=ResolvFile(path=/etc/systemd/resolved.conf, type=SYSTEMD_RESOLVED) 09:01:54.307 [Thread-5 ] DEB c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux l=57 m=configure status=configured, path=ResolvFile(path=/etc/systemd/resolved.conf, type=SYSTEMD_RESOLVED) 09:01:56.523 [Thread-11 ] DEB c.m.d.server.dns.RequestHandlerDefault l=48 m=solve status=solveReq, kind=udp, query=query=A:nextcloud.docker 09:01:56.540 [Thread-11 ] DEB c.m.dnsproxyserver.docker.ContainerSolvingService l=90 m=findBestIpMatch status=networkNotFoundForContainer, name=dps 09:01:56.540 [Thread-11 ] DEB c.m.dnsproxyserver.docker.ContainerSolvingService l=95 m=findBestIpMatch status=foundIp, network=bridge, container=/nextcloud, ip=172.17.0.2 09:01:56.540 [Thread-11 ] DEB c.m.d.server.dns.RequestHandlerDefault l=87 m=solve0 status=solved, currentSolverTime=16, totalTime=16, solver=SolverDocker, req=query=A:nextcloud.docker, res=rc=0, res=nextcloud.docker. 30 IN A 172.17.0.2 09:01:56.540 [Thread-11 ] DEB c.m.d.server.dns.RequestHandlerDefault l=102 m=solve0 status=solveSummary, summary=[(SolverSystem,0), (SolverDocker,16)] 09:01:56.540 [Thread-11 ] DEB c.m.dnsproxyserver.server.dns.solver.SolverCache l=44 m=lambda$handleRes$0 status=hotload, k=A-nextcloud.docker, ttl=PT30S, simpleMsg=query=A:nextcloud.docker 09:01:56.540 [Thread-11 ] DEB c.m.d.server.dns.RequestHandlerDefault l=53 m=solve status=solveRes, kind=udp, time=16, res=rc=0, res=nextcloud.docker. 30 IN A 172.17.0.2, req=query=A:nextcloud.docker 09:01:56.540 [Thread-11 ] DEB com.mageddo.dnsproxyserver.server.dns.UDPServer l=58 m=handle status=success, query=query=A:nextcloud.docker, res=rc=0, res=nextcloud.docker. 30 IN A 172.17.0.2, serverAddr=/0:0:0:0:0:0:0:0, clientAddr=/10.0.2.15:41576, dataLength=512, datagramLength=45 09:01:56.541 [Thread-12 ] DEB c.m.d.server.dns.RequestHandlerDefault l=48 m=solve status=solveReq, kind=udp, query=query=AAAA:nextcloud.docker 09:01:56.543 [Thread-12 ] DEB c.m.dnsproxyserver.docker.ContainerSolvingService l=90 m=findBestIpMatch status=networkNotFoundForContainer, name=dps 09:01:56.543 [Thread-12 ] DEB c.m.dnsproxyserver.docker.ContainerSolvingService l=95 m=findBestIpMatch status=foundIp, network=bridge, container=/nextcloud, ip=null 09:01:56.543 [Thread-12 ] DEB c.m.dnsproxyserver.docker.ContainerSolvingService l=100 m=findBestIpMatch status=predefinedNetworkNotFound, action=findSecondOption, searchedNetworks=[dps, bridge], container=/nextcloud 09:01:56.544 [Thread-12 ] DEB c.m.dnsproxyserver.docker.DockerNetworkDAODefault l=53 m=findByName queryName=bridge, foundName=bridge 09:01:56.545 [Thread-12 ] DEB c.m.dnsproxyserver.docker.ContainerSolvingService l=120 m=lambda$findBestIpMatch$3 status=foundIp, networks=[bridge], networkName=bridge, driver=bridge, foundIp=null 09:01:56.545 [Thread-12 ] DEB c.mageddo.dnsproxyserver.docker.DockerDAODefault l=64 m=findBestNetwork status=bestNetwork, network=trash1, ip=172.18.0.1 09:01:56.545 [Thread-12 ] DEB c.m.dnsproxyserver.docker.ContainerSolvingService l=132 m=lambda$findBestIpMatch$4 status=noNetworkAvailable, usingHostMachineIp=fddb:21e4:36d4:1:0:0:0:1 09:01:56.545 [Thread-12 ] DEB c.m.d.server.dns.RequestHandlerDefault l=87 m=solve0 status=solved, currentSolverTime=4, totalTime=4, solver=SolverDocker, req=query=AAAA:nextcloud.docker, res=rc=0, res=nextcloud.docker. 30 IN AAAA fddb:21e4:36d4:1:0:0:0:1 09:01:56.545 [Thread-12 ] DEB c.m.d.server.dns.RequestHandlerDefault l=102 m=solve0 status=solveSummary, summary=[(SolverSystem,0), (SolverDocker,4)] 09:01:56.545 [Thread-12 ] DEB c.m.dnsproxyserver.server.dns.solver.SolverCache l=44 m=lambda$handleRes$0 status=hotload, k=AAAA-nextcloud.docker, ttl=PT30S, simpleMsg=query=AAAA:nextcloud.docker 09:01:56.546 [Thread-12 ] DEB c.m.d.server.dns.RequestHandlerDefault l=53 m=solve status=solveRes, kind=udp, time=4, res=rc=0, res=nextcloud.docker. 30 IN AAAA fddb:21e4:36d4:1:0:0:0:1, req=query=AAAA:nextcloud.docker 09:01:56.546 [Thread-12 ] DEB com.mageddo.dnsproxyserver.server.dns.UDPServer l=58 m=handle status=success, query=query=AAAA:nextcloud.docker, res=rc=0, res=nextcloud.docker. 30 IN AAAA fddb:21e4:36d4:1:0:0:0:1, serverAddr=/0:0:0:0:0:0:0:0, clientAddr=/10.0.2.15:54640, dataLength=512, datagramLength=45 09:02:14.318 [Thread-8 ] DEB c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux l=57 m=configure status=configured, path=ResolvFile(path=/etc/systemd/resolved.conf, type=SYSTEMD_RESOLVED) ``` Solving ``` $ nslookup nextcloud.docker Server: 127.0.0.53 Address: 127.0.0.53#53 Non-authoritative answer: Name: nextcloud.docker Address: 172.17.0.2 Name: nextcloud.docker Address: fddb:21e4:36d4:1::1 ```
Author
Owner

@github-actions[bot] commented on GitHub (Aug 7, 2024):

This issue is stale because it has been waiting-feedback for 15 days with no activity.

<!-- gh-comment-id:2272818136 --> @github-actions[bot] commented on GitHub (Aug 7, 2024): This issue is stale because it has been waiting-feedback for 15 days with no activity.
Author
Owner

@github-actions[bot] commented on GitHub (Aug 15, 2024):

This issue was closed because it has been inactive for 7 days since being marked as stale, you can reopen it at any time.

<!-- gh-comment-id:2290820942 --> @github-actions[bot] commented on GitHub (Aug 15, 2024): This issue was closed because it has been inactive for 7 days since being marked as stale, you can reopen it at any time.
Author
Owner

@SimJoSt commented on GitHub (Sep 13, 2024):

Thank you @mageddo, I finally got around to overhauling the config and testing a bit more.
As the docs currently recommend using Docker over the standalone version, I decided to stick with it.

I upgraded from image: ghcr.io/thisisqasim/dns-proxy-server:3.16.1-snapshot to this docker-compose.yml:

services:
  dns-proxy-server:
    image: defreitas/dns-proxy-server:3.17.2-snapshot
    restart: on-failure
    volumes:
      - ../data/conf/:/app/conf/
      - /var/run/docker.sock:/var/run/docker.sock
      - /etc/resolv.conf:/host/etc/resolv.conf

The config is:

{
  "version": 2,
  "remoteDnsServers": [],
  "envs": [
    {
      "name": ""
    }
  ],
  "activeEnv": "",
  "webServerPort": 0,
  "dnsServerPort": 0,
  "defaultDns": null,
  "logLevel": "",
  "logFile": "",
  "registerContainerNames": true,
  "hostMachineHostname": "",
  "domain": "",
  "dpsNetwork": false,
  "dpsNetworkAutoConnect": false
}

Even though there is no port exposed for the container, DNS resolution works fine. Why? Beats me :)
The test shows that port 53 is used, even though it was not opened:

~ dig nextcloud.docker

;; ANSWER SECTION:
nextcloud.docker.       30      IN      A       192.168.0.7

;; Query time: 0 msec
;; SERVER: 172.19.0.2#53(172.19.0.2)

I also added a volume to access the systemd resolved.conf file:

volumes:
      - /etc/systemd/resolved.conf:/host/etc/systemd/resolved.conf

But the following error was not fixable, even when restarting the service:

[Thread-2       ] WAR c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux  l=145  m=tryRestartResolved              status=can't restart resolved service, please run: 'service systemd-resolved restart' to apply DPS as default DNS.

Sticking to the resolve.conf method, the container boots up fine:

➜  docker docker compose logs
dns-proxy-server-1  | 05:17:03.859 [main           ] INF com.mageddo.dnsproxyserver.config.Configs         l=171  m=build                           status=configuring, configFile=/app/conf/config.json
dns-proxy-server-1  | 05:17:03.863 [main           ] DEB c.m.d.docker.application.DockerConnectionCheck    l=50   m=updateStatus                    status=updatingDockerStatus, null=true, expired=false
dns-proxy-server-1  | 05:17:03.873 [main           ] INF c.m.d.s.d.s.d.a.DpsDockerEnvironmentSetupService  l=33   m=setup                           status=binding-docker-events, connectedToDocker=true
dns-proxy-server-1  | 05:17:03.873 [main           ] INF c.m.d.s.d.s.d.a.DpsDockerEnvironmentSetupService  l=45   m=setupNetwork                    status=dpsNetwork, active=false
dns-proxy-server-1  | 05:17:03.873 [main           ] INF c.m.d.s.d.s.docker.application.DpsContainerServicel=102  m=tRunningContainersToDpsNetwork  status=autoConnectDpsNetworkDisabled, dpsNetwork=false, dpsNetworkAutoConnect=false
dns-proxy-server-1  | 05:17:03.873 [main           ] INF c.m.d.s.dns.solver.docker.entrypoint.EventListenerl=32   m=onStart                         status=containerAutoConnectToDpsNetworkDisabled
dns-proxy-server-1  | 05:17:03.873 [main           ] DEB c.m.d.dnsconfigurator.DnsConfigurators            l=37   m=onStart                         action=setAsDefaultDns, active=true
dns-proxy-server-1  | 05:17:03.874 [main           ] INF c.mageddo.dnsproxyserver.server.dns.UDPServerPool l=31   m=start                           Starting UDP server, addresses=/0.0.0.0:53
dns-proxy-server-1  | 05:17:03.874 [main           ] DEB com.mageddo.dnsproxyserver.server.dns.TCPServer   l=42   m=start                           status=tcpServerStartScheduled, port=53
dns-proxy-server-1  | 05:17:03.881 [main           ] INF c.mageddo.dnsproxyserver.server.dns.ServerStarter l=32   m=start                           status=startingDnsServer, protocol=UDP_TCP, port=53
dns-proxy-server-1  | 05:17:03.881 [Thread-4       ] INF com.mageddo.dnsproxyserver.server.dns.TCPServer   l=50   m=start0                          status=tcpServerStarting, port=53
dns-proxy-server-1  | 05:17:03.883 [main           ] INF com.mageddo.http.WebServer                        l=134  m=start                           status=startingWebServer, port=5380
dns-proxy-server-1  | 05:17:08.883 [Thread-2       ] DEB c.m.d.s.d.s.d.dataprovider.DpsContainerDAODefault l=53   m=findDPSContainer                dpsContainersFound=1
dns-proxy-server-1  | 05:17:08.895 [Thread-2       ] DEB c.m.d.s.d.s.d.application.ContainerSolvingService l=75   m=findAtPreferredNetworks         status=networkNotFoundForContainer, name=dps
dns-proxy-server-1  | 05:17:08.895 [Thread-2       ] DEB c.m.d.s.d.s.d.application.ContainerSolvingService l=75   m=findAtPreferredNetworks         status=networkNotFoundForContainer, name=bridge
dns-proxy-server-1  | 05:17:08.895 [Thread-2       ] DEB c.m.d.s.d.s.d.application.ContainerSolvingService l=85   m=findAtPreferredNetworks         status=predefinedNetworkNotFound, action=findSecondOption, searchedNetworks=[dps, bridge], container=/dns-proxy-server-dns-proxy-server-1
dns-proxy-server-1  | 05:17:08.897 [Thread-2       ] DEB c.m.d.d.dataprovider.DockerNetworkFacadeDefault   l=52   m=findByName                      queryName=dns-proxy-server_default, foundName=dns-proxy-server_default
dns-proxy-server-1  | 05:17:08.897 [Thread-2       ] DEB c.m.d.s.d.s.d.application.ContainerSolvingService l=122  m=findContainerNetworkIp          status=foundIp, containerNetworks=[dns-proxy-server_default], networkName=dns-proxy-server_default, driver=bridge, foundIp=172.21.0.2
dns-proxy-server-1  | 05:17:08.897 [Thread-2       ] INF c.m.d.dnsconfigurator.DnsConfigurators            l=113  m=getInstance0                    usingDnsConfigurator=DnsConfiguratorLinux
dns-proxy-server-1  | 05:17:08.898 [Thread-2       ] INF c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux  l=91   m=lambda$findBestConfFile$0       status=noValidConfFile, file=/host/etc/systemd/resolved.conf
dns-proxy-server-1  | 05:17:08.898 [Thread-2       ] INF c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux  l=122  m=init                            status=using, configFile=ResolvFile(path=/host/etc/resolv.conf, type=RESOLVCONF)
dns-proxy-server-1  | 05:17:08.898 [Thread-2       ] DEB c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux  l=57   m=configure                       status=configured, path=ResolvFile(path=/host/etc/resolv.conf, type=RESOLVCONF)

I stuck with the maximum version of 3.17.2, as all later versions would either through errors or would not advance past this point of booting up.
Version 3.16.1 through 3.17.2 mostly worked without issue and the log would extend like this, resolving the docker container hostnames:

dns-proxy-server-1  | 05:17:10.093 [Thread-9       ] DEB c.m.d.server.dns.RequestHandlerDefault            l=48   m=solve                           status=solveReq, kind=udp, query=query=AAAA:g[987/9641]
dns-proxy-server-1  | 05:17:10.093 [Thread-10      ] DEB c.m.d.server.dns.RequestHandlerDefault            l=48   m=solve                           status=solveReq, kind=udp, query=query=A:grav.docker
dns-proxy-server-1  | 05:17:10.120 [Thread-10      ] DEB c.m.d.s.d.s.d.application.ContainerSolvingService l=75   m=findAtPreferredNetworks         status=networkNotFoundForContainer, name=dps
dns-proxy-server-1  | 05:17:10.120 [Thread-9       ] DEB c.m.d.s.d.s.d.application.ContainerSolvingService l=75   m=findAtPreferredNetworks         status=networkNotFoundForContainer, name=dps
dns-proxy-server-1  | 05:17:10.121 [Thread-10      ] DEB c.m.d.s.d.s.d.application.ContainerSolvingService l=75   m=findAtPreferredNetworks         status=networkNotFoundForContainer, name=bridge
dns-proxy-server-1  | 05:17:10.121 [Thread-9       ] DEB c.m.d.s.d.s.d.application.ContainerSolvingService l=75   m=findAtPreferredNetworks         status=networkNotFoundForContainer, name=bridge
dns-proxy-server-1  | 05:17:10.121 [Thread-10      ] DEB c.m.d.s.d.s.d.application.ContainerSolvingService l=85   m=findAtPreferredNetworks         status=predefinedNetworkNotFound, action=findSecondOption, searchedNetworks=[dps, bridge], container=/grav-grav-1
dns-proxy-server-1  | 05:17:10.121 [Thread-9       ] DEB c.m.d.s.d.s.d.application.ContainerSolvingService l=85   m=findAtPreferredNetworks         status=predefinedNetworkNotFound, action=findSecondOption, searchedNetworks=[dps, bridge], container=/grav-grav-1
dns-proxy-server-1  | 05:17:10.121 [Thread-9       ] DEB c.m.d.d.dataprovider.DockerNetworkFacadeDefault   l=52   m=findByName                      queryName=grav_default, foundName=grav_default
dns-proxy-server-1  | 05:17:10.121 [Thread-10      ] DEB c.m.d.d.dataprovider.DockerNetworkFacadeDefault   l=52   m=findByName                      queryName=grav_default, foundName=grav_default
dns-proxy-server-1  | 05:17:10.121 [Thread-9       ] DEB c.m.d.s.d.s.d.application.ContainerSolvingService l=122  m=findContainerNetworkIp          status=foundIp, containerNetworks=[grav_default], networkName=grav_default, driver=bridge, foundIp=null
dns-proxy-server-1  | 05:17:10.121 [Thread-10      ] DEB c.m.d.s.d.s.d.application.ContainerSolvingService l=122  m=findContainerNetworkIp          status=foundIp, containerNetworks=[grav_default], networkName=grav_default, driver=bridge, foundIp=172.24.0.2
dns-proxy-server-1  | 05:17:10.121 [Thread-10      ] DEB c.m.d.server.dns.RequestHandlerDefault            l=87   m=solve0                          status=solved, currentSolverTime=27, totalTime=27, solver=SolverDocker, req=query=A:grav.docker, res=rc=0, res=grav.docker.    30  IN  A  172.24.0.2
dns-proxy-server-1  | 05:17:10.121 [Thread-10      ] DEB c.m.d.server.dns.RequestHandlerDefault            l=102  m=solve0                          status=solveSummary, summary=[(SolverSystem,0), (SolverDocker,27)]
dns-proxy-server-1  | 05:17:10.121 [Thread-10      ] DEB c.m.dnsproxyserver.server.dns.solver.SolverCache  l=44   m=lambda$handleRes$0              status=hotload, k=A-grav.docker, ttl=PT30S, simpleMsg=query=A:grav.docker
dns-proxy-server-1  | 05:17:10.121 [Thread-10      ] DEB c.m.d.server.dns.RequestHandlerDefault            l=53   m=solve                           status=solveRes, kind=udp, time=27, res=rc=0, res=grav.docker.    30  IN  A  172.24.0.2, req=query=A:grav.docker
dns-proxy-server-1  | 05:17:10.122 [Thread-10      ] DEB com.mageddo.dnsproxyserver.server.dns.UDPServer   l=58   m=handle                          status=success, query=query=A:grav.docker, res=rc=0, res=grav.docker.    30  IN  A  172.24.0.2, serverAddr=/0:0:0:0:0:0:0:0, clientAddr=/172.21.0.1:59500, dataLength=512, datagramLength=40
dns-proxy-server-1  | 05:17:10.122 [Thread-9       ] WAR c.m.d.server.dns.RequestHandlerDefault            l=93   m=solve0                          status=solverFailed, currentSolverTime=28, totalTime=28, solver=SolverDocker, query=query=AAAA:grav.docker, eClass=NullPointerException, msg=null

I'm not sure what specifically changed after that, that prevents it from resolving docker host with higher versions.

<!-- gh-comment-id:2348095062 --> @SimJoSt commented on GitHub (Sep 13, 2024): Thank you @mageddo, I finally got around to overhauling the config and testing a bit more. As the docs currently recommend using Docker over the standalone version, I decided to stick with it. I upgraded from `image: ghcr.io/thisisqasim/dns-proxy-server:3.16.1-snapshot` to this `docker-compose.yml`: ```YAML services: dns-proxy-server: image: defreitas/dns-proxy-server:3.17.2-snapshot restart: on-failure volumes: - ../data/conf/:/app/conf/ - /var/run/docker.sock:/var/run/docker.sock - /etc/resolv.conf:/host/etc/resolv.conf ``` The config is: ```JSON { "version": 2, "remoteDnsServers": [], "envs": [ { "name": "" } ], "activeEnv": "", "webServerPort": 0, "dnsServerPort": 0, "defaultDns": null, "logLevel": "", "logFile": "", "registerContainerNames": true, "hostMachineHostname": "", "domain": "", "dpsNetwork": false, "dpsNetworkAutoConnect": false } ``` Even though there is no port exposed for the container, DNS resolution works fine. Why? Beats me :) The test shows that port 53 is used, even though it was not opened: ```bash ~ dig nextcloud.docker ;; ANSWER SECTION: nextcloud.docker. 30 IN A 192.168.0.7 ;; Query time: 0 msec ;; SERVER: 172.19.0.2#53(172.19.0.2) ``` I also added a volume to access the systemd `resolved.conf` file: ```YAML volumes: - /etc/systemd/resolved.conf:/host/etc/systemd/resolved.conf ``` But the following error was not fixable, even when restarting the service: ```bash [Thread-2 ] WAR c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux l=145 m=tryRestartResolved status=can't restart resolved service, please run: 'service systemd-resolved restart' to apply DPS as default DNS. ``` Sticking to the `resolve.conf` method, the container boots up fine: ```bash ➜ docker docker compose logs dns-proxy-server-1 | 05:17:03.859 [main ] INF com.mageddo.dnsproxyserver.config.Configs l=171 m=build status=configuring, configFile=/app/conf/config.json dns-proxy-server-1 | 05:17:03.863 [main ] DEB c.m.d.docker.application.DockerConnectionCheck l=50 m=updateStatus status=updatingDockerStatus, null=true, expired=false dns-proxy-server-1 | 05:17:03.873 [main ] INF c.m.d.s.d.s.d.a.DpsDockerEnvironmentSetupService l=33 m=setup status=binding-docker-events, connectedToDocker=true dns-proxy-server-1 | 05:17:03.873 [main ] INF c.m.d.s.d.s.d.a.DpsDockerEnvironmentSetupService l=45 m=setupNetwork status=dpsNetwork, active=false dns-proxy-server-1 | 05:17:03.873 [main ] INF c.m.d.s.d.s.docker.application.DpsContainerServicel=102 m=tRunningContainersToDpsNetwork status=autoConnectDpsNetworkDisabled, dpsNetwork=false, dpsNetworkAutoConnect=false dns-proxy-server-1 | 05:17:03.873 [main ] INF c.m.d.s.dns.solver.docker.entrypoint.EventListenerl=32 m=onStart status=containerAutoConnectToDpsNetworkDisabled dns-proxy-server-1 | 05:17:03.873 [main ] DEB c.m.d.dnsconfigurator.DnsConfigurators l=37 m=onStart action=setAsDefaultDns, active=true dns-proxy-server-1 | 05:17:03.874 [main ] INF c.mageddo.dnsproxyserver.server.dns.UDPServerPool l=31 m=start Starting UDP server, addresses=/0.0.0.0:53 dns-proxy-server-1 | 05:17:03.874 [main ] DEB com.mageddo.dnsproxyserver.server.dns.TCPServer l=42 m=start status=tcpServerStartScheduled, port=53 dns-proxy-server-1 | 05:17:03.881 [main ] INF c.mageddo.dnsproxyserver.server.dns.ServerStarter l=32 m=start status=startingDnsServer, protocol=UDP_TCP, port=53 dns-proxy-server-1 | 05:17:03.881 [Thread-4 ] INF com.mageddo.dnsproxyserver.server.dns.TCPServer l=50 m=start0 status=tcpServerStarting, port=53 dns-proxy-server-1 | 05:17:03.883 [main ] INF com.mageddo.http.WebServer l=134 m=start status=startingWebServer, port=5380 dns-proxy-server-1 | 05:17:08.883 [Thread-2 ] DEB c.m.d.s.d.s.d.dataprovider.DpsContainerDAODefault l=53 m=findDPSContainer dpsContainersFound=1 dns-proxy-server-1 | 05:17:08.895 [Thread-2 ] DEB c.m.d.s.d.s.d.application.ContainerSolvingService l=75 m=findAtPreferredNetworks status=networkNotFoundForContainer, name=dps dns-proxy-server-1 | 05:17:08.895 [Thread-2 ] DEB c.m.d.s.d.s.d.application.ContainerSolvingService l=75 m=findAtPreferredNetworks status=networkNotFoundForContainer, name=bridge dns-proxy-server-1 | 05:17:08.895 [Thread-2 ] DEB c.m.d.s.d.s.d.application.ContainerSolvingService l=85 m=findAtPreferredNetworks status=predefinedNetworkNotFound, action=findSecondOption, searchedNetworks=[dps, bridge], container=/dns-proxy-server-dns-proxy-server-1 dns-proxy-server-1 | 05:17:08.897 [Thread-2 ] DEB c.m.d.d.dataprovider.DockerNetworkFacadeDefault l=52 m=findByName queryName=dns-proxy-server_default, foundName=dns-proxy-server_default dns-proxy-server-1 | 05:17:08.897 [Thread-2 ] DEB c.m.d.s.d.s.d.application.ContainerSolvingService l=122 m=findContainerNetworkIp status=foundIp, containerNetworks=[dns-proxy-server_default], networkName=dns-proxy-server_default, driver=bridge, foundIp=172.21.0.2 dns-proxy-server-1 | 05:17:08.897 [Thread-2 ] INF c.m.d.dnsconfigurator.DnsConfigurators l=113 m=getInstance0 usingDnsConfigurator=DnsConfiguratorLinux dns-proxy-server-1 | 05:17:08.898 [Thread-2 ] INF c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux l=91 m=lambda$findBestConfFile$0 status=noValidConfFile, file=/host/etc/systemd/resolved.conf dns-proxy-server-1 | 05:17:08.898 [Thread-2 ] INF c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux l=122 m=init status=using, configFile=ResolvFile(path=/host/etc/resolv.conf, type=RESOLVCONF) dns-proxy-server-1 | 05:17:08.898 [Thread-2 ] DEB c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux l=57 m=configure status=configured, path=ResolvFile(path=/host/etc/resolv.conf, type=RESOLVCONF) ``` I stuck with the maximum version of 3.17.2, as all later versions would either through errors or would not advance past this point of booting up. Version 3.16.1 through 3.17.2 mostly worked without issue and the log would extend like this, resolving the docker container hostnames: ```bash dns-proxy-server-1 | 05:17:10.093 [Thread-9 ] DEB c.m.d.server.dns.RequestHandlerDefault l=48 m=solve status=solveReq, kind=udp, query=query=AAAA:g[987/9641] dns-proxy-server-1 | 05:17:10.093 [Thread-10 ] DEB c.m.d.server.dns.RequestHandlerDefault l=48 m=solve status=solveReq, kind=udp, query=query=A:grav.docker dns-proxy-server-1 | 05:17:10.120 [Thread-10 ] DEB c.m.d.s.d.s.d.application.ContainerSolvingService l=75 m=findAtPreferredNetworks status=networkNotFoundForContainer, name=dps dns-proxy-server-1 | 05:17:10.120 [Thread-9 ] DEB c.m.d.s.d.s.d.application.ContainerSolvingService l=75 m=findAtPreferredNetworks status=networkNotFoundForContainer, name=dps dns-proxy-server-1 | 05:17:10.121 [Thread-10 ] DEB c.m.d.s.d.s.d.application.ContainerSolvingService l=75 m=findAtPreferredNetworks status=networkNotFoundForContainer, name=bridge dns-proxy-server-1 | 05:17:10.121 [Thread-9 ] DEB c.m.d.s.d.s.d.application.ContainerSolvingService l=75 m=findAtPreferredNetworks status=networkNotFoundForContainer, name=bridge dns-proxy-server-1 | 05:17:10.121 [Thread-10 ] DEB c.m.d.s.d.s.d.application.ContainerSolvingService l=85 m=findAtPreferredNetworks status=predefinedNetworkNotFound, action=findSecondOption, searchedNetworks=[dps, bridge], container=/grav-grav-1 dns-proxy-server-1 | 05:17:10.121 [Thread-9 ] DEB c.m.d.s.d.s.d.application.ContainerSolvingService l=85 m=findAtPreferredNetworks status=predefinedNetworkNotFound, action=findSecondOption, searchedNetworks=[dps, bridge], container=/grav-grav-1 dns-proxy-server-1 | 05:17:10.121 [Thread-9 ] DEB c.m.d.d.dataprovider.DockerNetworkFacadeDefault l=52 m=findByName queryName=grav_default, foundName=grav_default dns-proxy-server-1 | 05:17:10.121 [Thread-10 ] DEB c.m.d.d.dataprovider.DockerNetworkFacadeDefault l=52 m=findByName queryName=grav_default, foundName=grav_default dns-proxy-server-1 | 05:17:10.121 [Thread-9 ] DEB c.m.d.s.d.s.d.application.ContainerSolvingService l=122 m=findContainerNetworkIp status=foundIp, containerNetworks=[grav_default], networkName=grav_default, driver=bridge, foundIp=null dns-proxy-server-1 | 05:17:10.121 [Thread-10 ] DEB c.m.d.s.d.s.d.application.ContainerSolvingService l=122 m=findContainerNetworkIp status=foundIp, containerNetworks=[grav_default], networkName=grav_default, driver=bridge, foundIp=172.24.0.2 dns-proxy-server-1 | 05:17:10.121 [Thread-10 ] DEB c.m.d.server.dns.RequestHandlerDefault l=87 m=solve0 status=solved, currentSolverTime=27, totalTime=27, solver=SolverDocker, req=query=A:grav.docker, res=rc=0, res=grav.docker. 30 IN A 172.24.0.2 dns-proxy-server-1 | 05:17:10.121 [Thread-10 ] DEB c.m.d.server.dns.RequestHandlerDefault l=102 m=solve0 status=solveSummary, summary=[(SolverSystem,0), (SolverDocker,27)] dns-proxy-server-1 | 05:17:10.121 [Thread-10 ] DEB c.m.dnsproxyserver.server.dns.solver.SolverCache l=44 m=lambda$handleRes$0 status=hotload, k=A-grav.docker, ttl=PT30S, simpleMsg=query=A:grav.docker dns-proxy-server-1 | 05:17:10.121 [Thread-10 ] DEB c.m.d.server.dns.RequestHandlerDefault l=53 m=solve status=solveRes, kind=udp, time=27, res=rc=0, res=grav.docker. 30 IN A 172.24.0.2, req=query=A:grav.docker dns-proxy-server-1 | 05:17:10.122 [Thread-10 ] DEB com.mageddo.dnsproxyserver.server.dns.UDPServer l=58 m=handle status=success, query=query=A:grav.docker, res=rc=0, res=grav.docker. 30 IN A 172.24.0.2, serverAddr=/0:0:0:0:0:0:0:0, clientAddr=/172.21.0.1:59500, dataLength=512, datagramLength=40 dns-proxy-server-1 | 05:17:10.122 [Thread-9 ] WAR c.m.d.server.dns.RequestHandlerDefault l=93 m=solve0 status=solverFailed, currentSolverTime=28, totalTime=28, solver=SolverDocker, query=query=AAAA:grav.docker, eClass=NullPointerException, msg=null ``` I'm not sure what specifically changed after that, that prevents it from resolving docker host with higher versions.
Author
Owner

@SimJoSt commented on GitHub (Dec 17, 2024):

@mageddo can you gauge if the issues I am describing fit the original issue or are a seperate one?

<!-- gh-comment-id:2548284238 --> @SimJoSt commented on GitHub (Dec 17, 2024): @mageddo can you gauge if the issues I am describing fit the original issue or are a seperate one?
Author
Owner

@mageddo commented on GitHub (Dec 17, 2024):

As all later versions would either through errors or would not advance past this point of booting up.

Hey @SimJoSt , are having success using DPS at the latest version despite the warning or what issue are you getting? Can you share the logs?

Why? Beats me :)

I suppose your /etc/systemd/resolved.conf is pointing to DPS container IP.

But the following error was not fixable, even when restarting the service:

Yep, that's just a warning telling you will need to restart systemd-resolved by yourself at the first time you use DPS because systemd-resolved need to be restarted when the config file is changed and DPS inside the container can´t do that.

When using /etc/resolv.conf you won't need to restart systemd-resolved, people say is better to use systemd-resolved anyway.

<!-- gh-comment-id:2548621615 --> @mageddo commented on GitHub (Dec 17, 2024): > As all later versions would either through errors or would not advance past this point of booting up. Hey @SimJoSt , are having success using DPS at the latest version despite the warning or what issue are you getting? Can you share the logs? > Why? Beats me :) I suppose your `/etc/systemd/resolved.conf` is pointing to DPS container IP. > But the following error was not fixable, even when restarting the service: Yep, that's just a warning telling you will need to restart systemd-resolved by yourself **at the first time you use DPS** because systemd-resolved need to be restarted when the config file is changed and DPS inside the container can´t do that. When using `/etc/resolv.conf ` you won't need to restart systemd-resolved, people say is better to use systemd-resolved anyway.
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#147
No description provided.