"com.ibm.mq.MQException: MQJE001: Completion Code '2', Reason '2393'"
我在下面的代码中遇到异常。我的要求是使用 SSL 服务器连接通道连接 QM。不需要客户端身份验证。
import com.ibm.mq.*;
public class MQSeriesDataCollector implements CustomDCInf
{
public static void main (String [] args)
{
String qName="apm_qm";
MQEnvironment.hostname=args [0];
MQEnvironment.channel=args [1];
MQEnvironment.port=Integer.parseInt(args [2]);
MQEnvironment.sslFipsRequired=true;
MQEnvironment.sslCipherSuite = "SSL_RSA_WITH_RC4_128_MD5";//RC4_MD5_US
MQQueueManager qMgr=null;
try{
qMgr = new MQQueueManager("apm_qm");
}catch (MQException mqe){
mqe.printStackTrace();
}
PCFMessageAgent agent=null;
StringBuffer output = new StringBuffer();
MQSeriesDataCollector mqTest=new MQSeriesDataCollector();
try{
agent = mqTest.getMQConnection(qMgr);
output.append(mqTest.getQueueStats(agent));
}
catch(MQException mqe){
System.out.println("Error:" + mqe.reasonCode + " Description:"+PCFConstants.lookupReasonCode (mqe.reasonCode));
mqe.printStackTrace();
}
catch(NoClassDefFoundError ex){
ex.printStackTrace();
}
catch (Exception e){
e.printStackTrace();
}
finally{
try{
if(agent!=null){
agent.disconnect();
}
}
catch(Exception ex){
ex.printStackTrace();
}
}
System.out.println(output.toString());
}
例外: com.ibm.mq.MQException:MQJE001:完成代码“2”,原因“2393”。 在 com.ibm.mq.MQManagedConnectionJ11.(MQManagedConnectionJ11.java:235) 在 com.ibm.mq.MQClientManagedConnectionFactoryJ11._createManagedConnection(MQClientManagedConnectionFactoryJ11.java:505) 在 com.ibm.mq.MQClientManagedConnectionFactoryJ11.createManagedConnection(MQClientManagedConnectionFactoryJ11.java:547)