Operating System - HP-UX
1838244 Members
4146 Online
110125 Solutions
New Discussion

telnet session terminates abruptly

 
Jagan Mangalampalli
New Member

telnet session terminates abruptly

if there is no key board or mouse activity the telnet session hangs. could any body tell me what can be the problem
5 REPLIES 5
James A. Donovan
Honored Contributor

Re: telnet session terminates abruptly

Does the session hang, or are you disconnected?
If the latter then check the value of the TMOUT environment variable.

# echo $TMOUT

If it's >0 then sessions will timeout in that many seconds of inactivity.
Remember, wherever you go, there you are...
Jagan Mangalampalli
New Member

Re: telnet session terminates abruptly

hi jim,
thanks the session hangs and and if i try click with muse or use key board i get the message "telnet sesion aborted" .
TMOUT is set to 0 .
Celso Medina Kern
Trusted Contributor

Re: telnet session terminates abruptly

First thing I would do is to monitor what is happening with telnetd on server side. You can use Glance and lsof to see what resources it is using and what is the state of the process(if the server is an hp-ux). Look for telnetd messages in your syslog.log file. To have "abort" in client, it suggests that the server is aborting the connection for some reason.

Other very important thing is to use a sniffer (nettl in hp-ux) to trace the connection. Some times you have network problems that cause very strange behaviours. In hp-ux, you can do the following:
- restart nettl: nettl -stop;nettl -start;
- start your client telnet connection;
- discover the telnetd PID and monitor it. It is the father of your shell;
- start to capture a trace:
/usr/sbin/nettl -traceon hdrin hdrout pduin \ pduout logging -entity ns_ls_ip -file /tmp/tn -size 1024 -m 128
- When the problem happens, restart nettl:
nettl -stop; nettl -start
- to format the trace file capturing only data from your client, create a filter cfg file, i.e.: vi /tmp/fmt.cfg
formatter filter subsystem !*
formatter filter subsystem NS_LS_IP
filter tcp_sport 23 # telnet service
filter tcp_dport 23 # telnet service
filter ip_saddr 15.76.184.107 #IP/telnetclient
filter ip_daddr 15.76.184.107 #IP/telnetclient

- format the trace:
/usr/sbin/netfmt -c /tmp/fmt.cfg -N -f /tmp/tn.TRC0 > trcout0
/usr/sbin/netfmt -c /tmp/fmt.cfg -N -f /tmp/tn.TRC1 > trcout1

Now you are able to analise formated data in trcout0 and trcout1 and see who is terminating the connection. You should also determine what is going on with your telnetd on server side. To discover what socket is being used by telnetd, use lsof. To monitor the telnetd process, use ps -efl inside a while. To monitor proccess state, use glance.

If it appears to be a tough task, open a Response Center call and provide with all data you have collected.

Good luck!


God bless pessimists, they did the backup!
Vincenzo Restuccia
Honored Contributor

Re: telnet session terminates abruptly

You can see /var/adm/inetd.sec.
Celso Medina Kern
Trusted Contributor

Re: telnet session terminates abruptly

One more thing I?ve remembered. Some weird behaviours happen when you get a duplicated IP in your server, like hangs/aborts. hp-ux catches this events. Issue a `netfmt -N -f /var/adm/nettl.LOG00` and look for "duplicated IP address" or "is trying to use our address" in the output. If it does show up, look what is the LAN address in the output and find it physically in your network to change to another IP.
God bless pessimists, they did the backup!