Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to enable telnet (no i can't use ssh, and I don't want to discuss why I have to use telnet either), I have localhost.localdomain localhost in /etc/hosts. I have installed telnet-server, chkconfigd it on, and enabled xinetd. SElinux is disabled. But every time I try and telnet to the host I get "getaddrinfo: localhost Name or service not known". Any ideas?

share|improve this question

So I realized today that while I did ensure that "localhost" was in /etc/hosts I did not ensure that the system hostname as set in /etc/sysconfig/network was in /etc/hosts. The issue for me is that while the fqdn is in DNS, the standard in this environment is to not use the fqdn for the system hostname. So I stuck the (non-fqdn) hostname in /etc/hosts with the IP address and the issue was resolved.

I guess what has been throwing me off so bad is the error message "getaddrinfo: localhost Name or service not known". The use of localhost is a bit misleading. I hope somone else finds this information useful.

share|improve this answer
This is a rather common problem actually. Lots of applications break if you don't set the hostname correctly ;) – pehrs Apr 6 '10 at 14:48
No kidding, which is why its "my standard" but unfortunately I cant just change "their standard" – Nick Anderson Apr 6 '10 at 14:52

Did you edit /etc/xinet.d/telnet and set enable to yes (or on, or whatever?)

share|improve this answer
Indeed I did, you get a point for trying to help me offline :). Unfortunately I cannot accept my own answer as the solution. – Nick Anderson Apr 6 '10 at 14:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.