docker

timo 2023-12-13T13:58:57.224859Z

Anyone can help me? I don't understand why I can not resolve public domains like http://google.com inside a container when using a user-defined bridge network on docker.

jumar 2023-12-13T18:47:02.423329Z

Check out/etc/resolv.conf inside the container

timo 2023-12-14T07:20:56.464859Z

thanks, it points to the docker internal dns which should in theory forward the request to the host (where it works), but it does not resolve unfortunately

jumar 2023-12-14T10:52:49.139039Z

You can try to query that resolver manually. Or adjust it to point to a proper external resolver and see if that helps.

jumar 2023-12-14T10:54:12.394489Z

You can have a look at this too: https://serverfault.com/a/918568/402267

timo 2023-12-14T11:15:52.058319Z

Thanks for your help! I activated debug in docker daemon and it's obvious that the dns request is forwarded to the correct dns server:

Dec 14 11:12:23 odoo-0 env[6255]: time="2023-12-14T11:12:23.570729313Z" level=debug msg="Name To resolve: google.com."
Dec 14 11:12:23 odoo-0 env[6255]: time="2023-12-14T11:12:23.570855214Z" level=debug msg="[resolver] query . (AAAA) from 172.16.0.2:41603, forwarding to udp:168.63.129.16"
Dec 14 11:12:23 odoo-0 env[6255]: time="2023-12-14T11:12:23.570730313Z" level=debug msg="Name To resolve: google.com."
Dec 14 11:12:23 odoo-0 env[6255]: time="2023-12-14T11:12:23.570996216Z" level=debug msg="[resolver] query . (A) from 172.16.0.2:53161, forwarding to udp:168.63.129.16"
Dec 14 11:12:26 odoo-0 env[6255]: time="2023-12-14T11:12:26.073538642Z" level=debug msg="Name To resolve: google.com."
Dec 14 11:12:26 odoo-0 env[6255]: time="2023-12-14T11:12:26.073727044Z" level=debug msg="[resolver] query . (AAAA) from 172.16.0.2:59965, forwarding to udp:168.63.129.16"
Dec 14 11:12:26 odoo-0 env[6255]: time="2023-12-14T11:12:26.073544742Z" level=debug msg="Name To resolve: google.com."
Dec 14 11:12:26 odoo-0 env[6255]: time="2023-12-14T11:12:26.073861346Z" level=debug msg="[resolver] query . (A) from 172.16.0.2:47119, forwarding to udp:168.63.129.16"
Dec 14 11:12:27 odoo-0 env[6255]: time="2023-12-14T11:12:27.571517726Z" level=debug msg="[resolver] read from DNS server failed, read udp 172.16.0.2:53161->168.63.129.16:53: i/o timeout"
Dec 14 11:12:27 odoo-0 env[6255]: time="2023-12-14T11:12:27.571537126Z" level=debug msg="[resolver] read from DNS server failed, read udp 172.16.0.2:41603->168.63.129.16:53: i/o timeout"
Dec 14 11:12:30 odoo-0 env[6255]: time="2023-12-14T11:12:30.074612042Z" level=debug msg="[resolver] read from DNS server failed, read udp 172.16.0.2:47119->168.63.129.16:53: i/o timeout"
Dec 14 11:12:30 odoo-0 env[6255]: time="2023-12-14T11:12:30.074642942Z" level=debug msg="[resolver] read from DNS server failed, read udp 172.16.0.2:59965->168.63.129.16:53: i/o timeout"

jumar 2023-12-14T12:19:01.568359Z

I would try to ping that server from within the container and see if you can reach it

jumar 2023-12-14T12:19:11.018899Z

It's presumably something specific to Azure

jumar 2023-12-14T12:19:53.690509Z

> • Enables communication with the DNS virtual server to provide filtered name resolution to the resources (such as VM) that don't have a custom DNS server. This filtering makes sure that customers can resolve only the hostnames of their resources.

timo 2023-12-14T13:16:15.958339Z

yeah, ping works and netcat on port 53 as well. so should be good with some dns-tweaking. will try that. Thanks!