host: parse of /etc/resolv.conf failed

I had similar problem, but did this and got working:

# mv resolv.conf resolv.conf.old
# cat resolv.conf.old
search example.com
domain example.com
nameserver 11.22.33.44
nameserver 2000::1
# echo "search example.com" >>resolv.conf
# echo "domain example.com" >>resolv.conf
# echo "nameserver 11.22.33.44" >>resolv.conf
# echo "nameserver 2000::1" >>resolv.conf

The addresses are just example, but the result is working. Why copy resolv.conf is that you get a copy of original. Then when you print it out, you dont have to remember everything inside resolv.conf. And when you make the file with echos, you can be sure that there is no extra chars those make troubles. So echo all nameserver lines to there.


I saw the same error when by mistake *nix EOLs ("\n") were replaced with windows ones ("\r\n"). Solution: dos2unix filename


Check your syntax, you need to define one nameserver per line in /etc/resolv.conf

search dsitelecom.com
nameserver 8.8.8.8 
nameserver 8.8.4.4