4

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?

Nick Anderson
  • 669
  • 2
  • 5
  • 11

2 Answers2

5

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.

Nick Anderson
  • 669
  • 2
  • 5
  • 11
  • This is a rather common problem actually. Lots of applications break if you don't set the hostname correctly ;) – pehrs Apr 06 '10 at 14:48
  • No kidding, which is why its "my standard" but unfortunately I cant just change "their standard" – Nick Anderson Apr 06 '10 at 14:52
1

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

Matt Simmons
  • 20,218
  • 10
  • 67
  • 114
  • 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 06 '10 at 14:21