DNS libraries use only the last nameserver line in /etc/resolv.conf
Noted a weird behaviour with Alpine:3.7 resolver libraries. They do not support multiple nameserver configuration lines. So in my example I connect to a VPN and 2 additional nameservers are added at the top of my config:
- Generated by resolvconf
search ad.test.com fritz.box
nameserver 192.108.90.253
nameserver 192.108.90.254
nameserver 192.168.178.1 # Orginal nameserver
The problem is that the resolver is using the last nameserver where my host is not available. I commented it out and now the resolution works though I get the well know “can’t resolve ‘(null)’” error:
/data # nslookup db-prd.prd.aws.test.com
nslookup: can’t resolve ‘(null)’: Name does not resolve
Name: db-prd.prd.aws.test.com
Address 1: 10.111.111.223 … … …
All this was done using the official alpine container.
(from redmine: issue id 8933, created on 2018-05-25)