2014-10-02 22 views
1

使用7.1罐通過JMS連接到Websphere MQ中啓用SSL的隊列時,出現低於錯誤的錯誤。使用7.1罐獲取錯誤的WMQ SSL高可用性JMS連接

代碼:

public MQMessageSender(String channelName, String hostName, 
        String portNumber, String queueManagerName, String queueName) { 
    // Create a MQQueue Factory Object 
    try { 
     mqConnectionFact = new MQQueueConnectionFactory(); 
     mqConnectionFact.setChannel("xxx.SVRCONN"); 
     mqConnectionFact.setPort(Integer.parseInt("xxxx")); 
     mqConnectionFact.setHostName("host1"); 
     //mqConnectionFact.setConnectionNameList("host2(port2)");   
     mqConnectionFact.setClientReconnectOptions(JMSC.MQCNO_RECONNECT_Q_MGR); 
     mqConnectionFact.setQueueManager("XXXXX"); 
     mqConnectionFact.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP); 
     mqConnectionFact.setSSLCipherSuite("SSL_RSA_WITH_RC4_128_SHA"); 
     qConnection = mqConnectionFact.createQueueConnection(); 

     qConnection.start(); 
     qSession = qConnection.createQueueSession(false, 
           Session.AUTO_ACKNOWLEDGE); 

     requestQueue = qSession.createQueue(queueName); 
    } catch (Exception exception) { 
     exception.printStackTrace(); 
    } 
} 

錯誤:

Caused by: com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with 
compcode '2' ('MQCC_FAILED') reason '2399' ('MQRC_SSL_PEER_NAME_ERROR'). 
    at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:209) 
    ... 8 more 
Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2399; 
AMQ9204: Connection to host 'host1' rejected. 
[1=com.ibm.mq.jmqi.JmqiException[CC=2;RC=2399; 
AMQ9640: SSL invalid peer name, channel '?', attribute 'OID.2.5.4.17 (x2)'. 
[5=OID.2.5.4.17 (x2)]],3=host1(port1),5=RemotePeerName.setValue] 

回答

1

reason '2399' ('MQRC_SSL_PEER_NAME_ERROR')正在報告是錯誤。見2399 (095F) (RC2399): MQRC_SSL_PEER_NAME_ERROR。此外,您有以下錯誤信息:

AMQ9640: SSL invalid peer name, channel '?', attribute 'OID.2.5.4.17 (x2)'. 
[5=OID.2.5.4.17 (x2)]],3=host1(port1),5=RemotePeerName.setValue] 

這是告訴你哪個部分的peerName不被識別。它說,OID.2.5.4.17這是郵政編碼。

一個簡短的互聯網搜索發現的APAR這很問題,IC83494: WMQ V7.1: JMS CLIENT CONNECTION VIA SSL ENABLED CHANNEL FAILS WITH RC 2399 MQRC_SSL_PEER_NAME_ERROR.

這APAR包含在V7.1 FixPac 3

+0

謝謝@Morgan Hughson,當我使用MQ客戶端庫版本「7.5.0.1 - p750-001-130308」複製此問題(CC = 2; RC = 2399; AMQ9204)時切換到「7.5.0.2 - p750-002-131001_DE」它開始正常工作。 – 2016-10-25 14:36:31