linuxparsingdnshostnameservers

host: parse of /etc/resolv.conf failed


I'm getting an error and I cannot see what happens, please see if you can catch what's wrong.

Whenever I use the "host" command, I get this error:

xavi@cobalto:~$ host www.guparty.com
host: parse of /etc/resolv.conf failed

I think the syntax is correct:

xavi@cobalto:~$ cat /etc/resolv.conf
search dsitelecom.com
nameserver 8.8.8.8 8.8.4.4

Also permissions are readable for everybody:

xavi@cobalto:~$ ls -l /etc/resolv.conf
-rw-r--r-- 1 root root 49 2011-10-30 12:02 /etc/resolv.conf

Probably it is a silly thing but I cannot get it. Do you see anything wrong there?

Thanks!


Solution

  • 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