IBM Support

IT30751: Java application remains connected to queue manager if PCFAgent.connect() throws an exception

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • A Java application uses the MQ Headers and PCF classes to
    collect queue manager status information for queue managers
    running on z/OS. Due to RACF permissions on one of the queue
    managers, the application is unable to access the
    SYSTEM.ADMIN.COMMAND.QUEUE on one of the queue managers. When
    the application tries to connect to this queue manager, by
    calling the method:
    
    PCFMessageAgent.connect(String host, int port, String channel)
    
    an exception containing reason code 2035 (MQRC_NOT_AUTHORIZED)
    is thrown.
    
    However, the application is connected to the queue manager. The
    only way to close the connection is to stop the application.
    

Local fix

  • None, no work around.
    

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    This issue affects users of the IBM MQ Headers and PCF classes
    who have applications that call the following methods in either
    the com.ibm.mq.pcf or com.ibm.mq.headers.pcf packages:
    
    
    - PCFAgent(String qmanager),
    - PCFAgent(String host, int port, String channel)
    - PCFAgent.connect(String hostP, int port, String channelP)
    - PCFAgent.connectString hostP, int port, String channelP,
    String targetQueue, String targetQmanager)
    - PCFAgent.connect(String qmanagerP)
    - PCFAgent.connect(String qmanagerP, String targetQueue, String
    targetQmanager)
    
    - PCFMessageAgent(String qmanager),
    - PCFMessageAgent(String host, int port, String channel)
    - PCFMessageAgent.connect(String hostP, int port, String
    channelP)
    - PCFMessageAgent.connect(String hostP, int port, String
    channelP, String targetQueue, String targetQmanager)
    - PCFMessageAgent.connect(String qmanagerP)
    - PCFMessageAgent.connect(String qmanagerP, String targetQueue,
    String targetQmanager)
    
    
    Platforms affected:
    MultiPlatform
    
    ****************************************************************
    PROBLEM DESCRIPTION:
    When an IBM MQ Headers and PCF application calls one of the
    following methods:
    
    - PCFAgent.connect(String hostP, int port, String channelP)
    - PCFAgent.connectString hostP, int port, String channelP,
    String targetQueue, String targetQmanager)
    - PCFAgent.connect(String qmanagerP)
    - PCFAgent.connect(String qmanagerP, String targetQueue, String
    targetQmanager)
    
    - PCFMessageAgent.connect(String hostP, int port, String
    channelP)
    - PCFMessageAgent.connect(String hostP, int port, String
    channelP, String targetQueue, String targetQmanager)
    - PCFMessageAgent.connect(String qmanagerP)
    - PCFMessageAgent.connect(String qmanagerP, String targetQueue,
    String targetQmanager)
    
    then the IBM MQ Headers and PCF classes will:
    
    - Create a new connection to the queue manager, using the
    information passed in to the method,
    - Open the command queue on the queue manager.
    - Create a temporary reply queue on the queue manager.
    - Query some information about the queue manager, such as its
    command level and the platform that the queue manager is running
    on.
    
    The connection to the queue manager is then stored internally
    within the PCFAgent or PCFMessageAgent, and is used whenever the
    PCFAgent or PCFMessageAgent needs to communicate with the queue
    manager.
    
    Now, if the IBM MQ Headers and PCF classes:
    
    - Successfully created a connection to the queue manager.
    - And then experienced an issue while trying to open the command
    queue, create the reply queue or query information about the
    queue manager.
    
    then an exception containing details of that issue would be
    thrown back to the application. However, the connection to the
    queue manager would not be stored internally within the PCFAgent
    or PCFMesssageAgent, and would not be closed off.
    
    As a result, there would be a connection to the queue manager
    from the application which remained open until the application
    was stopped.
    

Problem conclusion

  • The IBM MQ Headers and PCF classes have been updated to ensure
    that the internal connection to the queue manager that was
    created as part of the following methods:
    
    - PCFAgent(String qmanager),
    - PCFAgent(String host, int port, String channel)
    - PCFAgent.connect(String hostP, int port, String channelP)
    - PCFAgent.connectString hostP, int port, String channelP,
    String targetQueue, String targetQmanager)
    - PCFAgent.connect(String qmanagerP)
    - PCFAgent.connect(String qmanagerP, String targetQueue, String
    targetQmanager)
    
    - PCFMessageAgent(String qmanager),
    - PCFMessageAgent(String host, int port, String channel)
    - PCFMessageAgent.connect(String hostP, int port, String
    channelP)
    - PCFMessageAgent.connect(String hostP, int port, String
    channelP, String targetQueue, String targetQmanager)
    - PCFMessageAgent.connect(String qmanagerP)
    - PCFMessageAgent.connect(String qmanagerP, String targetQueue,
    String targetQmanager)
    
    is closed if the method throws an exception. This prevents
    connections being leaked if the method is able to connect to the
    queue manager, and then experiences an issue while trying to
    open the command queue, create a reply queue or query
    information about the queue manager.
    
    ---------------------------------------------------------------
    The fix is targeted for delivery in the following PTFs:
    
    Version    Maintenance Level
    v9.1 CD    9.1.5
    v9.1 LTS   9.1.0.5
    
    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

    IT30751

  • Reported component name

    IBM MQ BASE MP

  • Reported component ID

    5724H7271

  • Reported release

    910

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2019-10-29

  • Closed date

    2019-11-29

  • Last modified date

    2019-11-29

  • 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

    IBM MQ BASE MP

  • Fixed component ID

    5724H7271

Applicable component levels

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSYHRD","label":"IBM MQ"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"910","Edition":"","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]

Document Information

Modified date:
29 November 2019