Operating System - OpenVMS
1753256 Members
6505 Online
108792 Solutions
New Discussion юеВ

Re: VMS processes left hanging

 
SOLVED
Go to solution
Hoff
Honored Contributor

Re: VMS processes left hanging

Given there was an IP stack swap, it seems reasonable to assume that a keepalive was previously implemented and that the setting was lost when the stack switch occurred.

And I'd tend to enable the virtual terminals in any case.
Matt Muggeridge
Occasional Advisor
Solution

Re: VMS processes left hanging

The following text is planned for the next release of TCP/IP Services. It may help clarify a few details. (This is draft-only).

Virtual Terminals
=================

Overview
--------
Virtual terminals allow a user to seamlessly continue an interactive
terminal session across a network disconnect. This is achieved by the
system saving the virtual terminal's process context at the time of the
disconnect. When the user establishes a new login session, they will
be prompted to connect to any pre-existing virtual terminals, and so
seamlessly continuing their session.

Both TELNET and RLOGIN may be configured to use virtual terminals.

When virtual terminals have been enabled, the user's terminal will now
appear as a VTA device, rather than a TNA device. This can be observed
using the SHOW TERMINAL command.

NOTE: Virtual terminals will not be created for users with
communication proxies. The terminal type will continue to be TNA.

Managing Virtual Terminals and Logical Names
--------------------------------------------
Follow the steps below to enable and manage virtual terminals:

1) Create the VTA device (if it is not already created)

The TTDRIVER may be loaded dynamically via:

$ SHOW DEV VTA0:
%SYSTEM-W-NOSUCHDEV, no such device available

If the VTA0 device does not exist, then create it using SYSMAN:

$ RUN SYS$SYSTEM:SYSMAN
SYSMAN> IO CONNECT VTA0 /NOADAPTER /DRIVER=SYS$TTDRIVER

The SYS$STARTUP:SYSTARTUP.COM procedure contains the template for
loading the TTDRIVER during system startup.


2) Enable virtual terminals for the service
For TELNET, use:

$ DEFINE/SYSTEM/EXEC TCPIP$TELNET_VTA "TRUE"

For RLOGIN, use:

$ DEFINE/SYSTEM/EXEC TCPIP$RLOGIN_VTA "TRUE"

It is recommended this be placed in one of the system startup
command procedures, e.g. SYS$STARTUP:TCPIP$SYSTARTUP.COM.


3) Allow Terminal Disconnect when a Hangup Occurs

This is achieved by modifying the SYSGEN parameter, TTY_DEFCHAR2 to
enable the TT2$M_DISCONNECT feature on the terminal.

Edit MODPARAMS.DAT to set the TT2$M_DISCONNECT bit. For example, in
MODPARAMS.DAT add a line similar to:

! Set AUTOBAUD + EDITING + DISCONNECT.
MIN_TTY_DEFCHAR2 = 2 + %X1000 + %X20000

To take affect, this will require an AUTOGEN and reboot of
the system.


4) Disconnected terminals are deleted after TTY_TIMEOUT

Virtual terminals in the disconnected state will be automatically
deleted after the sysgen TTY_TIMEOUT interval has expired.

By default, the TTY_TIMEOUT value is 900 seconds, (15 minutes).
This means that after the TCP keepalive has expired and the TCP
connection closes, the user has an additional 15 minutes to
reestablish the virtual terminal before it is disconnected.
If this is inadequate, it may be modified by editing MODPARAMS.DAT
and using AUTOGEN. Note that this parameter can be modified
dynamically. For example edit MODPARAMS.DAT with a line similar to:

MIN_TTY_TIMEOUT = 60 * 60 * 24 * 14 ! 14 days


Modifying Disconnect Time
-------------------------
When a communication path is broken, the time it takes for TCP connections
to be closed is affected by several factors. The network administrator
can modify the time it takes for TCP to detect a network outage by
adjusting the keepalive attributes.

Faster detection of network outages may be desirable when using virtual
terminals. For instance, after the keepalive timeout, the user can telnet
back into the system, (probably via another path), to continue working in
the previously disconnected session.

For more information, refer to the tuning and troubleshooting guide where it
discusses the keepalive attributes, tcp_keepidle, tcp_keepintvl, tcp_keepcnt.
Note that these attributes will affect all subsequent connections on the
system.

To dynamically modify the sysconfig attributes, use:

$ @sys$manager:tcpip$define_commands
$ sysconfig -r inet tcp_keepalive_default=1 ! Enable keepalives
$ sysconfig -r inet tcp_keepidle=150 ! 75 seconds

The services must be restarted to make use of these dynamically modified
attributes. E.g. to restart TELNET:

$ @SYS$STARTUP:TCPIP$TELNET_SHUTDOWN
$ @SYS$STARTUP:TCPIP$TELNET_STARTUP

For permanent changes, it is recommended that the sysconfig attributes be
modified in TCPIP$ETC:SYSCONFIGTAB.DAT. E.g. add a stanza similar to:

inet:
tcp_keealive_default=1
tcp_keepidle=150


Example of Virtual Terminals
----------------------------
With virtual terminals enabled, a user's interactive login session
will display a VTA terminal type.

$ telnet hang10
Username: rider
Password: xxxx

HANG10> write sys$output f$getdvi("TT", "DEVNAM")
_VTA1:
HANG10> disconnect

By disconnecting the session without logging out, (e.g. close the
window or issue DISCONNECT), the VTA1: will persist. When a subsequent
login occurs, the user is prompted to reestablish their connection to
the virtual terminal, e.g.:

$ telnet hang10
Username: rider
Password: xxxx

You have the following disconnected process:
Terminal Process name Image name
VTA1: _VTA1: (none)
Connect to above listed process [YES]:

In addition, you may use the DCL commands DISCONNECT and CONNECT. For
example:

$ show device vt

Device Device Error
Name Status Count
VTA0: Offline 0
VTA2: Online 0
VTA3: Disconnected 0

$ connect vta3
HANG10> write sys$output f$getdvi("TT", "DEVNAM")
_VTA3:

From this point onward, you are now in the VTA3: process context.

Refer to the DCL help for more information on the CONNECT and
DISCONNECT commands.
Hein van den Heuvel
Honored Contributor

Re: VMS processes left hanging

Hi Matt,

Thanks for the heads up in the ITRC Forum!
A few quick question (Sorry Dave for hijacking the topic a little)

1) You mention TELNET and RLOGIN, but not SSH.
Maybe you want to be explicit about SSH in the article?

2) I often see TT2$M_HANGUP recommended along with TT2$M_DISCONNECT.
That may be misinformed. And it maybe a cause / effect confusion.
It maybe good to indicate whether it is relevant or not for a TCP/IP connection.

3) I much like the self-documenting definition: 2 + %X1000 + %X20000
But why not have the decimal result there as well ( = 135170 ) for the hardcore direct SYSGEN users to set it, but more importantly for folks who want to see whether the current definition matches the recommended definition

Thanks!
Hein.

Matt Muggeridge
Occasional Advisor

Re: VMS processes left hanging

>The SYS$STARTUP:SYSTARTUP.COM procedure >contains the template for
>loading the TTDRIVER during system startup.

Of course, that should have been SYS$STARTUP:SYSTARTUP_VMS.COM.

Matt.
PS: Thanks to Heins feedback. We have taken that up in email and I've incorporated feedback where applicable.
Kelly Stewart_1
Frequent Advisor

Re: VMS processes left hanging

We had a similar problem - users walking out of wireless range while logged in - and fixed it by setting the Telnet keepalive timer to 10 minutes. We use Multinet which allows a different keepalive setting for each TCP/IP service (that's probably true of all IP stacks) and Extra! Personal Client on the PCs. Seems to work fine for us.

Kelly