OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide

Recovering From Errors
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide—424822-001
6-22
Recovering From a GIP Failure
Recovering From a GIP Failure
If a GIP fails while in session with a client process, the client eventually receives a
status error code that indicates the current gateway session has been aborted. The
error code is returned by the current or next called GPI procedure. When this occurs, it
is the client’s responsibility to recover the aborted session. Typically, the client will
re-establish the session by a call to GPI_OPEN_ .
Recovering From a Client Failure
A GIP is prepared to receive CLOSE system messages when a client process terminates.
Also, it inspects CPU DOWN messages to check if the client process CPU has failed.
Whenever a client closes a gateway session or the client process dies, the GIP receives a
CLOSE system message on its $RECEIVE.
Normal end-of-session cleanup in the GIP includes removing any messages that the
client had reserved and placing them back on the unreserved message queue. Closing a
session with messages still reserved causes them to become unreserved. Other normal
GIP cleanup activities include closing previously opened PDU stores, and closing
associations with the MRP, the entry manager, the wait manager, and the MHS manager.
Memory resources that are no longer required are also freed.
When a client backup process takes over it needs to re-initialize the GPI library memory
space and establish new sessions.
Recovering From Fatal and Internal GPI Errors
A GPI fatal or internal error can disrupt a session without resulting in a terminated client
or GIP process.
If the error is due to a GIP problem, as indicated by a status code in the 6000-7000
range, the recovery is the same as if the GIP had terminated. For other fatal and internal
errors, the recovery is to call GPI_INITIALIZE_ .
If GPI_INITIALIZE_ is called before current sessions are closed, GPI_INITIALIZE_
closes those sessions, discards session data, and causes any reserved root objects to
become unreserved (unreserved and reserved states are described in Section 2, The GPI
Library.) Normally, the client should close all current sessions with GPI_CLOSE_
before calling GPI_INITIALIZE_ .
Common GPI Errors
Several problems with the operation of the GPI have their root cause in an easily
overlooked configuration requirement or a simple oversight. These problems are
correspondingly easy to fix. This section identifies some of the most common problems
encountered in setting up and using the GPI.
This is not a complete list of possible errors. For a complete list of all the errors
generated by the GPI and the GPI-related errors generated by OSI/MHS, refer to the
OSI/MHS GPI Reference Manual.