IBM Support

IC85840: WEBSPHERE MQ V7.5 JMS APPLICATION RECEIVES THE EXCEPTION "JMSCMQ0002: THE METHOD 'MQCTL' FAILED."

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When a durable subscription is being used, a WebSphere MQ
    classes for JMS application fails to automatically reconnect
    and restore the Connection/Session/Subscription state
    correctly.
    
    Once a network connection is broken after a durable
    subscription has been established, a call to:
    
    Subscrption.close()
    
    produces the exception:
    
    com.ibm.msg.client.jms.DetailedJMSException: JMSCMQ0002: The
    method 'MQCTL' failed. A WebSphere MQ call failed. Please see
    the linked exception for more information.
    at
    com.ibm.msg.client.wmq.common.internal.Reason.reasonToException
    (Reason.java:585)
    at
    com.ibm.msg.client.wmq.common.internal.Reason.createException
    (Reason.java:221)
    at
    com.ibm.msg.client.wmq.common.internal.Reason.createException
    (Reason.java:259)
    ...
    Caused by: com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call
    failed
    with compcode '2' ('MQCC_FAILED') reason '2534'
    ('MQRC_OPERATION_NOT_ALLOWED').
    at
    com.ibm.msg.client.wmq.common.internal.Reason.createException
    (Reason.java:209)
    ... 9 more
    Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2534
    at com.ibm.mq.jmqi.remote.impl.RemoteReconnectThread.reconnect
    (RemoteReconnectThread.java:500)
    at com.ibm.mq.jmqi.remote.impl.RemoteReconnectThread.run
    (RemoteReconnectThread.java:133)
    at
    com.ibm.msg.client.commonservices.workqueue.WorkQueueItem.runTas
    k
    (WorkQueueItem.java:214)
    at
    com.ibm.msg.client.commonservices.workqueue.SimpleWorkQueueItem.
    runItem(SimpleWorkQueueItem.java:105)
    at
    com.ibm.msg.client.commonservices.workqueue.WorkQueueItem.run
    (WorkQueueItem.java:229)
    at
    com.ibm.msg.client.commonservices.workqueue.WorkQueueManager.
    runWorkQueueItem(WorkQueueManager.java:303)
    at com.ibm.msg.client.commonservices.j2se.workqueue.
    WorkQueueManagerImplementation$ThreadPoolWorker.run
    (WorkQueueManagerImplementation.java:1219)
    

Local fix

  • none <br/>
    

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    This issue users of the WebSphere MQ V7.5 classes for JMS who
    have applications that connect to a queue manager using a
    Connection Factory which has the following properties defined:
    
    - TRANSPORT : CLIENT
    - CLIENTRECONNECTOPTIONS : ANY or QMGR
    
    and then register a MessageListener with a MessageConsumer, by
    calling the method
    MessageConsumer.setMessageListener(MessageListener).
    
    
    Platforms affected:
    MultiPlatform
    
    ****************************************************************
    PROBLEM SUMMARY:
    When a WebSphere MQ queue manager is stopped using the command:
    
    endmqm -r
    
    any WebSphere MQ V7.5 classes for JMS applications that have
    connected to the queue manager and specified the property:
    
    CLIENTRECONNECTOPTIONS : QMGR
    
    will automatically try to reconnect to the same queue manger.
    Applications that had connected to the queue manager
    specifying the property:
    
    CLIENTRECONNECTOPTIONS : ANY
    
    will use the information in the CONNECTIONNAMELIST property to
    try and connect to a queue manager with the same name as the
    queue manager they were originally connected to, on either the
    same or a different machine.
    
    In order to perform the automatic client reconnection, the
    WebSphere MQ classes for JMS create an internal
    RemoteReconnectThread that runs in the background and tries to
    re-establish a connection to a queue manager. Applications using
    the WebSphere MQ classes for JMS will continue to run, until
    such time as they need to access the queue manager they were
    previously connected to which has been stopped. When this
    happens, the application will block until automatic reconnection
    has completed and a new connection to a queue manager has been
    created. Once the WebSphere MQ classes for JMS have
    re-established a connection to a queue manager, the
    application will continue to run.
    
    When an application registers a MessageListener with a
    MessageConsumer, by calling the method:
    
    MessageConsumer.setMessageListener(MessageListener)
    
    the WebSphere MQ classes for JMS use the WebSphere MQ APIs MQCTL
    and MQCB to set up asynchronous message delivery for the
    application. When the application calls the method:
    
    MessageConsumer.close()
    
    to close the MessageConsumer, the WebSphere MQ classes for JMS
    suspend the asynchronous message delivery for the application by
    calling MQCTL and specifying the MQOP_SUSPEND operation code.
    
    If the application had connected to a queue manager using a
    Connection Factory which had the property:
    
    CLIENTRECONNECTOPTIONS
    
    set to either ANY or QMGR, and the queue manager that the
    application was connected to was stopped using the command:
    
    endmqm -r
    
    at the same time as the application called the method:
    
    MessageConsumer.close()
    
    then the WebSphere MQ classes for JMS got into an inconsistent
    state. Internally, the WebSphere MQ classes for JMS recorded the
    fact that asynchronous message delivery had been suspended and
    then tried to call the WebSphere MQ API MQCTL with the
    MQOP_SUSPEND operation code.
    
    However, because the queue manager that the application was
    connected to had been stopped, the internal
    RemoteReconnectThread had started, reconnected to a queue
    manager and then tried to start asynchronous message delivery.
    Because the WebSphere MQ classes for JMS had marked the state of
    the asynchronous message delivery as suspended, the WebSphere MQ
    classes for JMS determined that it was invalid for the
    RemoveReconectThread to start asynchronous message delivery,
    which resulted in the exception reported in the APAR being
    thrown back to the application.
    

Problem conclusion

  • The WebSphere MQ classes for JMS have been updated to allow
    the RemoteReconnectThread to start and then suspend asynchronous
    message delivery, if an application is calling:
    
    MessageConsumer.close()
    
    when the queue manager that it is connecting to is stopped and
    restarted using the command:
    
    endmqm -r
    
    ---------------------------------------------------------------
    The fix is targeted for delivery in the following PTFs:
    
    Platform           v7.5
    --------           --------------------
    Multiplatforms     7.5.0.1
    
    The latest available maintenance can be obtained from
    'WebSphere MQ Recommended Fixes'
    http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg27006037
    
    If the maintenance level is not yet available information on
    its planned availability can be found in 'WebSphere MQ
    Planned Maintenance Release Dates'
    http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg27006309
    ---------------------------------------------------------------
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC85840

  • Reported component name

    WMQ BASE MULTIP

  • Reported component ID

    5724H7241

  • Reported release

    750

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-08-10

  • Closed date

    2012-09-28

  • Last modified date

    2012-09-28

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    WMQ BASE MULTIP

  • Fixed component ID

    5724H7241

Applicable component levels

  • R750 PSY

       UP

[{"Line of Business":{"code":"LOB36","label":"IBM Automation"},"Business Unit":{"code":"BU053","label":"Cloud \u0026 Data Platform"},"Product":{"code":"SSFKSJ","label":"WebSphere MQ"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.5"}]

Document Information

Modified date:
19 September 2021