IBM Support

MQJMS2007 Completion Code 02 and reason code 2085 after a network timeout

Troubleshooting


Problem

A JMS application successfully accessed an IBM MQ queue. After two or so hours, it received MQJMS2007 Completion Code 02 and reason code 2085.

Cause

Here is the sequence of events:

  1. The application created JMS connection and session objects. This resulted in a connection to MQ for each session object, as most work is performed against the session.
  2. A temporary dynamic queue was created. For JMS, temporary queues should remain for the life of the JMS connection object. To achieve this in MQ, a separate connection was created to the queue manager (a new SVRCONN channel instance with its own TCP/IP socket). A temporary dynamic queue (for example, AMQ.C7E4D882693BC507) was created using this SVRCONN.
  3. The JMS sessions performed more work over their own channel instances (including putting to the temporary queue).
  4. After some unknown period of time, the TCP/IP connection for the JMS connection described in step 2 above was broken. This is likely to have happened because no further work occurred on that channel, and some component of the network, such as a firewall, chose to time out the connection. Neither the client nor the MQ server detected this failure immediately.
  5. On the server, the channel was waiting for more requests from the client, using a TCP/IP receive call. After 2 hours, the keepalive value for the socket (from the system default) caused a probe packet to be sent to test that the TCP/IP connection was still valid. This failed, and the queue manager was notified that the connection was broken.
  6. The queue manager ended the channel with CSQX259E (z/OS) or AMQ9259 (distributed), and cleaned up the resources owned by the channel. This caused the temporary queue to be deleted.
  7. The client detected the broken connection in one of two ways:
    a) Trying to put a message to the temporary queue by way of another channel instance. Since the temporary dynamic queue no longer existed, this failed with 2085 (MQRC_UNKNOWN_OBJECT_NAME).
    b) Trying to create a new temporary queue. This attempted to use the broken connection, and resulted in a 2009 (MQRC_CONNECTION_BROKEN) error.

Resolving The Problem

Work with the network/firewall owners to determine where the connection is being dropped, and what the timeout value is for that firewall.

  • An option is to establish a different timeout policy for connections to the queue manager such that the firewall no longer drops the inactive sockets.
  • It is possible that the firewall will treat a keepalive probe as activity on the TCP/IP connection. In this case, when you set the channel's keepalive value to less than the firewall's timeout, probes are sent at an interval which prevents the connection from being dropped.

    See Setting the TCP/IP KeepAlive interval to be used by WebSphere MQ. Note the differences for JMS clients. Also, for a z/OS queue manager, with PK51598 applied to V6.0.0, or at V7 and higher base, KAINT=AUTO for a SVRCONN means that the default TCP INTERVAL will be used (rather than HBINT+60 as for other channels). This means you need to set KAINT to an integer, which should be greater than HBINT.

  • If a V7 or higher JMS client is connecting to a V7 or higher queue manager, and SHARECNV is nonzero on the SVRCONN definition, heartbeat packets will flow based on the HBINT setting. This could prevent the timeout or detect the timeout in a more timely manner.

[{"Product":{"code":"SSFKSJ","label":"WebSphere MQ"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Java","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF012","label":"IBM i"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"},{"code":"PF035","label":"z\/OS"},{"code":"PF025","label":"Platform Independent"}],"Version":"9.0;8.0;7.5;7.1;7.0;6.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Product Synonym

IBM MQ Websphere MQ WMQ

Document Information

Modified date:
21 June 2018

UID

swg21566516