Operating System - HP-UX
1833984 Members
2130 Online
110063 Solutions
New Discussion

Re: session hangs at the time of exit

 
vaman
Frequent Advisor

session hangs at the time of exit

I have a 9000/800/rp3440 server with hpux 11.31 installed on it. When I exit any login session by exit command or Cntrl + D , my session hangs. Pl let me know what could be the problem.

vaman kulkarni
6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: session hangs at the time of exit

Shalom varman,

First thing I'm going to tell you is that 11.31 has yet to be released. Please do a uname -a and tell us the actualy operating system.

I suggest this prior to logging out:
stty -a
env > /tmp/env.txt

Lets see what the environment looks like.

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
Bill Hassell
Honored Contributor

Re: session hangs at the time of exit

It sounds like someone has been playing around with traps in your profiles. Start with this:

grep trap /etc/profile $HOME/profile

What you are looking for a trap statement for trap 0 (the exit signal), something like this:

trap "$HOME/.logout" 0

What this says is to run the script called .logout when the user exits. If the script is defective, the hang can occur inside this script. There are countless other items that might be in that trap statement so diagnosing the failure is not easy at all. But fixing it is very easy: comment or remove the trap.

Another possibility is someone has messed with trap 1 (which is called SIGHUP, the action to take if the session has been hing up). Run the grep command above and post the results so we can see what may be happening.


Bill Hassell, sysadmin
vaman
Frequent Advisor

Re: session hangs at the time of exit

Hi Bill & Steven
I tried .logout the way u said, but I am not getting anything with 0 & 1
I compared with working machine of same os, the env settings are same.
& the OS ..uname o/p is as
HP-UX vmpa3 B.11.31 U 9000/800 3481275434 unlimited-user license,
Is the exit signal creating issues, in that case how can I catch the daemon/process.
vaman kulkarni
Bill Hassell
Honored Contributor

Re: session hangs at the time of exit

The .logout comment was an example of a possible trap setup somewhere in your profiles. Login to a user that hangs on exit and type the command:

trap

Post the response. This will tell you what is happening with the traps.

Now I am assuming that when you say your logout "hangs", you mean that you can no longer get a login prompt. If instead you mean that the window on your PC doesn't disappear when you logout, that is a totally different symptom and the fix is in your PC.


Bill Hassell, sysadmin
vaman
Frequent Advisor

Re: session hangs at the time of exit

Hi Bill,

Yes, my session window do not disappear after exit, but this is happening for only couple of servers, rest others are working fine with similar OS revision & model. Even one of the server which was having this issue, is now working fine ( offcourse I dont know the reason!). So I dont think this is because of my PC or windows.
vaman kulkarni
Bill Hassell
Honored Contributor

Re: session hangs at the time of exit

So I was mistaken that the logout is 'hanging'. If something was hanging at the end of a logout, you would not get any prompt to login (in the same window). If I understand correctly, you are expecting the telnet window to close and disappear when you logout. This behavior is a terminal emulator feature and is part of the program you use to connect to the rp3440.

There are hundreds of terminal emulator programs, some based on Xwindows (Reflection/X, Exceed, etc) and others are standalone (Hyperterminal, Reflection/HP, Attachmate, QCTerm, etc). Many programs have default actions when the telnet session is closed, some leave the window running so you can login again while others close the window. And some programs have options to select what to do once the session is closed.

Now Xwindows is quite tricky. While a terminal window will appear on your PC, it did not originate on your PC. Instead, the actual program (xterm, dtterm, hpterm) is running on your server and this program tells your PC how to make and decorate the telnet window. Therefore, options for closing the window are actually stored on the server.

And finally, the actual telnet and TCP/IP protocol that occurs as the session is disconnected is fairly complex. For instance, there may an stty setting that is different on the server(s) that do not close your window at logout. You can run the commands:

trap
stty -a

on both the problem server(s) and others that work OK and compare the results. Otherwise, use the HP-UX network trace (nettl) or get a copy of Ethereal to trace the closing protocol and you'll be able to track down the differences.


Bill Hassell, sysadmin