Unraid not using DNS server 2


Recommended Posts

Hey guys!

 

So my second Unraid server that runs Pihole has a dead motherboard and I figured it's time to set up a backup Pihole instead of using a public DNS service as backup.

 

However at the moment my second DNS server is 1.1.1.1 and Unraid won't use it at all even when the primary DNS server is down.

 

Server was rebooted not too long ago as I thought that would fix it but no luck.

 

Is this a bug in Unraid or do I have to configure something more than just have 2 DNS servers specified?

unraid-diagnostics-20230318-2257.zip

Link to comment

You don't have any DNS servers set up in the config

# Generated settings:
IFNAME[0]="br0"
BRNAME[0]="br0"
BRSTP[0]="no"
BRFD[0]="0"
DESCRIPTION[0]="10G"
BRNICS[0]="eth0"
PROTOCOL[0]="ipv4"
USE_DHCP[0]="yes"
DHCP_KEEPRESOLV="no"
USE_DHCP6[0]="yes"
DHCP6_KEEPRESOLV="no"
SYSNICS="1"

 

Link to comment

Like I wrote in the initial post, my Pihole is down and all my other devices are currently using 1.1.1.1 without issues. Only my Unraid is not using the secondary DNS server for some reason.

 

Virtual machines are using DNS 2 and docker containers are still running fine so I assume they are also doing so. It's just the host struggling. ☹️

Link to comment

After I used nano to see if the /etc/resolv.conf file had any config in it, saving out of habit without modifying anything and closing it, my server does now reach out to the secondary DNS server. Although each request takes about 5 seconds as I'm guessing it's trying to use the primary each time and timing out it works for now.

 

The server log added this so maybe it just needed a refresher:

 

Mar 19 13:10:51 UnRaid dnsmasq[19036]: reading /etc/resolv.conf
Mar 19 13:10:51 UnRaid dnsmasq[19036]: using nameserver 192.168.0.22#53
Mar 19 13:10:51 UnRaid dnsmasq[19036]: using nameserver 192.168.0.23#53

 

 

 

Link to comment

Another update.

 

I unplugged and reconnected my server to see if it would update the DNS servers with my backup Pihole.

 

Curiously enough, it only added the first DNS server to resolv.conf and not both even though .22 and .23 are both in the GUI as IPv4 DNS servers.

 

resolv.conf is as follows:

# Generated by dhcpcd from br0.dhcp
domain KTS20
nameserver 192.168.0.22

 

It lost the second DNS server

 

At least now I know how to manually add the second DNS server, so thank you @ljm42 for the link!

 

The log says the following:

 

Mar 19 13:32:07 UnRaid kernel: mlx4_en: eth0: Link Down
Mar 19 13:32:07 UnRaid kernel: br0: port 1(eth0) entered disabled state
Mar 19 13:32:27 UnRaid  avahi-dnsconfd[18816]: DNS Server 192.168.0.22 removed (interface: 7.IPv4)
Mar 19 13:32:27 UnRaid dnsmasq[19036]: no servers found in /etc/resolv.conf, will retry
Mar 19 13:32:27 UnRaid dnsmasq[19036]: reading /etc/resolv.conf
Mar 19 13:32:27 UnRaid dnsmasq[19036]: using nameserver 192.168.0.22#53
Mar 19 13:32:43 UnRaid kernel: mlx4_en: eth0: Link Up
Mar 19 13:32:43 UnRaid kernel: br0: port 1(eth0) entered blocking state
Mar 19 13:32:43 UnRaid kernel: br0: port 1(eth0) entered forwarding state
Mar 19 13:34:16 UnRaid  avahi-dnsconfd[18816]: New DNS Server 192.168.0.22 (interface: 7.IPv4)
Mar 19 13:34:16 UnRaid dnsmasq[19036]: no servers found in /etc/resolv.conf, will retry
Mar 19 13:34:16 UnRaid dnsmasq[19036]: reading /etc/resolv.conf
Mar 19 13:34:16 UnRaid dnsmasq[19036]: using nameserver 192.168.0.22#53

 

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.