Operating System - HP-UX
1834252 Members
2177 Online
110066 Solutions
New Discussion

Re: telnet localhost : failed

 
j773303
Super Advisor

telnet localhost : failed

Does anyone has the experience about how to fix below problem? Thanks.


FairlyHp:/etc#telnet localhost
Trying...
telnet: Unable to connect to remote host: No route to host
Hero
11 REPLIES 11
Robert-Jan Goossens
Honored Contributor

Re: telnet localhost : failed

Hi,

check you /etc/hosts file

155.x.x.48 your_host your_host.dot.com loghost
127.0.0.1 localhost loopback

check your /etc/rc.config.d/netconf

LOOPBACK_ADDRESS=127.0.0.1

Regards,
Robert-Jan
KapilRaj
Honored Contributor

Re: telnet localhost : failed

Add the following in ur /etc/hosts file in the begining

127.0.0.1 localhost

Regds,

Kaps
Nothing is impossible
Sanjay Kumar Suri
Honored Contributor

Re: telnet localhost : failed

Check for the entry /etc/hosts

127.0.0.1 localhost loopback

delete and retype the line in case of control/junk characters.

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
j773303
Super Advisor

Re: telnet localhost : failed

I have check the /etc/hosts, the 127.0.0.1 has defined, I still re-type it..... but seems the problem still exists.

Any solution on this?

The OS is 9.0

Thanks.
Hero
Fred Ruffet
Honored Contributor

Re: telnet localhost : failed

would you show us result for netsat -rn ?

regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Sanjay Kumar Suri
Honored Contributor

Re: telnet localhost : failed

Check this link:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=140400

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Ravi_8
Honored Contributor

Re: telnet localhost : failed

Hi,

#netstat -rn

o/p should show your default gateway.

if the default gateway is functioning but still unable to telent to localhost check the /etc/nsswitch.conf file (if file not there copy nisswitch.nis to nsswitch.conf)
edit the nsswitch.conf file,
make sure line containing hosts is like
hosts: file dns
never give up
harry d brown jr
Honored Contributor

Re: telnet localhost : failed


Do a "nslookup localhost", what does it return?

Can you post your /etc/nsswitch.conf and /etc/resolv.conf?

What version of BIND are you running? You should be running 9.2: http://www.software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=BIND9.2


live free or die
harry
Live Free or Die
j773303
Super Advisor

Re: telnet localhost : failed

There're no nsswitch.conf and resolv.conf in the system. And only have one unix machine.
Thanks.


:/etc#netstat -rn
Routing tables
Destination Gateway Flags Refs Use Interface
210.244.220.134 210.244.220.134 UH 2 165185 lan0
default 210.244.220.129 U 1 24790 lan0
210.244.220.128 210.244.220.134 U 25 12612213 lan0
Hero
Joseph Loo
Honored Contributor

Re: telnet localhost : failed

hi,

could u create the file, /etc/nsswitch.conf which will try to resolve the host?

# cd /etc
# vi nsswitch.conf

hosts: files dns [NOTFOUND=return] nis [NOTFOUND=return]

# nslookup
> localhost
what is the output now?

regards.
what you do not see does not mean you should not believe
Sridhar Bhaskarla
Honored Contributor

Re: telnet localhost : failed

Hi,

Looks like your loopback didn't get initialized. You are basically routes to localhost in your 'netstat -rn'.

Try

ifconfig lo0 127.0.0.1 up

and see if it works.

Or run /sbin/init.d/net.init start

-Sri
You may be disappointed if you fail, but you are doomed if you don't try