DNS resolution is currently unavailable In macvlan

Hi

I getting the following error after i have setup my PiHole on a macvlan.

It seems to have trouble whit the DNS or something but it get a IP from my OPNsense so way should not it get a DNS connection to?

What is wrong here?

Please post a debug token URL, that will show a bit more what's going on. Create one with the command pihole -d or on the web interface at Tools > Generate debug log

Can you explain please in more detail exactly what you expect to see, and what you are instead seeing.

[?] Would you like to upload the log? [y/N] y
* Using curl for transmission.
* curl failed, contact Pi-hole support for assistance.
* Error message: curl: (6) Could not resolve host: tricorder.pi-hole.net

[✗] There was an error uploading your debug log.

  • Please try again or contact the Pi-hole team for assistance.
  • A local copy of the debug log can be found at: /var/log/pihole/pihole_debug.log

Dont seems like that work.

But i see things like this in the log

[i] Default IPv4 gateway(s):
192.168.1.1

[i] Default IPv6 gateway(s):

*** [ DIAGNOSING ]: Name resolution (IPv4) using a random blocked domain and a known ad-serving domain
[✓] xinmeiren.net is 0.0.0.0 on lo (127.0.0.1)
[✓] xinmeiren.net is 0.0.0.0 on eth0 (192.168.1.2)
[✗] Failed to resolve doubleclick.com via a remote, public DNS server (8.8.8.8)

*** [ DIAGNOSING ]: Discovering active DHCP servers (takes 10 seconds)
Scanning all your interfaces for DHCP servers
Timeout: 10 seconds

  • Received 312 bytes from eth0:192.168.1.1
    Offered IP address: 192.168.1.126
    Server IP address: N/A
    Relay-agent IP address: N/A
    BOOTP server: (empty)
    BOOTP file: (empty)
    DHCP options:
    Message type: DHCPOFFER (2)
    server-identifier: 192.168.1.1
    lease-time: 7200 ( 2h )
    netmask: 255.255.255.0
    router: 192.168.1.1
    dns-server: 192.168.1.1
    domain-name: "mydomain"
    --- end of options ---

DHCP packets received on interface eth0: 1

*** [ DIAGNOSING ]: Pi-hole processes
[✓] lighttpd daemon is active
[✓] pihole-FTL daemon is active

*** [ DIAGNOSING ]: Pi-hole-FTL full status
[i] systemctl: command not found

*** [ DIAGNOSING ]: Lighttpd configuration test
[✓] No error in lighttpd configuration

*** [ DIAGNOSING ]: Setup variables
INSTALL_WEB_INTERFACE=true
PIHOLE_INTERFACE=eth0
QUERY_LOGGING=true
BLOCKING_ENABLED=true
DNSMASQ_LISTENING=single
DNS_FQDN_REQUIRED=false
DNS_BOGUS_PRIV=false
DNSSEC=false
REV_SERVER=false
REV_SERVER_CIDR=192.168.1.100/30
REV_SERVER_TARGET=192.168.1.1
REV_SERVER_DOMAIN=mydomain
PIHOLE_DNS_1=192.168.1.1

Can it be something related that i have setup the macvlan wrong?

I can still don't get it to work. whit macvlan. When i start the setup in bridge mode it dont have any problem whit dns and running the installation like it should.

chrislph You ask me what i expect to see is that i should be able to run the installation and get access to the web interface and setup pihole.

There is no error description following.
What error are you getting?
What did you do to trigger that error?

Also, please share your docker-compose or docker run file.

This is the error i getting: [✗] DNS resolution is currently unavailable

What did i do to trigger this: Starting the installation on PiHole

Here is a screenshot from my Portainer log:

I use portainer and it use the following val container settings

Host/volume Path in container
/portainer/Files/AppData/Config/PiHole /etc/pihole
/portainer/Files/AppData/Config/PiHole/DNS /etc/dnsmasq.d

From my understanding when i have test around it seems like it don't get DNS access when the container is in macvlan network but if i run the container in bridge or host mode it dont seems to get the same problem. Then it seems to be running fine and i am access to the GUI.

I am not familiar with Portainer.
What DNS servers is your container configured to use?
Did you try to point it to use a public DNS like 9.9.9.9 yet?

Yes i have try that and nothing seems to be working.

How did you configure your container's DNS server?

And:

It seems to be pointing to nameserver 127.0.0.11
options ndots:0

That seems to be the contents of the container's /etc/resolv.conf?

Surely, Portainer would expose a UI option to set the DNS server for a container?

Yes and it dont seems to be changing that when i add a option for that.

That seems to be an issue with Portainer then.

As said before, I'm not familiar with Portainer, but I recall some reports of others using it that Portainer would sometimes hold on to its configured parameters, despite restarting the container.
In those cases, throwing away the container and configuring a new one presumably has worked (see e.g. Pihole Portainer/Docker 5.8.1 startup error? - #16 by hNt).

I manage to get things to work now. I reinstall everything and setup the macvlan before i install PiHole