使用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]
感謝您的回覆Calanais。這是第一次連接本身的問題。我無法獲得連接 – user2635390 2014-10-03 00:27:41