LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 08-26-2010, 11:34 AM   #1
jijawm
LQ Newbie
 
Registered: Nov 2009
Posts: 8

Rep: Reputation: 0
telnet fail getaddrinfo: localhost Name or service not known


This crippled a client's system this morning, and I thought I'd share the fix:
Trying to telnet into the system:
# telnet 192.168.10.3
Trying 192.168.10.3...
Connected to 192.168.10.3 (192.168.10.3).
Escape character is '^]'.
getaddrinfo: localhost Name or service not known
Connection closed by foreign host.

The fix was to add an entry to /etc/hosts
# grep HOSTNAME /etc/sysconfig/network
Then make an entry in /etc/hosts for the HOSTNAME exactly as it appears in the results from the above grep command, using the IP address of the network card.
This can be obtained using
ifconfig

e.g.
# grep HOSTNAME sysconfig/network
HOSTNAME=g6network
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:25:B3:B9:14:4A
inet addr:192.168.10.3 Bcast:192.168.10.255 Mask:255.255.255.0
... ...
The entry to put in /etc/hosts would then be:
192.168.10.3 g6network

Now, what is peculiar is that the server has been running for months and telnet working just fine.
I'm guessing that automatic updates "fixed" something that wasn't necessarily broken, from the end-user's perspective.

Last edited by jijawm; 09-01-2010 at 05:36 PM.
 
Old 10-21-2013, 03:19 PM   #2
c19191919
LQ Newbie
 
Registered: Oct 2013
Posts: 1

Rep: Reputation: Disabled
Thumbs up Telnet no accepting connections

Your post worked perfectly.
 
  


Reply

Tags
enterprise, getaddrinfo, linux, localhost, rhel5, telnet


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
fail to telnet localhost 106 satimis Linux - Server 7 12-16-2007 12:53 PM
telnet - FAIL: telnet address from=15.8.29.14 gruell Linux - Software 1 06-28-2007 03:41 PM
Fail to telnet localhost 25 satimis Linux - Server 19 11-27-2006 09:43 AM
can not telnet localhost 25 but telnet dowell.exper.dynserv.com 25 exper Linux - Software 0 02-25-2004 05:13 AM
Telnet localhost and telnet not from localhost for IMAP services seb77 Linux - Networking 1 10-15-2003 01:20 PM


All times are GMT -5. The time now is 05:02 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration