Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 127.0.0.1 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

2 Answers 2

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

 
discard

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.