[SOLVED] DNS resolution is currently unavailable

Hi!

When I try to update gravity, appears 2 errors:

  • [✗] DNS resolution is currently unavailable*
  • [✗] DNS resolution is not available*

It is a extrage situation. pi-Hole is working properly, in my home network, all the devices are flowing thru it, and about 90% of ads, are blocked.

I check different forums, and seem that the issue is realted with port 53.

Also, I have a Portainer platform running on a OpenMediaVault, and now I'm not able to pull any image, and I have also a error message about pot 53..

Both situations are something regarded about port 53. ¿?
I changed NAT configuration on my router to send 53TCP/UDP connections to pi-hole IP address.

pi-Hole is running on a Orange Pi Zero Board, I started to use v4, and now I'm with a fresh new installation with v5.

pi-Hole works as a DCHP server, and DHCP server option is not enabled in my router.

I tried to generate a debug file, but when the pi-hole finishes, it is not able to upload to the server, then, I don't have a Token.

[✗] 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_debug.log

Thanks for your support!

SinE80

2 Likes

Any help will be helpfull... thanks in advance! :sweat_smile:

Well, I assume that I'm a newbie.

Solution:

Connect thru putty
Login as root user

then edit resolv.conf as:

#nano /etc/resolv.conf
or
#sudo nano /etc/resolv.conf

And edit the name server to:

# Generated by NetworkManager
search home
nameserver 127.0.0.1

Now, also I can upload a debug file, for your information: x75abjglcd

Regards

10 Likes

This solution worked for me - thank you for posting! However, I have two questions about it:

  1. Why does this change need to be made? My Pihole installation is fresh out the box, so shouldn't this be set correctly in the first place?

  2. I am running Pihole in a Docker container and when I restarted it the changes I had made to the file had reverted. How do I make the change in resolv.conf permanent?

Thank you

3 Likes

How does one go about editing this file? I am having the same issue and cannot reconfigure pihole in any way as it stands.

1 Like

A post was split to a new topic: Cannot change assigned nameserver for the Pi-hole host

2 posts were split to a new topic: Edit /etc/resolv.conf in Docker container to fix 'DNS resolution is unavailable'

Excellent! Now it works like a charm.

1 Like

Prefect, thanks. This fixed things for me.

Worked fr me too! +1

There is an even easier solution that worked for me (and solved another problem too):

In your docker-compose.yml change

    ports:
      - 53:53/tcp
      - 53:53/udp

to this

    ports:
      - 192.168.X.X:53:53/tcp
      - 192.168.X.X:53:53/udp

Replace the X with the IP of the host where your Pi-Hole is running.

I got it from this Stackoverflow thread: docker-compose internal DNS server 127.0.0.11 connection refused - Stack Overflow

2 Likes

If you are using the provided basic docker compose setup on a recent raspberry, the proper (not dependent on your local IP) way is to give a hint of the system dns in addition to the upstream dns.

This is achieved by passing both upstream and system DNS at setup in the docker-compose.yml (truncated for brevity).

services:
  pihole:
    container_name: pihole
    image: pihole/pihole:latest
[...]
    environment:
      PIHOLE_DNS_1: 8.8.8.8 # the main DNS resolver 
      PIHOLE_DNS_2: 8.8.4.4 # secondary DNS resolver
[...]
    dns:
      - 127.0.0.1 # system resolver 

Bear in mind I am using the default network for my pihole docker container

NETWORK ID     NAME                      DRIVER    SCOPE
d7b5df194ceb   pihole_default            bridge    local