IBM Support

JMS connections fail with Reason Code 2019

Troubleshooting


Problem

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.

[{"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Java Message Service (JMS)","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.0;8.5.5;8.0;7.0","Edition":"Base;Network Deployment","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSNVBF","label":"Runtimes for Java Technology"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Java SDK","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]

Document Information

Modified date:
15 June 2018

UID

swg21229508