IBM Support

JMS connections fail with Reason Code 2019

Technote (troubleshooting)


Problem(Abstract)

An application running in WebSphere® Application Server may receive failures when sending messages to, or receiving messages from, a WebSphere MQ or Embedded Messaging queue. The MQ reason code associated with the error is 2019. For example:

javax.jms.JMSException: MQJMS2002: failed to get message from MQ queue
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:540)
at com.ibm.mq.jms.MQSession.consume(MQSession.java:2950)
at com.ibm.mq.jms.MQSession.run(MQSession.java:1484)
at com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java:924)
at com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage(ServerSession.java:752)
...
---- Begin backtrace for Nested Throwables
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2019
at com.ibm.mq.jms.MQSession.consume(MQSession.java:2924)
at com.ibm.mq.jms.MQSession.run(MQSession.java:1484)
at com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java:924)
at com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage(ServerSession.java:752)
...

Note that the cause of the JMSException can be determined by the MQ reason code that appears in the backtrace. In this case, it is reason code 2019.

Cause

Reason code 2019 usually occurs after a connection broken error (reason code 2009) occurs. You would see a JMSException with reason code 2009 preceding reason code 2019 in the SystemOut.log. Reason code 2009 indicates that the connection to the MQ queue manager is no longer valid, usually due to a network or firewall issue.

Reason code 2019 errors will occur when invalid connections remain in the connection pool after the reason code 2009 error occurs. The next time that the application tries to use one of these connections, the reason code 2019 occurs.


Resolving the problem

To resolve the problem, change the Purge Policy for the connection and session pools used by your queue connection factory (QCF) or topic connection factory (TCF) from its default value of FailingConnectionOnly to EntirePool. With this setting, the entire pool of connections will be purged when the reason code 2009 error occurs and no broken connections will remain in the pool.


To do this:

  1. Select the QCF or TCF that your application is using in the Administration Console.
  2. Under Additional Properties: Select Connection Pool and set the Purge Policy to EntirePool.
  3. Then select Session Pools and set the Purge Policy to EntirePool.
  4. After making these changes, save your configuration and
  5. Restart the application server for the changes take effect.

Cross reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK

Document information

More support for: WebSphere Application Server
Java Message Service (JMS)

Software version: 7.0, 8.0, 8.5.5, 9.0

Operating system(s): AIX, HP-UX, Linux, Solaris, Windows

Software edition: Base, Network Deployment

Reference #: 1229508

Modified date: 03 February 2006


Translate this page: