APAR status
Closed as program error.
Error description
A JMS connection factory has been defined within Apache Tomcat, and uses the CNLIST property to specify a connection name list to connect to a multi-instance queue manager, as shown below: < Resource name="jms/ConnectionFactory" auth="Container" CHAN="CHANNELNAME" QMGR="QMGRNAME" CNLIST="Host1(2000),Host2(2000)" ... ...> However, when an application uses the connection factory to create a connection, a JMSException containing the following message is thrown: JMSWMQ0018: Failed to connect to queue manager 'QMGRNAME' with connection mode 'Client' and host name 'localhost(1414)'.; nested exception is com.ibm.mq.MQException: JMSCMQ0001: IBM MQ call failed with compcode '2' ('MQCC_FAILED') reason '2538' ('MQRC_HOST_NOT_AVAILABLE').
Local fix
Specify the connection name list using the property CRSHOSTS, instead of CNLIST.
Problem summary
**************************************************************** USERS AFFECTED: This issue affects users of the IBM MQ classes for JMS that: - Have defined JMS connection factories in Apache Tomcat, where the connection factory definition contains the CNLIST (Connection name list) property. - And have applications running inside Apache Tomcat which use that connection factory to connect to a queue manager. Platforms affected: MultiPlatform **************************************************************** PROBLEM DESCRIPTION: When an MQ connection factory is stored in a JNDI repository, the MQ classes for JMS will: - Construct a javax.naming.Reference object containing a number of name/value pairs representing the properties of the factory. - And pass the Reference object to the JNDI provider to be stored in the repository. When the connection factory is looked up from JNDI, the JNDI provider passes the Reference back to the MQ classes for JMS. The MQ classes for JMS read the properties contained within the Reference to rebuild the MQ connection factory for the application to use. Now, the Connection Factory property CNLIST (Connection name list) allows users to specify a comma-separated list of "hostname(port)" pairs, where each pair contains: - The hostname of the system where the queue manager is running. - And the port that the listener associated with that queue manager is using. In most environments, when this property is set on a connection factory, the MQ classes for JMS create a new internal property on the connection factory called CRSHOSTS, and set its value to the same value of the CNLIST property. The CRSHOSTS property is then added to the Reference object that is stored in JNDI. When the MQ classes for JMS reconstruct the connection factory from the Reference, they check if the CRSHOSTS property has been set - if it has, then the connection name list for the factory is set to the value of CRSHOSTS. If it has not been set, then the connection name list property is left at its default value of "localhost(1414)". However, when an MQ connection factory was defined with Apache Tomcat, it was possible that the Reference object stored in JNDI had the CNLIST property set on it, rather than CRSHOSTS. In this situation, when the MQ classes for JMS rebuilt the connection factory from the Reference, the connection name list was not set on it. As a result, when an application created a JMS connection from the connection factory, the MQ classes for JMS tried to connect to an instance of the queue manager running on the system with hostname "localhost" and using port 1414. This attempt failed and a JMSException containing the following message was thrown back to the application: JMSWMQ0018: Failed to connect to queue manager '<queue manager name>' with connection mode 'Client' and host name 'localhost(1414)'.; nested exception is com.ibm.mq.MQException: JMSCMQ0001: IBM MQ call failed with compcode '2' ('MQCC_FAILED') reason '2538' ('MQRC_HOST_NOT_AVAILABLE').
Problem conclusion
The MQ classes for JMS have been updated so that when a Reference object representing an MQ connection factory is retrieved from a JNDI repository, the following steps will now be performed: - Initially check to see if the Reference contains the CRSHOSTS property. - If it does: - Set the connection name list to the value of CRSHOSTS. - Else if the Reference contains the CNLIST property then: - Set the connection name list to the value of CNLIST. - End if This ensures that the connection name list will be set on an MQ connection factory, if the Reference object looked up from JNDI uses either the CNLIST or CRSHOSTS property to store this information. --------------------------------------------------------------- The fix is targeted for delivery in the following PTFs: Version Maintenance Level v9.1 CD TBC. v9.1 LTS 9.1.0.7 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
IT32639
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
2020-04-23
Closed date
2020-05-29
Last modified date
2020-05-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"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Line of Business":{"code":"LOB45","label":"Automation"}}]
Document Information
Modified date:
30 May 2020