There are conditions that will cause a log stream connection token
to no longer be valid. This means that the unique log stream connection
identifier, or the STREAMTOKEN, is no longer considered valid by system
logger and the application receives an "expired log stream
token" error response (refer to IxgRsnCodeExpiredStmToken in IXGCON
macro) for Logger service requests using a stream token as input.
An expired log stream token can be the result of an application
explicitly or implicitly disconnecting from a log stream, or it
can be the result of an action within system logger from either the
CFRM policy, system environmental conditions, or from internal or
system logger component errors. When an application encounters
an "expired stream token" condition unexpectedly, then it should re-connect
to the log stream and obtain a valid stream token before making any
subsequent Logger service requests.
An expired log stream can occur under the following conditions:- The log stream connector disconnects from the log stream by issuing
an IXGCONNREQUEST=DISCONNECT,STREAMTOKEN=xstreamtoken and then issues
another system logger services attempting to use the same
STREAMTOKEN value.
- The task (represented by a TCB or Task Control Block) that
connected to the log stream terminates. This is often a problem that
surfaces early in the coding of an application. Typically the application
creates an initialization task to obtain resources. That task connects
to the log stream, stores the log stream in persistent storage, and
then terminates.
Because in this situation the "owning" task
ended (through an end-of-task resource management operation), system
logger automatically disconnects from the log stream. The correction
for this is to connect to the log stream from a task that does
not terminate until the log stream is no longer needed.
- Any job step task (JST) terminates within the address space that
has a connection to the log stream. System logger treats any job step
task termination in a manner similar to an address space termination.
That is, all log stream connections are disconnected and logger associations
are terminated with the address space.
If this condition occurs
and there remains an expected use of a log stream, a new log stream
connection will be required.
- Based on how and where the log stream token is maintained in the
connector's storage, the system might pass an incorrect log stream
to system logger. If the incorrect log stream token meets the
format expected by system logger, then a return code X'04',
reason code X'82D' (IxgRsnCodeExpiredStmToken) condition
is returned. Otherwise, the incorrect log stream token results
in the return code X'08', reason code X'806' (IxgRsnCodeBadStmToken)
condition.
An expired log stream token not caused by application can occur
under the following conditions:- For coupling facility log streams, that you are not currently
using, Logger can also disconnect a requestor when certain structure
failure conditions occur.
- After an I/O or access error occurs for a staging data set, if
system logger is unable to allocate a new data set for DASD-only log
streams, system logger automatically disconnects the log stream.
- System logger disconnects all connectors on the target
system as a result of an operator SETLOGR FORCE,DISConnect,LSN=logstreamname command.
- When the system logger address space terminates and is restarted
while the log stream connector was persistent (that is the application
address space and connecting task remained intact) then any subsequent
use of a log stream token obtained before system logger terminated
would be considered expired.
- Severe error conditions can also occur within the Logger
component that might cause the log stream to be disconnected
unexpectedly.
Note that system logger will not disconnect a connector
for log stream offload data set allocation errors or data set "full"
conditions. The allocation of log stream offload data sets does not result
in an "expired log stream token" condition.