1833758 Members
2336 Online
110063 Solutions
New Discussion

Telnet hang problem

 
Alex Lavrov.
Honored Contributor

Telnet hang problem

Hello,
today I noticed a very strange problem on my HPUX servers.

Scenario:
I telnet the server from my workstation. Now I'm in the server and try:
telnet 0

It prints that it's connected, but never prints the "login:". Once in a while, it sends "\n" - new line - and no "login:".

From other servers, solaris and windows I can telnet, but from HP servers it just hangs. I think it's some kind of resolving problem, but all the setting for DNS are correct and they resolv each other by name and by ip.

I tried to us tusc on the telnet process, it's just stuck on the "select" syscall.

I tried to disable "identd". didn't help.

I tried to restart inetd, with "inetd -c". It solved the problem couple of times, but after 5 minutes, it was stuck again.

Rlogin works fine on all servers.

The wierd thing is, that it only happens on hpux servers, when I telnet from win or solaris, everything looks fine.

Any ideas?


Thanx, Alex.
I don't give a damn for a man that can only spell a word one way. (M. Twain)
14 REPLIES 14
Steve Steel
Honored Contributor

Re: Telnet hang problem

Hi


Most likely the telnet cannot get back to the origin. Something like no route to subnet of workstation.

Use netstat -an to check for connection requests from IP address in SYN_REVD state.


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Muthukumar_5
Honored Contributor

Re: Telnet hang problem

What is your machine configuration? uname -a

Check this,

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

may be related with yours.

hth.

Easy to suggest when don't know about the problem!
Alex Lavrov.
Honored Contributor

Re: Telnet hang problem

It's not routing problem, because "inetd -c" actually hepled few times.
I don't give a damn for a man that can only spell a word one way. (M. Twain)
morganelan
Trusted Contributor

Re: Telnet hang problem

Hi,
I think you must do the following testing:
The Transport Level Loopback Test can be implemented using Internet Services. In this case, you use telnet and ftp to systematically focus on a problem.

A.Execute: telnet to remote host. Try to establish a telnet connection to the remote host.
B.Successful? If your telnet attempt was successful, stop. The connection is okay through the Transport Layer (OSI Layer 4).
C.Execute: ftp to remote host. Unlike telnet, ftp does not go through a pseudo-terminal driver (pty) on your system. This step tests to see if the pty is why telnet failed.
D.Successful? If ftp is successful, you likely have a problem with a pty on your system. Contact your HP representative.
E.TCP configured on local or remote host? Neither telnet or ftp will work if TCP is not configured on either side of the connection. Check the /etc/protocols file on both hosts to be sure TCP is installed and configured.
F.Configure TCP. If necessary, install TCP on either or both hosts.
G.Network congested? If TCP is installed on both hosts, do a file transfer to another remote host on the network. Use netstat to check for lost packets.

If 10 percent or more packets are lost, the network is extremely busy. If you cannot determine the cause, contact your HP representative for help.

If both ftp and telnet fail, the /etc/inetd.conf file may be configured incorrectly or the inetd daemon may not be running on the remote system.

If the problem is not resolved, more detailed diagnostics are required. Again, contact your HP representative.
Kamal Mirdad
Alex Lavrov.
Honored Contributor

Re: Telnet hang problem

FTP works fine, so I'll check the "pty" direction.


TCP is obviously installed :-)

thanx
I don't give a damn for a man that can only spell a word one way. (M. Twain)
Ermin Borovac
Honored Contributor

Re: Telnet hang problem

Any errors in syslog? Make sure you run 'inetd -l' to enable connection logging.

Please post 'what' string on /usr/bin/telnet and /usr/lbin/telnetd.

Have you tried tusc'ing inetd to see what happens when it forks telnetd? Make sure you use -f flag when you run tusc.
Ermin Borovac
Honored Contributor

Re: Telnet hang problem

If telnet/telnetd are not patched look into installing latest telnet/telnetd patch for your version of HP-UX.

There are known issues with utmp/utmpx file corruption causing telnet hang with symptoms similar to yours.

Patches you should be looking into installing are PHNE_28841 for 11.11 or PHNE_26096 for 11.00. Look at patch notes for details.
Steve Steel
Honored Contributor

Re: Telnet hang problem

Hi


If you are using

/var/adm/inetd.sec

try putting ip in place of hostnames


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Alex Lavrov.
Honored Contributor

Re: Telnet hang problem

The system is patched. GQP 7/2005 was installed 2 weeks ago and I'm not using inetd.sec.

I think there is something that messes up the inetd, but I don't know what is it.
I don't give a damn for a man that can only spell a word one way. (M. Twain)
Ermin Borovac
Honored Contributor

Re: Telnet hang problem

When you issue 'telnet 0' on the server do you see telnetd running? If so, try tracing telnetd with tusc to see what it's doing.
Alex Lavrov.
Honored Contributor

Re: Telnet hang problem

Yes, inetd spawns telnetd and telnetd spawns telnet. The strange thing I noticed, that after some time they both die and I get "Connection closed".
I don't give a damn for a man that can only spell a word one way. (M. Twain)
generic_1
Respected Contributor

Re: Telnet hang problem

Do you have quotas on the server? This might cause issues. Also make surey our .profile and related pofile files have not been edited since the problem began. Check your /etc/passwd and see what shell you are pointing too. Check with your network folks and make sure there are no duplicate ips :), and that there are no new firewall settings. Check to see if you can telnet from either directions. Make sure you dont have /etc/securetty if your doing as root. Check your services files and make sure something didnt get fat fingered.
Steven E. Protter
Exalted Contributor

Re: Telnet hang problem

inetd -l

if enhanced logging is not available.

On the console

tail -f /var/adm/syslog/syslog.log

Make the telnet error happen. Lets see what Mr. Syslog has to say.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Alex Lavrov.
Honored Contributor

Re: Telnet hang problem

Well, if someone is interested, the problem was solved.

After sending endless logs and traces to some HP network guru, he found that the combination of "dtelnet" (http://dtelnet.sourceforge.net/) + rlogin + hpux just doesn't work. Every time that I logged in through rlogin into hpux, telnet hangs. It's doesn't hand when I logged in with telnet. Weirdest thing, but that's what traces, tusc and logs tell.

Alex.
I don't give a damn for a man that can only spell a word one way. (M. Twain)