DNS error [fixed]

infraerik

Dabbler
Joined
Oct 12, 2017
Messages
24
A bit of an odd one here. This is from a fresh install of TrueNAS-SCALE-22.02.0.1 on an HP Microserver Gen8. It was running TrueNAS core (current version) until the USB boot drive bit the dust so I did a clean install, reimported the pool and am configuring the various shares.

The original symptoms were from a generic error unable to download the package catalog. Digging a little further on the command line I'm getting the following very specific error:

Code:
host github.com
host: parse of /etc/resolv.conf failed


but resolv.conf looks fine (autogenerated via DHCP with a reserved IP)

Code:
cat /etc/resolv.conf
domain infrageeks.lan
nameserver 192.168.2.240,192.168.10.199,192.168.5.199


When I manually override the DHCP supplied configuration in the UI, the format of resolv.conf changes to each DNS server on a separate line and this seems to work:

Code:
cat /etc/resolv.conf
domain infrageeks.lan
nameserver 192.168.2.240
nameserver 192.168.10.199
nameserver 192.168.5.199
 

majorgear

Dabbler
Joined
Mar 13, 2012
Messages
36
Your post says "fixed" . How did you fix it? I have the same issue on one of my 2 TrueNAS servers. Manually entering DNS server IP's was a workaround, but it would be better to fix it.

My other TNAS server was configured for DHCP as well, but it didn't get that error. Both on the same version of TNAS and on the same network.
 
Last edited:

infraerik

Dabbler
Joined
Oct 12, 2017
Messages
24
Your post says "fixed" . How did you fix it? I have the same issue on one of my 2 TrueNAS servers. Manually entering DNS server IP's was a workaround, but it would be better to fix it.

My other TNAS server was configured for DHCP as well, but it didn't get that error. Both on the same version of TNAS and on the same network.
The fix is to override the DNS settings supplied by the DHCP server as this gets entered into /etc/resolv.conf as a single name server line, with the comma separated values provided by the server. Unfortunately this format is not recognised and it wants name servers on individual lines.

Fix: Manually set the DNS servers in

Network > Global configuration > DNS Servers
 

majorgear

Dabbler
Joined
Mar 13, 2012
Messages
36
Ok, so there is a work around(manually resolving an issue), but not a fix(identify root cause and prevent from happening again).

In better news, after I applied the work around and upgraded TrueNAS, the issue didn't re-occur, so perhaps it's fixed in the newer version, which is TrueNAS-SCALE-22.02.4.
 
Top