"DNS resolution is currently unavailable" after fresh Ubuntu Server 22.04.2 install through Docker/Portainer

Running Ubuntu Server 22.04.2 on a Raspberry Pi 4 with Docker and Portainer. Error I am getting when trying to update the gravity:

[✗] DNS resolution is currently unavailable

No ads being blocked and adlist says -2.
I was originally unable to deploy it because of a port in use, I was receiving a 500 error. I followed this suggestion to fix it:

sudo systemctl disable systemd-resolved.service
sudo systemctl stop systemd-resolved

I've statically set the IP address of the Pi (192.168.200.185) and it shows properly in ifconfig:

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.200.185 netmask 255.255.255.0 broadcast 192.168.200.255
inet6 fe80::dea6:32ff:fedc:c6d prefixlen 64 scopeid 0x20
ether dc:a6:32:dc:0c:6d txqueuelen 1000 (Ethernet)
RX packets 2105 bytes 455275 (455.2 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2650 bytes 1493060 (1.4 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

I did see some mentions of assigning them in files such as /etc/resolv.conf. This is what mine looks like:

lrwxrwxrwx 1 root root 39 Feb 17 17:26 resolv.conf -> ../run/systemd/resolve/stub-resolv.conf

That file does not exist, /run/systemd/resolve/stub-resolv.conf. I tried to create it and it kept disappearing so I knew that was not correct.

This is what my /etc/hosts file looks like:

127.0.0.1 localhost
The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

I changed the /etc/hostname from

ubuntu

to:

127.0.0.1

When trying to get the debug log I received this error:

[✗] 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

I was originally on Pi OS but switched to Ubuntu Server today. I did a Pi-Hole backup and restored it after I installed Ubuntu.

Edit 1:

I realized what I did early on was causing some issues at least, I undid these steps:

sudo systemctl disable systemd-resolved.service
sudo systemctl stop systemd-resolved

But at least now I am at a point where I am back to the original issue, this error:

Failure
Request failed with status code 500

I believe the issue may be port related then but am not sure what to do:

ubuntu@ubuntu:/run/systemd$ sudo netstat -tunlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 859/sshd: /usr/sbin
tcp 0 0 0.0.0.0:9443 0.0.0.0:* LISTEN 1054/docker-proxy
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 697/systemd-resolve
tcp 0 0 0.0.0.0:8000 0.0.0.0:* LISTEN 1078/docker-proxy
tcp6 0 0 :::22 :::* LISTEN 859/sshd: /usr/sbin
tcp6 0 0 :::9443 :::* LISTEN 1062/docker-proxy
tcp6 0 0 :::8000 :::* LISTEN 1084/docker-proxy
udp 0 0 127.0.0.53:53 0.0.0.0:* 697/systemd-resolve

In the deployment manual network port publishing I have TDP ports 53, 80, and 443, for UDP I have 53 and 67.

Edit 2"
I was able to free up port 53 and it deployed! I am able to update the gravity now at least and will keep testing.

Your original issue was systemd-resolved using port 53, but apparently you were able to free up the port.
As you noticed, this port needs to be free (it is used by Pi-hole).

Are you still having any issues?

Nope, all set!