dns-proxy-server
dns-proxy-server copied to clipboard
Urgent: DPS breaks after upgrade to docker-ce version >25
What is Happening / What is expected
- Please describe how to reproduce the issue with a minimal example Upgrade docker-ce to version 25 and above, DSP will stop working due to outdated client API version.
client version 1.21 is too old. Minimum supported API version is 1.24, please upgrade your client to a newer version
- Describe what you expected to happen and why upgrade client libs to meet the dependencies of docker API
Specs
- OS: Debian Bullseye
- Docker Version: 25
- DPS Version: docker image latest (0f1a63d45c2f)
- Attach DPS Log file
WAR c.m.d.dnsconfigurator.DnsConfigurators l=58 m=lambda$configurationHook$0 status=failedToConfigureAsDefaultDns, path=/host/etc/systemd/resolved.conf,/host/et c/resolv.conf,/etc/systemd/resolved.conf,/etc/resolv.conf, msg=Status 400: client version 1.21 is too old. Minimum supported API version is 1.24, please upgrade your client to a newer version
com.github.dockerjava.api.exception.BadRequestException: Status 400: client version 1.21 is too old. Minimum supported API version is 1.24, please upgrade your client to a newer version
I have the same problem. I did some research on it and believe that it has something to do with the way that the DPS tries to connect to the API, probably specifying a wrong Docker API version, at least that's the feeling I get from similar issues like this similar issue in telegraf service. They fixed it with a very simple change in the docker client: git commit with fix.
However, it seems like this project is abandoned. I don't expect anyone to fix this or commit to this project. :/
Same problem here when docker version is >= 25 On another system, where I have docker 24.0.7 build afdd53b4e3, all works fine.
@friimaind yeah, the issue is starting to become very clear here. Thanks for your report. I'd guess that it'll be an easy fix for someone with a solid knowledge of Java. Still, this project seems to be abandoned and no longer maintained. Maybe anybody out there who wants to maintain and fix a Java application? ^^
+1. I have same issue. Hoping for someone with java knowledge to update the client API.
Same problem here when docker version is >= 25
Getting the same exception with Docker version 25.0.1, build 29cf629
on Ubuntu 20.04.5 LTS
Client: Docker Engine - Community
Version: 25.0.1
API version: 1.44
Go version: go1.21.6
Git commit: 29cf629
Built: Tue Jan 23 23:09:25 2024
OS/Arch: linux/amd64
Context: default
API versions before v1.24 are deprecated.
https://github.com/mageddo/dns-proxy-server/blob/40b8b74deecca74d47b9a3f4ee1247dd2a9718d4/src/main/java/com/mageddo/dnsproxyserver/quarkus/DockerConfig.java#L23-L26
So - just a dependency update? API Version for Docker 25 is 1.44
https://github.com/docker-java/docker-java/blob/main/docker-java-core/src/main/java/com/github/dockerjava/core/RemoteApiVersion.java#L58
For those having the issue with docker version > 25, please check this thread of fnkr. This is an ideal alternative.
Thanks,
Same problem!
Working:
sudo apt-get install docker-ce=5:24.0.7-1~ubuntu.22.04~jammy
paul@behemoth ~> dpkg -l | grep docker
ii docker-buildx-plugin 0.12.1-1~ubuntu.22.04~jammy amd64 Docker Buildx cli plugin.
ii docker-ce 5:24.0.7-1~ubuntu.22.04~jammy amd64 Docker: the open-source application container engine
ii docker-ce-cli 5:25.0.1-1~ubuntu.22.04~jammy amd64 Docker CLI: the open-source application container engine
ii docker-ce-rootless-extras 5:25.0.1-1~ubuntu.22.04~jammy amd64 Rootless support for Docker.
ii docker-compose-plugin 2.24.2-1~ubuntu.22.04~jammy amd64 Docker Compose (V2) plugin for the Docker CLI.
paul@behemoth ~> docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock defreitas/dns-proxy-server
14:50:12.416 [main ] INF com.mageddo.dnsproxyserver.config.Configs l=166 m=build status=configuring, configFile=/app/conf/config.json
14:50:12.424 [main ] INF com.mageddo.dnsproxyserver.docker.EventListener l=33 m=onStart status=binding-docker-events, dockerConnected=true
14:50:12.424 [main ] INF c.m.dnsproxyserver.docker.DpsContainerManager l=40 m=setupNetwork status=dpsNetwork, active=false
14:50:12.424 [main ] INF com.mageddo.dnsproxyserver.docker.EventListener l=41 m=onStart status=autoConnectDpsNetworkDisabled, dpsNetwork=false, dpsNetworkAutoConnect=false
14:50:12.429 [main ] INF c.mageddo.dnsproxyserver.server.dns.UDPServerPool l=31 m=start Starting UDP server, addresses=/0.0.0.0:53
14:50:12.429 [main ] INF c.mageddo.dnsproxyserver.server.dns.ServerStarter l=32 m=start status=startingDnsServer, protocol=UDP_TCP, port=53
14:50:12.429 [main ] INF com.mageddo.http.WebServer l=134 m=start status=startingWebServer, port=5380
14:50:12.433 [Thread-4 ] INF com.mageddo.dnsproxyserver.server.dns.TCPServer l=50 m=start0 status=tcpServerStarting, port=53
14:50:17.434 [Thread-2 ] WAR c.m.dnsproxyserver.docker.DpsContainerManager l=102 m=findDpsContainer status=multiple-dps-containers-found, action=using-the-first, containers=/exciting_rhodes, /dps
14:50:17.442 [Thread-2 ] INF c.m.d.dnsconfigurator.DnsConfigurators l=112 m=getInstance0 usingDnsConfigurator=DnsConfiguratorLinux
14:50:17.442 [Thread-2 ] INF c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux l=91 m=lambda$findBestConfFile$0 status=noValidConfFile, file=/host/etc/systemd/resolved.conf
14:50:17.442 [Thread-2 ] INF c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux l=91 m=lambda$findBestConfFile$0 status=noValidConfFile, file=/host/etc/resolv.conf
14:50:17.442 [Thread-2 ] INF c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux l=91 m=lambda$findBestConfFile$0 status=noValidConfFile, file=/etc/systemd/resolved.conf
14:50:17.442 [Thread-2 ] INF c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux l=122 m=init status=using, configFile=ResolvFile(path=/etc/resolv.conf, type=RESOLVCONF)
Not working:
sudo apt-get install docker-ce=5:25.0.0-1~ubuntu.22.04~jammy
paul@behemoth ~> dpkg -l | grep docker
ii docker-buildx-plugin 0.12.1-1~ubuntu.22.04~jammy amd64 Docker Buildx cli plugin.
ii docker-ce 5:25.0.0-1~ubuntu.22.04~jammy amd64 Docker: the open-source application container engine
ii docker-ce-cli 5:25.0.1-1~ubuntu.22.04~jammy amd64 Docker CLI: the open-source application container engine
ii docker-ce-rootless-extras 5:25.0.1-1~ubuntu.22.04~jammy amd64 Rootless support for Docker.
ii docker-compose-plugin 2.24.2-1~ubuntu.22.04~jammy amd64 Docker Compose (V2) plugin for the Docker CLI.
aul@behemoth ~ [SIGINT]> docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock defreitas/dns-proxy-server
13:59:46.536 [main ] INF com.mageddo.dnsproxyserver.config.Configs l=166 m=build status=configuring, configFile=/app/conf/config.json
13:59:46.538 [main ] INF com.mageddo.dnsproxyserver.docker.EventListener l=33 m=onStart status=binding-docker-events, dockerConnected=false
13:59:46.538 [main ] INF c.mageddo.dnsproxyserver.server.dns.UDPServerPool l=31 m=start Starting UDP server, addresses=/0.0.0.0:53
13:59:46.542 [Thread-4 ] INF com.mageddo.dnsproxyserver.server.dns.TCPServer l=50 m=start0 status=tcpServerStarting, port=53
13:59:46.542 [main ] INF c.mageddo.dnsproxyserver.server.dns.ServerStarter l=32 m=start status=startingDnsServer, protocol=UDP_TCP, port=53
13:59:46.542 [main ] INF com.mageddo.http.WebServer l=134 m=start status=startingWebServer, port=5380
13:59:51.540 [Thread-2 ] WAR c.m.d.dnsconfigurator.DnsConfigurators l=58 m=lambda$configurationHook$0 status=failedToConfigureAsDefaultDns, path=/host/etc/systemd/resolved.conf,/host/etc/resolv.conf,/etc/systemd/resolved.conf,/etc/resolv.conf, msg=Status 400: client version 1.21 is too old. Minimum supported API version is 1.24, please upgrade your client to a newer version
com.github.dockerjava.api.exception.BadRequestException: Status 400: client version 1.21 is too old. Minimum supported API version is 1.24, please upgrade your client to a newer version
at com.github.dockerjava.core.DefaultInvocationBuilder.execute(DefaultInvocationBuilder.java:237)
at com.github.dockerjava.core.DefaultInvocationBuilder.get(DefaultInvocationBuilder.java:202)
at com.github.dockerjava.core.DefaultInvocationBuilder.get(DefaultInvocationBuilder.java:74)
at com.github.dockerjava.core.exec.ListContainersCmdExec.execute(ListContainersCmdExec.java:44)
at com.github.dockerjava.core.exec.ListContainersCmdExec.execute(ListContainersCmdExec.java:15)
at com.github.dockerjava.core.exec.AbstrSyncDockerCmdExec.exec(AbstrSyncDockerCmdExec.java:21)
at com.github.dockerjava.core.command.AbstrDockerCmd.exec(AbstrDockerCmd.java:35)
at com.mageddo.dnsproxyserver.docker.DpsContainerManager.findDpsContainer(DpsContainerManager.java:99)
at com.mageddo.dnsproxyserver.docker.DpsContainerManager.findDpsContainerIP(DpsContainerManager.java:113)
at com.mageddo.dnsproxyserver.dnsconfigurator.DpsIpDiscover.findDpsIP(DpsIpDiscover.java:25)
at com.mageddo.dnsproxyserver.dnsconfigurator.DnsConfigurators.findIpAddr(DnsConfigurators.java:70)
at com.mageddo.dnsproxyserver.dnsconfigurator.DnsConfigurators.lambda$configurationHook$0(DnsConfigurators.java:50)
at [email protected]/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
at [email protected]/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358)
at [email protected]/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
at [email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at [email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at [email protected]/java.lang.Thread.run(Thread.java:1589)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:775)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:203)
Workaround: lock docker v24!
sudo apt-mark hold docker-ce
I have created a PR with the fix. Not sure if it will get merged so I have created a release on my fork and a docker image ghcr.io/thisisqasim/dns-proxy-server
I have created a PR with the fix. Not sure if it will get merged so I have created a release on my fork and a docker image
ghcr.io/thisisqasim/dns-proxy-server
Thanks @ThisIsQasim , your image is working good in my case.
OS: Pop!_OS 22.04 LTS Docker: version 25.0.1, build 29cf629
Any update?
I need an update too ! thx
updated 3.16.2 is out. Can anyone confirms it fixes the issue?
Fixed for me