Non-recoverable failure in name resolution

Dear friends,

Big problem. Error message as follows:

Code:
#telnet localhost:25
localhost:25: Non-recoverable failure in name resolution
# telnet localhost:110
localhost:110: Non-recoverable failure in name resolution

Need your help!
 
Dear @SirDice,

Sorry for low level mistake. But if I

Code:
#nslookup localhost
Server:         192.168.1.1
Address:        192.168.1.1#53

Non-authoritative answer:
Name:   localhost.xxx.xxx.xxx
Address: 60.195.191.230

192.168.1.1 is a router. The IP 60.195.191.230 is not mine, and is quite different from 127.0.0.1, even 192.168.1.* bla bla.
 
Last edited by a moderator:
The problem is that nslookup(1) does not use /etc/hosts and it tries a DNS lookup using the settings in /etc/resolv.conf but fails, this is by design. If you do for example a simple ping localhost it will use the correct 127.0.0.1 address because the system resolver does use /etc/hosts. Doing telnet localhost 25 works for the same reason.
 
Looks like you've been modifying /etc/hosts in ways you shouldn't have. Well, either that or /etc/nsswitch.conf.

For starters make sure that this is present in /etc/hosts:

Code:
::1                     localhost localhost.my.domain
127.0.0.1               localhost localhost.my.domain
 
kpa said:
The problem is that nslookup(1) does not use /etc/hosts and it tries a DNS lookup using the settings in /etc/resolv.conf but fails, this is by design. If you do for example a simple ping localhost it will use the correct 127.0.0.1 address because the system resolver does use /etc/hosts. Doing telnet localhost 25 works for the same reason.

Thanks. I know the reason right now.
 
Back
Top