This chapter describes how to identify and correct problems while running your application. Troubleshooting includes the following topics:
Before you begin troubleshooting, you can verify the version number of the MessageQ MVS Client library you are running by enabling tracing of Client Library activity, running your application, and checking the error log file, Problems at runtime can arise from many different circumstances. To identify and solve problems with the MessageQ MVS Client, follow these steps:
DMQELOG
, for the version number.
Run-time Errors
DMQELOG
file to get more information about the problem.
Network errors are identified in the error log file.
Review the following topics in this guide for more information on finding and resolving problems.
Run-time errors detected by the Client library are written to the DMQELOG
file. The errors indicate a run-time problem due to a configuration error, an application error, network problem, or unexpected server response.
Error logging can be enabled or disabled by changing the MessageQ MVS Client Configuration Logging option. Refer to Chapter 3 for instruction on how to configure error logging.
The MessageQ MVS Client attempts to establish a connection to the CLS in response to a call to pams_attach_q
. The attempt to establish a connection fails immediately when:
When the connection attempt fails, Check the DMQELOG error file for the host name, and the endpoint of the server system with which the MessageQ MVS Client attempted to connect. Either start the CLS on the server system, or reconfigure the MessageQ MVS Client default server.
Network errors result from the Client library receiving an error when attempting to read or write on the network link. Occasional network connection problems can occur due to the state of the TCP/IP protocol stack or the network connection to the host system. Network errors are identified by the return status from the Network connection errors might also occur when attempting to execute any of the MessageQ API functions. For example, the The specific steps for clearing the network error depend on how the problem developed. The following actions will generally clear the problem:
pams_attach_q
returns the following error status:
PAMS__NETNOLINK
Network Errors
pams_attach_q
function, such as the following:
PAMS__NETNOLINK
pams_put_msg
and pams_get_msg
functions return the following return code when the connection to the server is broken and MRS is not enabled:
PAMS__NETERROR
Table 5-1 lists the common TCP/IP error status codes logged to the file DMQELOG
when the MVS Client cannot connect to the CLS. These error codes may also be logged when using the DECnet transport.
To obtain a time-stamped output file showing the sequence of MessageQ function calls and return status codes, follow the steps outlined in Chapter 3 for Configuring Tracing. The information from the pams_
function call trace is written to the dmqelog
file in the default directory for the application. The PAMS tracing option can be useful for observing the sequence of message function calls to determine the run time behavior of the application.
To obtain detailed, time-stamped traces of the client library activity, enable the DmqclTrace option in the client configuration file.
Occasionally, applications crash (particularly during development) and do not have an opportunity to close or return resources in use before terminating. Applications using the MessageQ MVS Client attached to the message queuing bus that terminate without calling pams_exit
or pams_detach_q
leave many resources allocated but not available for reuse. Resources that are in use after a client application crash include:
After the client crashes, the server system still has an open connection to the client and the CLS remains attached to the primary queue used by the client. The network protocol keep-alive mechanism does not notify the server that the client has gone away for a lengthy time period. Typically, you can reboot the client system and the server still functions as though it has a connection open to the client.
Restarting the client application usually establishes a new connection to CLS. If network connect errors occur, follow the troubleshooting procedure described in the Network Errors topic. The procedure releases and frees all resources used by the client.
If the client application calls If the client application calls pams_attach_q
using either ATTACH_BY_NAME or ATTACH_BY_NUMBER to attach to a specific primary queue, the CLS detects a client reconnect attempt and automatically terminates the CLS instance (server process or thread) attached to the same message queue. Reconnecting to the same queue is only accepted if the client application is attempting to reconnect from the same host as the previous connection.
pams_attach_q
using the ATTACH_TEMPORARY attach mode, a new instance of the CLS is started to support the client reconnect. The previous instances of the CLS remains active. For information about terminating CLS servers, see the CLS topic in the Installation and Configuration Guide for your MessageQ server platform.