Closed pschiffe closed 4 months ago
MG_LOG_LEVEL: ERROR
env var seems to "resolve" this
I've no idea why it's happening, it's a very weird scenario for me. Looks like your network Gateway IP is set to fddb:21e4:36d4:1::1/64
instead of fddb:21e4:36d4:1::1
, /64
it's supposed to be set at t he Subnet, not at the Gateway IP.
The behavior is related to that snippet of code
Please, check your network configs by running
$ docker inspect networkName
My example bellow (I wasn´t allowed to create the network with an invalid gateway IP, but don't know, maybe it was possible in past versions of docker).
$ docker network create --subnet="fddb:21e4:36d4:1::/64" --gateway="fddb:21e4:36d4:1::1" --ipv6 trash1
$ docker network inspect trash1
json
[
{
"Name": "trash1",
"Id": "a56e3fdaf911993a4bd57aea6e75b5f8df0c88ea79ab62fb618bb453fd7ed8c9",
"Created": "2024-05-02T16:18:06.369732489-03:00",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": true,
"IPAM": {
"Driver": "default",
"Options": {},
"Config": [
{
"Subnet": "fddb:21e4:36d4:1::/64",
"Gateway": "fddb:21e4:36d4:1::1"
},
{
"Subnet": "172.24.0.0/16",
"Gateway": "172.24.0.1"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {},
"Options": {},
"Labels": {}
}
]
The IPv6 gateway and subnet is automatically assigned by Docker in my case, I've just configured the pools in the Docker config:
# cat /etc/docker/daemon.json
{
"experimental": true,
"ip6tables": true,
"default-address-pools": [
{ "base": "172.17.0.0/16", "size": 16 },
{ "base": "172.18.0.0/16", "size": 16 },
{ "base": "172.19.0.0/16", "size": 16 },
{ "base": "172.20.0.0/14", "size": 16 },
{ "base": "172.24.0.0/14", "size": 16 },
{ "base": "172.28.0.0/14", "size": 16 },
{ "base": "192.168.0.0/16", "size": 20 },
{ "base": "fddb:21e4:36d4:1::/64", "size": 64 },
{ "base": "fddb:21e4:36d4:2::/64", "size": 64 },
{ "base": "fddb:21e4:36d4:3::/64", "size": 64 },
{ "base": "fddb:21e4:36d4:4::/64", "size": 64 },
{ "base": "fddb:21e4:36d4:5::/64", "size": 64 },
{ "base": "fddb:21e4:36d4:6::/64", "size": 64 },
{ "base": "fddb:21e4:36d4:7::/64", "size": 64 },
{ "base": "fddb:21e4:36d4:8::/64", "size": 64 },
{ "base": "fddb:21e4:36d4:9::/64", "size": 64 },
{ "base": "fddb:21e4:36d4:a::/64", "size": 64 },
{ "base": "fddb:21e4:36d4:b::/64", "size": 64 },
{ "base": "fddb:21e4:36d4:c::/64", "size": 64 },
{ "base": "fddb:21e4:36d4:d::/64", "size": 64 },
{ "base": "fddb:21e4:36d4:e::/64", "size": 64 },
{ "base": "fddb:21e4:36d4:f::/64", "size": 64 },
{ "base": "fddb:21e4:36d4:10::/64", "size": 64 },
{ "base": "fddb:21e4:36d4:11::/64", "size": 64 },
{ "base": "fddb:21e4:36d4:12::/64", "size": 64 },
{ "base": "fddb:21e4:36d4:13::/64", "size": 64 },
{ "base": "fddb:21e4:36d4:14::/64", "size": 64 },
{ "base": "fddb:21e4:36d4:15::/64", "size": 64 },
{ "base": "fddb:21e4:36d4:16::/64", "size": 64 },
{ "base": "fddb:21e4:36d4:17::/64", "size": 64 },
{ "base": "fddb:21e4:36d4:18::/64", "size": 64 },
{ "base": "fddb:21e4:36d4:19::/64", "size": 64 },
{ "base": "fddb:21e4:36d4:1a::/64", "size": 64 },
{ "base": "fddb:21e4:36d4:1b::/64", "size": 64 },
{ "base": "fddb:21e4:36d4:1c::/64", "size": 64 },
{ "base": "fddb:21e4:36d4:1d::/64", "size": 64 },
{ "base": "fddb:21e4:36d4:1e::/64", "size": 64 },
{ "base": "fddb:21e4:36d4:1f::/64", "size": 64 }
]
}
# docker network inspect phpmyadmin
[
{
"Name": "phpmyadmin",
"Id": "282a7736c6b1cd6a3272b63828f40d91602b63707b4fefb95c5568429049c462",
"Created": "2023-09-22T19:11:51.523662906Z",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": true,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "172.19.0.0/16",
"Gateway": "172.19.0.1"
},
{
"Subnet": "fddb:21e4:36d4:1::/64",
"Gateway": "fddb:21e4:36d4:1::1"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"048190dac5dc7f038647ccde8612b5cf2b70538e65ef4aad197bcd5e1a504161": {
"Name": "phpmyadmin",
"EndpointID": "d474fd728c14d5beadf9bf4a94e29807c25de56b7926d633ea2c92e3ee4cf207",
"MacAddress": "02:42:ac:13:00:02",
"IPv4Address": "172.19.0.2/16",
"IPv6Address": "fddb:21e4:36d4:1::2/64"
}
},
"Options": {},
"Labels": {}
}
]
# ip a | grep 'fddb:21e4:36d4:1::1' -B4 -A5
5: br-282a7736c6b1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 02:42:e5:61:a1:e1 brd ff:ff:ff:ff:ff:ff
inet 172.19.0.1/16 brd 172.19.255.255 scope global br-282a7736c6b1
valid_lft forever preferred_lft forever
inet6 fddb:21e4:36d4:1::1/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::42:e5ff:fe61:a1e1/64 scope link proto kernel_ll
valid_lft forever preferred_lft forever
inet6 fe80::1/64 scope link
valid_lft forever preferred_lft forever
Your network inspect looks fine, I doesn't explain the execution error.
If you are still getting the the issue, please change the log level to TRACE, simulate the scenario and attach the logs.
Then execute the command bellow with the network id of the network logged at status=bestNetwork, network=$NETWORK_NAME, ip=
right before the exception and attach the result.
$ curl -X GET --unix-socket /var/run/docker.sock 'http://localhost/v1.21/networks/$NETWORK_ID'
Hm, I've upgraded to 3.16.3 and set log level to INFO, but it seems that I'm not getting these errors anymore. I also did a bit of rework of the dns proxy setup since I started with it, so that could be related as well.
I'm sorry, I don't have anything else for you. Feel free to close this issue and I'll reopen if it starts again.
No problem, happy the issue is fixed for now, thanks for your patience.
Hello @mageddo, I'm still seeing this issue. Usually after the container is created, it's not possible to resolve it. Tried with the latest DPS version 3.19.5
. When looking at the docker network inspect, there's is this weird address :( "Gateway": "fddb:21e4:36d4:9::1/64"
. Other networks don't have the /64
in gateway, not sure when it disappears :/
$ docker network inspect example
[
{
"Name": "example",
"Id": "8f1dcdb34113902721825c22af1c0c0dabed062ef2f3aaf0685b049bc8c34625",
"Created": "2024-06-17T20:20:38.990713544Z",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": true,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "172.26.0.0/16",
"Gateway": "172.26.0.1"
},
{
"Subnet": "fddb:21e4:36d4:9::/64",
"Gateway": "fddb:21e4:36d4:9::1/64"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"ffaec05f2942c836d54b320ed9306608e7701f455017a49e8587540d0f2ebbbb": {
"Name": "example",
"EndpointID": "5ef4a74a512be0e71056eea10204d580e1fcb936a75d5fd09cdf68c645f7ac07",
"MacAddress": "02:42:ac:1a:00:02",
"IPv4Address": "172.26.0.2/16",
"IPv6Address": "fddb:21e4:36d4:9::2/64"
}
},
"Options": {},
"Labels": {}
}
]
$ dig @127.0.0.1 -p 5300 example.docker
; <<>> DiG 9.19.22 <<>> @127.0.0.1 -p 5300 example.docker
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 18502
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; COOKIE: 50d15bd19653848e (echoed)
;; QUESTION SECTION:
;example.docker. IN A
;; Query time: 26 msec
;; SERVER: 127.0.0.1#5300(127.0.0.1) (UDP)
;; WHEN: Mon Jun 17 21:51:32 UTC 2024
;; MSG SIZE rcvd: 65
$ docker inspect example
...
"NetworkSettings": {
"Bridge": "",
"SandboxID": "191cefca886bf4dfbdcce52899b6997de98f8b4c6f71e9bddfe7caaa88aee5d4",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {
"8080/tcp": null
},
"SandboxKey": "/var/run/docker/netns/191cefca886b",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "",
"Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"MacAddress": "",
"Networks": {
"example": {
"IPAMConfig": null,
"Links": null,
"Aliases": [
"ffaec05f2942",
"example"
],
"NetworkID": "8f1dcdb34113902721825c22af1c0c0dabed062ef2f3aaf0685b049bc8c34625",
"EndpointID": "5ef4a74a512be0e71056eea10204d580e1fcb936a75d5fd09cdf68c645f7ac07",
"Gateway": "172.26.0.1",
"IPAddress": "172.26.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "fddb:21e4:36d4:9::1",
"GlobalIPv6Address": "fddb:21e4:36d4:9::2",
"GlobalIPv6PrefixLen": 64,
"MacAddress": "02:42:ac:1a:00:02",
"DriverOpts": null
}
}
}
21:48:32.055 [Thread-29 ] DEB c.m.d.server.dns.RequestHandlerDefault l=52 m=handle status=solveReq, kind=udp, query=query=AAAA:example.docker
21:48:32.056 [Thread-29 ] TRA com.mageddo.dnsproxyserver.solver.SolverCache l=37 m=lambda$handleRes$0 status=lookup, key=AAAA-example.docker, req=query=AAAA:example.docker
21:48:32.056 [Thread-29 ] TRA c.m.d.server.dns.RequestHandlerDefault l=114 m=solveAndSummarize status=trySolve, solver=SolverSystem, req=query=AAAA:example.docker
21:48:32.056 [Thread-29 ] TRA c.m.d.server.dns.RequestHandlerDefault l=118 m=solveAndSummarize status=notSolved, currentSolverTime=0, totalTime=0, solver=SolverSystem, req=query=AAAA:example.docker
21:48:32.055 [Thread-31 ] DEB c.m.d.server.dns.RequestHandlerDefault l=52 m=handle status=solveReq, kind=udp, query=query=A:example.docker
21:48:32.056 [Thread-29 ] TRA c.m.d.server.dns.RequestHandlerDefault l=114 m=solveAndSummarize status=trySolve, solver=SolverDocker, req=query=AAAA:example.docker
21:48:32.056 [Thread-31 ] TRA com.mageddo.dnsproxyserver.solver.SolverCache l=37 m=lambda$handleRes$0 status=lookup, key=A-example.docker, req=query=A:example.docker
21:48:32.056 [Thread-31 ] TRA c.m.d.server.dns.RequestHandlerDefault l=114 m=solveAndSummarize status=trySolve, solver=SolverSystem, req=query=A:example.docker
21:48:32.056 [Thread-31 ] TRA c.m.d.server.dns.RequestHandlerDefault l=118 m=solveAndSummarize status=notSolved, currentSolverTime=0, totalTime=0, solver=SolverSystem, req=query=A:example.docker
21:48:32.056 [Thread-31 ] TRA c.m.d.server.dns.RequestHandlerDefault l=114 m=solveAndSummarize status=trySolve, solver=SolverDocker, req=query=A:example.docker
21:48:32.059 [Thread-26 ] DEB c.m.d.docker.application.DockerConnectionCheck l=50 m=updateStatus status=updatingDockerStatus, null=false, expired=true
21:48:32.073 [Thread-29 ] TRA c.m.d.solver.docker.dataprovider.Docker l=44 m=buildFromServiceName status=serviceFindResult, service=image-linux-aarch64
21:48:32.075 [Thread-31 ] TRA c.m.d.solver.docker.dataprovider.Docker l=44 m=buildFromServiceName status=serviceFindResult, service=image-linux-aarch64
21:48:32.075 [Thread-29 ] TRA c.m.d.solver.docker.dataprovider.Docker l=44 m=buildFromServiceName status=serviceFindResult, service=null
21:48:32.080 [Thread-31 ] TRA c.m.d.solver.docker.dataprovider.Docker l=44 m=buildFromServiceName status=serviceFindResult, service=null
21:48:32.080 [Thread-29 ] TRA c.m.d.solver.docker.dataprovider.Docker l=44 m=buildFromServiceName status=serviceFindResult, service=null
21:48:32.082 [Thread-29 ] TRA c.m.d.solver.docker.dataprovider.Docker l=44 m=buildFromServiceName status=serviceFindResult, service=null
21:48:32.082 [Thread-31 ] TRA c.m.d.solver.docker.dataprovider.Docker l=44 m=buildFromServiceName status=serviceFindResult, service=null
21:48:32.083 [Thread-31 ] TRA c.m.d.solver.docker.dataprovider.Docker l=44 m=buildFromServiceName status=serviceFindResult, service=null
21:48:32.084 [Thread-31 ] TRA c.m.d.solver.docker.dataprovider.Docker l=44 m=buildFromServiceName status=serviceFindResult, service=null
21:48:32.084 [Thread-29 ] TRA c.m.d.solver.docker.dataprovider.Docker l=44 m=buildFromServiceName status=serviceFindResult, service=null
21:48:32.085 [Thread-29 ] TRA c.m.d.solver.docker.dataprovider.Docker l=44 m=buildFromServiceName status=serviceFindResult, service=null
21:48:32.085 [Thread-31 ] TRA c.m.d.solver.docker.dataprovider.Docker l=44 m=buildFromServiceName status=serviceFindResult, service=null
21:48:32.087 [Thread-29 ] TRA c.m.d.solver.docker.dataprovider.Docker l=44 m=buildFromServiceName status=serviceFindResult, service=null
21:48:32.087 [Thread-31 ] TRA c.m.d.solver.docker.dataprovider.Docker l=44 m=buildFromServiceName status=serviceFindResult, service=null
21:48:32.088 [Thread-29 ] TRA c.m.d.solver.docker.dataprovider.Docker l=44 m=buildFromServiceName status=serviceFindResult, service=null
21:48:32.088 [Thread-31 ] TRA c.m.d.solver.docker.dataprovider.Docker l=44 m=buildFromServiceName status=serviceFindResult, service=null
21:48:32.090 [Thread-29 ] TRA c.m.d.solver.docker.dataprovider.Docker l=44 m=buildFromServiceName status=serviceFindResult, service=null
21:48:32.090 [Thread-31 ] TRA c.m.d.solver.docker.dataprovider.Docker l=44 m=buildFromServiceName status=serviceFindResult, service=null
21:48:32.091 [Thread-31 ] TRA c.m.d.solver.docker.dataprovider.Docker l=44 m=buildFromServiceName status=serviceFindResult, service=null
21:48:32.091 [Thread-29 ] TRA c.m.d.solver.docker.dataprovider.Docker l=44 m=buildFromServiceName status=serviceFindResult, service=null
21:48:32.092 [Thread-31 ] TRA c.m.d.solver.docker.dataprovider.Docker l=44 m=buildFromServiceName status=serviceFindResult, service=null
21:48:32.092 [Thread-31 ] DEB c.m.d.s.docker.application.ContainerSolvingServicel=75 m=findAtPreferredNetworks status=networkNotFoundForContainer, name=dps
21:48:32.092 [Thread-31 ] DEB c.m.d.s.docker.application.ContainerSolvingServicel=75 m=findAtPreferredNetworks status=networkNotFoundForContainer, name=bridge
21:48:32.093 [Thread-31 ] DEB c.m.d.s.docker.application.ContainerSolvingServicel=85 m=findAtPreferredNetworks status=predefinedNetworkNotFound, action=findSecondOption, searchedNetworks=[dps, bridge], container=/example
21:48:32.094 [Thread-31 ] DEB c.m.d.d.dataprovider.DockerNetworkFacadeDefault l=52 m=findByName queryName=example, foundName=example
21:48:32.094 [Thread-31 ] DEB c.m.d.s.docker.dataprovider.mapper.NetworkMapper l=14 m=of status=mapping, networkName=example
21:48:32.094 [Thread-31 ] WAR c.m.d.server.dns.RequestHandlerDefault l=101 m=solveAndSummarizeHandlingError status=solverFailed, currentSolverTime=37, totalTime=37, solver=SolverDocker, query=query=A:example.docker, eClass=RuntimeException, msg=Array of bytes is not a valid IP representation: 'fddb:21e4:36d4:9::1/64' is not an IP string literal.
java.lang.RuntimeException: Array of bytes is not a valid IP representation: 'fddb:21e4:36d4:9::1/64' is not an IP string literal.
at com.mageddo.net.IpImpl.invalidAddressEx(IpImpl.java:100)
at com.mageddo.net.IpImpl.build(IpImpl.java:94)
at com.mageddo.net.IpImpl.<init>(IpImpl.java:20)
at com.mageddo.net.IpImpl.of(IpImpl.java:62)
at com.mageddo.net.IP.of(IP.java:23)
at java.base@19.0.2/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base@19.0.2/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base@19.0.2/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1602)
at java.base@19.0.2/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
at java.base@19.0.2/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
at java.base@19.0.2/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
at java.base@19.0.2/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base@19.0.2/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
at java.base@19.0.2/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base@19.0.2/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:647)
at com.mageddo.dnsproxyserver.solver.docker.dataprovider.mapper.NetworkMapper.findGatewayIp(NetworkMapper.java:47)
at com.mageddo.dnsproxyserver.solver.docker.dataprovider.mapper.NetworkMapper.of(NetworkMapper.java:21)
at com.mageddo.dnsproxyserver.solver.docker.dataprovider.NetworkDAODefault.findByName(NetworkDAODefault.java:38)
at com.mageddo.dnsproxyserver.solver.docker.application.ContainerSolvingService.lambda$findAtAvailableNetworksOptional$3(ContainerSolvingService.java:98)
at java.base@19.0.2/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base@19.0.2/java.util.Iterator.forEachRemaining(Iterator.java:133)
at java.base@19.0.2/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1921)
at java.base@19.0.2/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base@19.0.2/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base@19.0.2/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
at java.base@19.0.2/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base@19.0.2/java.util.stream.ReferencePipeline.reduce(ReferencePipeline.java:662)
at java.base@19.0.2/java.util.stream.ReferencePipeline.min(ReferencePipeline.java:703)
at com.mageddo.dnsproxyserver.solver.docker.application.ContainerSolvingService.findAtAvailableNetworksOptional(ContainerSolvingService.java:105)
at com.mageddo.dnsproxyserver.solver.docker.application.ContainerSolvingService.lambda$findBestIpMatch$1(ContainerSolvingService.java:65)
at java.base@19.0.2/java.util.Optional.or(Optional.java:313)
at com.mageddo.dnsproxyserver.solver.docker.application.ContainerSolvingService.findBestIpMatch(ContainerSolvingService.java:65)
at com.mageddo.dnsproxyserver.solver.docker.application.ContainerSolvingService.lambda$findBestMatch$0(ContainerSolvingService.java:42)
at java.base@19.0.2/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base@19.0.2/java.util.AbstractList$RandomAccessSpliterator.tryAdvance(AbstractList.java:708)
at java.base@19.0.2/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
at java.base@19.0.2/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
at java.base@19.0.2/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
at java.base@19.0.2/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base@19.0.2/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
at java.base@19.0.2/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base@19.0.2/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:647)
at com.mageddo.dnsproxyserver.solver.docker.application.ContainerSolvingService.findBestMatch(ContainerSolvingService.java:44)
at com.mageddo.dnsproxyserver.solver.SolverDocker.lambda$handle$0(SolverDocker.java:40)
at com.mageddo.dnsproxyserver.solver.HostnameMatcher.match(HostnameMatcher.java:22)
at com.mageddo.dnsproxyserver.solver.SolverDocker.handle(SolverDocker.java:39)
at com.mageddo.dnsproxyserver.server.dns.RequestHandlerDefault.solveAndSummarize(RequestHandlerDefault.java:115)
at com.mageddo.dnsproxyserver.server.dns.RequestHandlerDefault.solveAndSummarizeHandlingError(RequestHandlerDefault.java:99)
at com.mageddo.dnsproxyserver.server.dns.RequestHandlerDefault.solve(RequestHandlerDefault.java:82)
at com.mageddo.dnsproxyserver.server.dns.RequestHandlerDefault.solveFixingCacheTTL(RequestHandlerDefault.java:73)
at com.mageddo.dnsproxyserver.solver.SolverCache.lambda$handleRes$0(SolverCache.java:38)
at com.mageddo.commons.caching.LruTTLCache.lambda$computeIfAbsentWithTTL$1(LruTTLCache.java:94)
at java.base@19.0.2/java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1916)
at com.mageddo.commons.caching.LruTTLCache.lambda$computeIfAbsentWithTTL$2(LruTTLCache.java:88)
at java.base@19.0.2/java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1916)
at com.mageddo.commons.caching.LruTTLCache.computeIfAbsentWithTTL(LruTTLCache.java:86)
at com.mageddo.dnsproxyserver.solver.SolverCache.handleRes(SolverCache.java:36)
at com.mageddo.dnsproxyserver.solver.SolverCache.handle(SolverCache.java:31)
at com.mageddo.dnsproxyserver.server.dns.RequestHandlerDefault.solveCaching(RequestHandlerDefault.java:66)
at com.mageddo.dnsproxyserver.server.dns.RequestHandlerDefault.handle(RequestHandlerDefault.java:54)
at com.mageddo.dnsserver.UDPServer.handle(UDPServer.java:55)
at com.mageddo.dnsserver.UDPServer.lambda$start0$0(UDPServer.java:43)
at java.base@19.0.2/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
at java.base@19.0.2/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base@19.0.2/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base@19.0.2/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base@19.0.2/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)
Caused by: java.lang.IllegalArgumentException: 'fddb:21e4:36d4:9::1/64' is not an IP string literal.
at com.google.common.net.InetAddresses.formatIllegalArgumentException(InetAddresses.java:1035)
at com.google.common.net.InetAddresses.forString(InetAddresses.java:154)
at com.mageddo.net.IpImpl.build(IpImpl.java:92)
... 67 common frames omitted
21:48:32.094 [Thread-31 ] DEB c.m.d.server.dns.RequestHandlerDefault l=90 m=solve status=solveSummary, summary=[(SolverSystem,0)]
21:48:32.094 [Thread-31 ] WAR c.m.d.server.dns.RequestHandlerDefault l=56 m=handle status=solverFailed, totalTime=38, eClass=NullPointerException, msg=null
java.lang.NullPointerException: null
at com.mageddo.dnsproxyserver.server.dns.RequestHandlerDefault.solve(RequestHandlerDefault.java:83)
at com.mageddo.dnsproxyserver.server.dns.RequestHandlerDefault.solveFixingCacheTTL(RequestHandlerDefault.java:73)
at com.mageddo.dnsproxyserver.solver.SolverCache.lambda$handleRes$0(SolverCache.java:38)
at com.mageddo.commons.caching.LruTTLCache.lambda$computeIfAbsentWithTTL$1(LruTTLCache.java:94)
at java.base@19.0.2/java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1916)
at com.mageddo.commons.caching.LruTTLCache.lambda$computeIfAbsentWithTTL$2(LruTTLCache.java:88)
at java.base@19.0.2/java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1916)
at com.mageddo.commons.caching.LruTTLCache.computeIfAbsentWithTTL(LruTTLCache.java:86)
at com.mageddo.dnsproxyserver.solver.SolverCache.handleRes(SolverCache.java:36)
at com.mageddo.dnsproxyserver.solver.SolverCache.handle(SolverCache.java:31)
at com.mageddo.dnsproxyserver.server.dns.RequestHandlerDefault.solveCaching(RequestHandlerDefault.java:66)
at com.mageddo.dnsproxyserver.server.dns.RequestHandlerDefault.handle(RequestHandlerDefault.java:54)
at com.mageddo.dnsserver.UDPServer.handle(UDPServer.java:55)
at com.mageddo.dnsserver.UDPServer.lambda$start0$0(UDPServer.java:43)
at java.base@19.0.2/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
at java.base@19.0.2/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base@19.0.2/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base@19.0.2/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base@19.0.2/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)
21:48:32.094 [Thread-29 ] TRA c.m.d.solver.docker.dataprovider.Docker l=44 m=buildFromServiceName status=serviceFindResult, service=null
21:48:32.094 [Thread-29 ] DEB c.m.d.s.docker.application.ContainerSolvingServicel=75 m=findAtPreferredNetworks status=networkNotFoundForContainer, name=dps
21:48:32.096 [Thread-29 ] DEB c.m.d.s.docker.application.ContainerSolvingServicel=75 m=findAtPreferredNetworks status=networkNotFoundForContainer, name=bridge
21:48:32.096 [Thread-29 ] DEB c.m.d.s.docker.application.ContainerSolvingServicel=85 m=findAtPreferredNetworks status=predefinedNetworkNotFound, action=findSecondOption, searchedNetworks=[dps, bridge], container=/example
21:48:32.094 [Thread-31 ] DEB com.mageddo.dnsserver.UDPServer l=59 m=handle status=success, query=rc=3, query=A:example.docker, res=rc=3, query=A:example.docker, serverAddr=/0:0:0:0:0:0:0:0, clientAddr=/172.18.0.1:44581, dataLength=512, datagramLength=53
21:48:32.097 [Thread-29 ] DEB c.m.d.d.dataprovider.DockerNetworkFacadeDefault l=52 m=findByName queryName=example, foundName=example
21:48:32.097 [Thread-29 ] DEB c.m.d.s.docker.dataprovider.mapper.NetworkMapper l=14 m=of status=mapping, networkName=example
21:48:32.098 [Thread-29 ] WAR c.m.d.server.dns.RequestHandlerDefault l=101 m=solveAndSummarizeHandlingError status=solverFailed, currentSolverTime=42, totalTime=42, solver=SolverDocker, query=query=AAAA:example.docker, eClass=RuntimeException, msg=Array of bytes is not a valid IP representation: 'fddb:21e4:36d4:9::1/64' is not an IP string literal.
java.lang.RuntimeException: Array of bytes is not a valid IP representation: 'fddb:21e4:36d4:9::1/64' is not an IP string literal.
at com.mageddo.net.IpImpl.invalidAddressEx(IpImpl.java:100)
at com.mageddo.net.IpImpl.build(IpImpl.java:94)
at com.mageddo.net.IpImpl.<init>(IpImpl.java:20)
at com.mageddo.net.IpImpl.of(IpImpl.java:62)
at com.mageddo.net.IP.of(IP.java:23)
at java.base@19.0.2/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base@19.0.2/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base@19.0.2/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1602)
at java.base@19.0.2/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
at java.base@19.0.2/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
at java.base@19.0.2/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
at java.base@19.0.2/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base@19.0.2/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
at java.base@19.0.2/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base@19.0.2/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:647)
at com.mageddo.dnsproxyserver.solver.docker.dataprovider.mapper.NetworkMapper.findGatewayIp(NetworkMapper.java:47)
at com.mageddo.dnsproxyserver.solver.docker.dataprovider.mapper.NetworkMapper.of(NetworkMapper.java:21)
at com.mageddo.dnsproxyserver.solver.docker.dataprovider.NetworkDAODefault.findByName(NetworkDAODefault.java:38)
at com.mageddo.dnsproxyserver.solver.docker.application.ContainerSolvingService.lambda$findAtAvailableNetworksOptional$3(ContainerSolvingService.java:98)
at java.base@19.0.2/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base@19.0.2/java.util.Iterator.forEachRemaining(Iterator.java:133)
at java.base@19.0.2/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1921)
at java.base@19.0.2/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base@19.0.2/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base@19.0.2/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
at java.base@19.0.2/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base@19.0.2/java.util.stream.ReferencePipeline.reduce(ReferencePipeline.java:662)
at java.base@19.0.2/java.util.stream.ReferencePipeline.min(ReferencePipeline.java:703)
at com.mageddo.dnsproxyserver.solver.docker.application.ContainerSolvingService.findAtAvailableNetworksOptional(ContainerSolvingService.java:105)
at com.mageddo.dnsproxyserver.solver.docker.application.ContainerSolvingService.lambda$findBestIpMatch$1(ContainerSolvingService.java:65)
at java.base@19.0.2/java.util.Optional.or(Optional.java:313)
at com.mageddo.dnsproxyserver.solver.docker.application.ContainerSolvingService.findBestIpMatch(ContainerSolvingService.java:65)
at com.mageddo.dnsproxyserver.solver.docker.application.ContainerSolvingService.lambda$findBestMatch$0(ContainerSolvingService.java:42)
at java.base@19.0.2/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base@19.0.2/java.util.AbstractList$RandomAccessSpliterator.tryAdvance(AbstractList.java:708)
at java.base@19.0.2/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
at java.base@19.0.2/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
at java.base@19.0.2/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
at java.base@19.0.2/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base@19.0.2/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
at java.base@19.0.2/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base@19.0.2/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:647)
at com.mageddo.dnsproxyserver.solver.docker.application.ContainerSolvingService.findBestMatch(ContainerSolvingService.java:44)
at com.mageddo.dnsproxyserver.solver.SolverDocker.lambda$handle$0(SolverDocker.java:40)
at com.mageddo.dnsproxyserver.solver.HostnameMatcher.match(HostnameMatcher.java:22)
at com.mageddo.dnsproxyserver.solver.SolverDocker.handle(SolverDocker.java:39)
at com.mageddo.dnsproxyserver.server.dns.RequestHandlerDefault.solveAndSummarize(RequestHandlerDefault.java:115)
at com.mageddo.dnsproxyserver.server.dns.RequestHandlerDefault.solveAndSummarizeHandlingError(RequestHandlerDefault.java:99)
at com.mageddo.dnsproxyserver.server.dns.RequestHandlerDefault.solve(RequestHandlerDefault.java:82)
at com.mageddo.dnsproxyserver.server.dns.RequestHandlerDefault.solveFixingCacheTTL(RequestHandlerDefault.java:73)
at com.mageddo.dnsproxyserver.solver.SolverCache.lambda$handleRes$0(SolverCache.java:38)
at com.mageddo.commons.caching.LruTTLCache.lambda$computeIfAbsentWithTTL$1(LruTTLCache.java:94)
at java.base@19.0.2/java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1916)
at com.mageddo.commons.caching.LruTTLCache.lambda$computeIfAbsentWithTTL$2(LruTTLCache.java:88)
at java.base@19.0.2/java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1916)
at com.mageddo.commons.caching.LruTTLCache.computeIfAbsentWithTTL(LruTTLCache.java:86)
at com.mageddo.dnsproxyserver.solver.SolverCache.handleRes(SolverCache.java:36)
at com.mageddo.dnsproxyserver.solver.SolverCache.handle(SolverCache.java:31)
at com.mageddo.dnsproxyserver.server.dns.RequestHandlerDefault.solveCaching(RequestHandlerDefault.java:66)
at com.mageddo.dnsproxyserver.server.dns.RequestHandlerDefault.handle(RequestHandlerDefault.java:54)
at com.mageddo.dnsserver.UDPServer.handle(UDPServer.java:55)
at com.mageddo.dnsserver.UDPServer.lambda$start0$0(UDPServer.java:43)
at java.base@19.0.2/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
at java.base@19.0.2/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base@19.0.2/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base@19.0.2/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base@19.0.2/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)
Caused by: java.lang.IllegalArgumentException: 'fddb:21e4:36d4:9::1/64' is not an IP string literal.
at com.google.common.net.InetAddresses.formatIllegalArgumentException(InetAddresses.java:1035)
at com.google.common.net.InetAddresses.forString(InetAddresses.java:154)
at com.mageddo.net.IpImpl.build(IpImpl.java:92)
... 67 common frames omitted
21:48:32.098 [Thread-29 ] DEB c.m.d.server.dns.RequestHandlerDefault l=90 m=solve status=solveSummary, summary=[(SolverSystem,0)]
21:48:32.098 [Thread-29 ] WAR c.m.d.server.dns.RequestHandlerDefault l=56 m=handle status=solverFailed, totalTime=42, eClass=NullPointerException, msg=null
java.lang.NullPointerException: null
at com.mageddo.dnsproxyserver.server.dns.RequestHandlerDefault.solve(RequestHandlerDefault.java:83)
at com.mageddo.dnsproxyserver.server.dns.RequestHandlerDefault.solveFixingCacheTTL(RequestHandlerDefault.java:73)
at com.mageddo.dnsproxyserver.solver.SolverCache.lambda$handleRes$0(SolverCache.java:38)
at com.mageddo.commons.caching.LruTTLCache.lambda$computeIfAbsentWithTTL$1(LruTTLCache.java:94)
at java.base@19.0.2/java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1916)
at com.mageddo.commons.caching.LruTTLCache.lambda$computeIfAbsentWithTTL$2(LruTTLCache.java:88)
at java.base@19.0.2/java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1916)
at com.mageddo.commons.caching.LruTTLCache.computeIfAbsentWithTTL(LruTTLCache.java:86)
at com.mageddo.dnsproxyserver.solver.SolverCache.handleRes(SolverCache.java:36)
at com.mageddo.dnsproxyserver.solver.SolverCache.handle(SolverCache.java:31)
at com.mageddo.dnsproxyserver.server.dns.RequestHandlerDefault.solveCaching(RequestHandlerDefault.java:66)
at com.mageddo.dnsproxyserver.server.dns.RequestHandlerDefault.handle(RequestHandlerDefault.java:54)
at com.mageddo.dnsserver.UDPServer.handle(UDPServer.java:55)
at com.mageddo.dnsserver.UDPServer.lambda$start0$0(UDPServer.java:43)
at java.base@19.0.2/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
at java.base@19.0.2/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base@19.0.2/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base@19.0.2/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base@19.0.2/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)
21:48:32.098 [Thread-29 ] DEB com.mageddo.dnsserver.UDPServer l=59 m=handle status=success, query=rc=3, query=AAAA:example.docker, res=rc=3, query=AAAA:example.docker, serverAddr=/0:0:0:0:0:0:0:0, clientAddr=/172.18.0.1:33066, dataLength=512, datagramLength=53
21:48:39.420 [Thread-1 ] DEB c.m.d.s.remote.application.CircuitBreakerFactory l=70 m=checkCreatedCircuits status=checkingCreatedCircuits, circuits=0
21:48:39.420 [Thread-1 ] DEB c.m.d.s.remote.application.CircuitBreakerFactory l=79 m=checkCreatedCircuits status=checkEnded, successes=0, errors=0, circuits=0, timeElapsed=0
Restarting docker daemon fixes this:
$ docker network inspect example
[
{
"Name": "example",
"Id": "8f1dcdb34113902721825c22af1c0c0dabed062ef2f3aaf0685b049bc8c34625",
"Created": "2024-06-17T20:20:38.990713544Z",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": true,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "172.26.0.0/16",
"Gateway": "172.26.0.1"
},
{
"Subnet": "fddb:21e4:36d4:9::/64",
"Gateway": "fddb:21e4:36d4:9::1"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"ffaec05f2942c836d54b320ed9306608e7701f455017a49e8587540d0f2ebbbb": {
"Name": "example",
"EndpointID": "5ef4a74a512be0e71056eea10204d580e1fcb936a75d5fd09cdf68c645f7ac07",
"MacAddress": "02:42:ac:1a:00:02",
"IPv4Address": "172.26.0.2/16",
"IPv6Address": "fddb:21e4:36d4:9::2/64"
}
},
"Options": {},
"Labels": {}
}
]
After the docker daemon restart, resolution with DPS works OK.
It really looks like an unwanted behavior from docker, but I wasn't able to find a issue on docker repo related to it. Can you upgrade your docker version to check if it fixes your issue?
If wouldn't fix that issue, then I can work on a workaround at DPS IP mapping to remove the '/64'
at the end.
The OS is fully updated Fedora 39, Docker is provided by moby-engine-24.0.5-1.fc39.aarch64
package, which is an upstream for Docker. I use ansible to manage the containers, so there's also the latest community.docker 3.10.4
ansible collection and on the managed host, the python library python3-docker-6.1.3-1.fc39.noarch
. I guess the issue can be anywhere here.
The moby-engine
on Fedora is supposed to be better integrated with the OS, but they have some issues with upgrading to the newer version, so it's still in the works.
Currently I'm not able to reasonably update anything further. I don't have Fedora 40 yet on the servers, but the moby-engine version is the same.
No problem, I Will generate a patch with the hotfix
Hi @mageddo. I've just tested this on a Rocky 9 with the latest Docker CE package:
$ uname -r
5.14.0-427.20.1.el9_4.0.1.aarch64
$ cat /etc/os-release | grep PRETTY_NAME
PRETTY_NAME="Rocky Linux 9.4 (Blue Onyx)"
$ docker version
Client: Docker Engine - Community
Version: 26.1.4
API version: 1.45
Go version: go1.21.11
Git commit: 5650f9b
Built: Wed Jun 5 11:30:23 2024
OS/Arch: linux/arm64
Context: default
Server: Docker Engine - Community
Engine:
Version: 26.1.4
API version: 1.45 (minimum version 1.24)
Go version: go1.21.11
Git commit: de5c9cf
Built: Wed Jun 5 11:29:06 2024
OS/Arch: linux/arm64
Experimental: true
containerd:
Version: 1.6.33
GitCommit: d2d58213f83a351ca8f528a95fbd145f5654e957
runc:
Version: 1.1.12
GitCommit: v1.1.12-0-g51d5e94
docker-init:
Version: 0.19.0
GitCommit: de40ad0
And the behavior is the same:
$ docker network inspect redis
[
{
"Name": "redis",
"Id": "c9334be3920e50d406752892eda45caa1d64f73f6cecca736750147fbbc89ae6",
"Created": "2024-06-19T18:21:46.209161659Z",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": true,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "172.19.0.0/16",
"Gateway": "172.19.0.1"
},
{
"Subnet": "fddb:21e4:36d4:2::/64",
"Gateway": "fddb:21e4:36d4:2::1/64"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"745e201849ac8ee33999821c801c47e5258775fce33b0c4e66c1a054e530cbaf": {
"Name": "redis",
"EndpointID": "27d555e7ee34e4cfdd61681b37018bbe0afe8ff33d309a7ae069e743b7751bbe",
"MacAddress": "02:42:ac:13:00:02",
"IPv4Address": "172.19.0.2/16",
"IPv6Address": "fddb:21e4:36d4:2::2/64"
}
},
"Options": {},
"Labels": {}
}
]
3.19.7-snapshot binaries will be release at the next minutes @pschiffe , please can you give me a feedback if it fixes your usecase?
I can confirm it works now! Thank you so much :1st_place_medal:
$ docker network create --ipv6 xxx
$ docker run -d --name xx --network xxx nginx
$ docker network inspect xxx
[
{
"Name": "xxx",
"Id": "ad8df6af516f3f1b65995025197f84f5a022fecaa861dd91cad2e67009d4285b",
"Created": "2024-06-22T16:34:01.978566963Z",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": true,
"IPAM": {
"Driver": "default",
"Options": {},
"Config": [
{
"Subnet": "172.27.0.0/16",
"Gateway": "172.27.0.1"
},
{
"Subnet": "fddb:21e4:36d4:8::/64",
"Gateway": "fddb:21e4:36d4:8::1/64"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"03d03e2ebab966c3933c81f3e44a9a5abb3ce6f95cdcb89b7993873978710816": {
"Name": "xx",
"EndpointID": "3324e680dc827a3e730d572a11bed46ed8f17a4d6168ac9f41e863c677e8aa87",
"MacAddress": "02:42:ac:1b:00:02",
"IPv4Address": "172.27.0.2/16",
"IPv6Address": "fddb:21e4:36d4:8::2/64"
}
},
"Options": {},
"Labels": {}
}
]
$ dig @127.0.0.1 -p 5300 xx.docker
; <<>> DiG 9.19.22 <<>> @127.0.0.1 -p 5300 xx.docker
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34061
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; COOKIE: 5061271bf7cfa5f1 (echoed)
;; QUESTION SECTION:
;xx.docker. IN A
;; ANSWER SECTION:
xx.docker. 30 IN A 172.27.0.2
;; Query time: 20 msec
;; SERVER: 127.0.0.1#5300(127.0.0.1) (UDP)
;; WHEN: Sat Jun 22 16:37:52 UTC 2024
;; MSG SIZE rcvd: 66
$ dig @127.0.0.1 -p 5300 xx.docker aaaa
; <<>> DiG 9.19.22 <<>> @127.0.0.1 -p 5300 xx.docker aaaa
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62893
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; COOKIE: ee397ba8d1755045 (echoed)
;; QUESTION SECTION:
;xx.docker. IN AAAA
;; ANSWER SECTION:
xx.docker. 30 IN AAAA fddb:21e4:36d4:8::2
;; Query time: 22 msec
;; SERVER: 127.0.0.1#5300(127.0.0.1) (UDP)
;; WHEN: Sat Jun 22 16:38:46 UTC 2024
;; MSG SIZE rcvd: 78
Glad issue it's now fixed, thanks for your donation :)
What is Happening / What is expected
I have IPv4 & IPv6 enabled VM. DPS is spamming me with this exception all the time:
java.lang.RuntimeException: Array of bytes is not a valid IP representation: fddb:21e4:36d4:1::1/64: invalid IPv6 address
This IP is visible in the
ip a
output:Other than the spamming, DPS seems to work:
Specs
Server: Engine: Version: 24.0.5 API version: 1.43 (minimum version 1.12) Go version: go1.20.7 Git commit: %{shortcommit_moby} Built: Sun Aug 27 16:45:35 2023 OS/Arch: linux/arm64 Experimental: true containerd: Version: 1.6.19 GitCommit:
runc: Version: 1.1.8 GitCommit:
docker-init: Version: 0.19.0 GitCommit:
13:42:46.757 [main ] INF com.mageddo.dnsproxyserver.config.Configs l=166 m=build status=configuring, configFile=/app/conf/config.json 13:42:46.772 [main ] INF com.mageddo.dnsproxyserver.docker.EventListener l=33 m=onStart status=binding-docker-events, dockerConnected=true 13:42:46.772 [main ] INF c.m.dnsproxyserver.docker.DpsContainerManager l=40 m=setupNetwork status=dpsNetwork, active=false 13:42:46.772 [main ] INF com.mageddo.dnsproxyserver.docker.EventListener l=41 m=onStart status=autoConnectDpsNetworkDisabled, dpsNetwork=false, dpsNetworkAutoConnect=false 13:42:46.779 [main ] INF c.mageddo.dnsproxyserver.server.dns.UDPServerPool l=31 m=start Starting UDP server, addresses=/0.0.0.0:53 13:42:46.779 [main ] INF c.mageddo.dnsproxyserver.server.dns.ServerStarter l=32 m=start status=startingDnsServer, protocol=UDP_TCP, port=53 13:42:46.781 [main ] INF com.mageddo.http.WebServer l=134 m=start status=startingWebServer, port=5380 13:42:46.780 [Thread-4 ] INF com.mageddo.dnsproxyserver.server.dns.TCPServer l=50 m=start0 status=tcpServerStarting, port=53 13:42:50.821 [Thread-9 ] WAR c.m.d.server.dns.RequestHandlerDefault l=93 m=solve0 status=solverFailed, currentSolverTime=46, totalTime=46, solver=SolverDocker, query=query=AAAA:host.example.com, eClass=RuntimeException, msg=Array of bytes is not a valid IP representation: fddb:21e4:36d4:1::1/64: invalid IPv6 address java.lang.RuntimeException: Array of bytes is not a valid IP representation: fddb:21e4:36d4:1::1/64: invalid IPv6 address at com.mageddo.net.IpImpl.invalidAddressEx(IpImpl.java:93) at com.mageddo.net.IpImpl.build(IpImpl.java:87) at com.mageddo.net.IpImpl.(IpImpl.java:18)
at com.mageddo.net.IpImpl.of(IpImpl.java:60)
at com.mageddo.net.IP.of(IP.java:21)
at java.base@19.0.2/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base@19.0.2/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base@19.0.2/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1602)
at java.base@19.0.2/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
at java.base@19.0.2/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
at java.base@19.0.2/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
at java.base@19.0.2/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base@19.0.2/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
at java.base@19.0.2/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base@19.0.2/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:647)
at com.mageddo.dnsproxyserver.docker.DockerNetworkService.findGatewayIp(DockerNetworkService.java:41)
at com.mageddo.dnsproxyserver.docker.DockerDAODefault.findHostMachineIp(DockerDAODefault.java:33)
at com.mageddo.dnsproxyserver.docker.ContainerSolvingService.lambda$findBestIpMatch$1(ContainerSolvingService.java:72)
at com.mageddo.dnsproxyserver.docker.ContainerSolvingService.lambda$findBestIpMatch$4(ContainerSolvingService.java:131)
at java.base@19.0.2/java.util.Optional.orElseGet(Optional.java:364)
at com.mageddo.dnsproxyserver.docker.ContainerSolvingService.lambda$findBestIpMatch$5(ContainerSolvingService.java:130)
at java.base@19.0.2/java.util.Optional.orElseGet(Optional.java:364)
at com.mageddo.dnsproxyserver.docker.ContainerSolvingService.findBestIpMatch(ContainerSolvingService.java:127)
at com.mageddo.dnsproxyserver.docker.ContainerSolvingService.findBestIpMatch(ContainerSolvingService.java:69)
at com.mageddo.dnsproxyserver.docker.ContainerSolvingService.lambda$findBestMatch$0(ContainerSolvingService.java:49)
at java.base@19.0.2/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base@19.0.2/java.util.AbstractList$RandomAccessSpliterator.tryAdvance(AbstractList.java:708)
at java.base@19.0.2/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
at java.base@19.0.2/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
at java.base@19.0.2/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
at java.base@19.0.2/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base@19.0.2/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
at java.base@19.0.2/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base@19.0.2/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:647)
at com.mageddo.dnsproxyserver.docker.ContainerSolvingService.findBestMatch(ContainerSolvingService.java:50)
at com.mageddo.dnsproxyserver.server.dns.solver.SolverDocker.lambda$handle$0(SolverDocker.java:40)
at com.mageddo.dnsproxyserver.server.dns.solver.HostnameMatcher.match(HostnameMatcher.java:22)
at com.mageddo.dnsproxyserver.server.dns.solver.SolverDocker.handle(SolverDocker.java:39)
at com.mageddo.dnsproxyserver.server.dns.RequestHandlerDefault.solve0(RequestHandlerDefault.java:75)
at com.mageddo.dnsproxyserver.server.dns.solver.SolverCache.lambda$handleRes$0(SolverCache.java:38)
at com.mageddo.commons.caching.LruTTLCache.lambda$computeIfAbsentWithTTL$1(LruTTLCache.java:94)
at java.base@19.0.2/java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1916)
at com.mageddo.commons.caching.LruTTLCache.lambda$computeIfAbsentWithTTL$2(LruTTLCache.java:88)
at java.base@19.0.2/java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1916)
at com.mageddo.commons.caching.LruTTLCache.computeIfAbsentWithTTL(LruTTLCache.java:86)
at com.mageddo.dnsproxyserver.server.dns.solver.SolverCache.handleRes(SolverCache.java:36)
at com.mageddo.dnsproxyserver.server.dns.solver.SolverCache.handle(SolverCache.java:31)
at com.mageddo.dnsproxyserver.server.dns.RequestHandlerDefault.solve(RequestHandlerDefault.java:51)
at com.mageddo.dnsproxyserver.server.dns.RequestHandlerDefault.handle(RequestHandlerDefault.java:42)
at com.mageddo.dnsproxyserver.server.dns.UDPServer.handle(UDPServer.java:54)
at com.mageddo.dnsproxyserver.server.dns.UDPServer.lambda$start0$0(UDPServer.java:42)
at java.base@19.0.2/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
at java.base@19.0.2/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base@19.0.2/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base@19.0.2/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base@19.0.2/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)
Caused by: java.net.UnknownHostException: fddb:21e4:36d4:1::1/64: invalid IPv6 address
at java.base@19.0.2/java.net.InetAddress.getAllByName(InetAddress.java:1501)
at java.base@19.0.2/java.net.InetAddress.getByName(InetAddress.java:1413)
at com.mageddo.net.IpImpl.build(IpImpl.java:85)
... 56 common frames omitted
13:42:51.777 [Thread-2 ] INF c.m.d.dnsconfigurator.DnsConfigurators l=112 m=getInstance0 usingDnsConfigurator=DnsConfiguratorLinux
13:42:51.778 [Thread-2 ] INF c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux l=91 m=lambda$findBestConfFile$0 status=noValidConfFile, file=/host/etc/systemd/resolved.conf
13:42:51.778 [Thread-2 ] INF c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux l=91 m=lambda$findBestConfFile$0 status=noValidConfFile, file=/host/etc/resolv.conf
13:42:51.778 [Thread-2 ] INF c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux l=91 m=lambda$findBestConfFile$0 status=noValidConfFile, file=/etc/systemd/resolved.conf
13:42:51.778 [Thread-2 ] INF c.m.d.dnsconfigurator.linux.DnsConfiguratorLinux l=122 m=init status=using, configFile=ResolvFile(path=/etc/resolv.conf, type=RESOLVCONF)
13:43:20.791 [Thread-17 ] WAR c.m.d.server.dns.RequestHandlerDefault l=93 m=solve0 status=solverFailed, currentSolverTime=8, totalTime=8, solver=SolverDocker, query=query=AAAA:host.example.com, eClass=RuntimeException, msg=Array of bytes is not a valid IP representation: fddb:21e4:36d4:1::1/64: invalid IPv6 address
java.lang.RuntimeException: Array of bytes is not a valid IP representation: fddb:21e4:36d4:1::1/64: invalid IPv6 address
at com.mageddo.net.IpImpl.invalidAddressEx(IpImpl.java:93)
at com.mageddo.net.IpImpl.build(IpImpl.java:87)
at com.mageddo.net.IpImpl.(IpImpl.java:18)
at com.mageddo.net.IpImpl.of(IpImpl.java:60)
at com.mageddo.net.IP.of(IP.java:21)
at java.base@19.0.2/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base@19.0.2/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base@19.0.2/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1602)
at java.base@19.0.2/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
at java.base@19.0.2/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
at java.base@19.0.2/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
at java.base@19.0.2/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base@19.0.2/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
at java.base@19.0.2/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base@19.0.2/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:647)
at com.mageddo.dnsproxyserver.docker.DockerNetworkService.findGatewayIp(DockerNetworkService.java:41)
at com.mageddo.dnsproxyserver.docker.DockerDAODefault.findHostMachineIp(DockerDAODefault.java:33)
at com.mageddo.dnsproxyserver.docker.ContainerSolvingService.lambda$findBestIpMatch$1(ContainerSolvingService.java:72)
at com.mageddo.dnsproxyserver.docker.ContainerSolvingService.lambda$findBestIpMatch$4(ContainerSolvingService.java:131)
at java.base@19.0.2/java.util.Optional.orElseGet(Optional.java:364)
at com.mageddo.dnsproxyserver.docker.ContainerSolvingService.lambda$findBestIpMatch$5(ContainerSolvingService.java:130)
at java.base@19.0.2/java.util.Optional.orElseGet(Optional.java:364)
at com.mageddo.dnsproxyserver.docker.ContainerSolvingService.findBestIpMatch(ContainerSolvingService.java:127)
at com.mageddo.dnsproxyserver.docker.ContainerSolvingService.findBestIpMatch(ContainerSolvingService.java:69)
at com.mageddo.dnsproxyserver.docker.ContainerSolvingService.lambda$findBestMatch$0(ContainerSolvingService.java:49)
at java.base@19.0.2/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base@19.0.2/java.util.AbstractList$RandomAccessSpliterator.tryAdvance(AbstractList.java:708)
at java.base@19.0.2/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
at java.base@19.0.2/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
at java.base@19.0.2/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
at java.base@19.0.2/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base@19.0.2/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
at java.base@19.0.2/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base@19.0.2/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:647)
at com.mageddo.dnsproxyserver.docker.ContainerSolvingService.findBestMatch(ContainerSolvingService.java:50)
at com.mageddo.dnsproxyserver.server.dns.solver.SolverDocker.lambda$handle$0(SolverDocker.java:40)
at com.mageddo.dnsproxyserver.server.dns.solver.HostnameMatcher.match(HostnameMatcher.java:22)
at com.mageddo.dnsproxyserver.server.dns.solver.SolverDocker.handle(SolverDocker.java:39)
at com.mageddo.dnsproxyserver.server.dns.RequestHandlerDefault.solve0(RequestHandlerDefault.java:75)
at com.mageddo.dnsproxyserver.server.dns.solver.SolverCache.lambda$handleRes$0(SolverCache.java:38)
at com.mageddo.commons.caching.LruTTLCache.lambda$computeIfAbsentWithTTL$1(LruTTLCache.java:94)
at java.base@19.0.2/java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1916)
at com.mageddo.commons.caching.LruTTLCache.lambda$computeIfAbsentWithTTL$2(LruTTLCache.java:88)
at java.base@19.0.2/java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1916)
at com.mageddo.commons.caching.LruTTLCache.computeIfAbsentWithTTL(LruTTLCache.java:86)
at com.mageddo.dnsproxyserver.server.dns.solver.SolverCache.handleRes(SolverCache.java:36)
at com.mageddo.dnsproxyserver.server.dns.solver.SolverCache.handle(SolverCache.java:31)
at com.mageddo.dnsproxyserver.server.dns.RequestHandlerDefault.solve(RequestHandlerDefault.java:51)
at com.mageddo.dnsproxyserver.server.dns.RequestHandlerDefault.handle(RequestHandlerDefault.java:42)
at com.mageddo.dnsproxyserver.server.dns.UDPServer.handle(UDPServer.java:54)
at com.mageddo.dnsproxyserver.server.dns.UDPServer.lambda$start0$0(UDPServer.java:42)
at java.base@19.0.2/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
at java.base@19.0.2/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base@19.0.2/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base@19.0.2/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base@19.0.2/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)
Caused by: java.net.UnknownHostException: fddb:21e4:36d4:1::1/64: invalid IPv6 address
at java.base@19.0.2/java.net.InetAddress.getAllByName(InetAddress.java:1501)
at java.base@19.0.2/java.net.InetAddress.getByName(InetAddress.java:1413)
at com.mageddo.net.IpImpl.build(IpImpl.java:85)
... 56 common frames omitted
...