关于MQ简单的ssl定义问题,请高手指点啊.

问题描述

很直观的Jms程序如下.但是报错了,郁闷中.求大哥们指点一下.publicstaticvoidmain(Stringargs[]){try{MQQueueConnectionFactoryfactory=newMQQueueConnectionFactory();//factory.setChannel("CLIENT.QM_TEST");factory.setQueueManager("QM_TEST");factory.setSSLCipherSuite("SSL_RSA_WITH_NULL_MD5");----服务器连接通道用的是NULL_MD5,MCA为空factory.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);factory.setPort(2000);factory.setHostName("192.168.171.134");QueueConnectionconnection=factory.createQueueConnection("Administrator","***");QueueSessionsession=connection.createQueueSession(false,Session.AUTO_ACKNOWLEDGE);Queuedestination=session.createQueue("Q1");QueueSendersender=session.createSender(destination);TextMessagemsg=session.createTextMessage();msg.setText("HelloTheMQ!!");sender.send(msg);sender.close();//session.commit();session.close();connection.close();}catch(javax.jms.JMSExceptione){e.printStackTrace();System.out.println("**********************LinkExceptioninformation****************");e.getLinkedException().printStackTrace();System.out.println("******************************************************************");}catch(Exceptione){e.printStackTrace();}}我用keyman做的两个keyStore,一个是给Jms程序用的,一个是给MQmanager使用由于我没有找到可以使用的ca,我这两个keyStore中间都定义有用createnewself-singercertificate定义自己的ca,然后分别导出签证对于jms的keyStore我导入了别名是ibmwebspheremqqm_test的签证,对于mq使用的keystore(放在对应D:IBMWebSphereMQQmgrsQM_TESTssl)名字叫keyStore.jks我导入的是jmskeyStoreca生成的证书.在导入的时候也只有用singercertificate的add,是不是这样有错啊现在报如下错误(太长了贴不下,见附件),我能确定是ssl配置的问题,因为我在不使用ssl(使用密码和用户的时候),只用factory.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);的时候目的队列是可以受到消息的.

解决方案

解决方案二:
自己顶一个,大侠高手神仙们快来看看啊.小人很菜,刚刚开始了解MQ,我用的是v7,错误是:com.ibm.mq.MQException:JMSCMQ0001:WebSphereMQcallfailedwithcompcode'2'('MQCC_FAILED')reason'2397'('MQRC_JSSE_ERROR').atcom.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:206)atcom.ibm.msg.client.wmq.internal.WMQConnection.<init>(WMQConnection.java:410)**********************LinkExceptioninformation****************atcom.ibm.msg.client.wmq.factories.WMQConnectionFactory.createV7ProviderConnection(WMQConnectionFactory.java:7855)atcom.ibm.msg.client.wmq.factories.WMQConnectionFactory.createProviderConnection(WMQConnectionFactory.java:7331)atcom.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.createConnection(JmsConnectionFactoryImpl.java:276)atcom.ibm.mq.jms.MQConnectionFactory.createCommonConnection(MQConnectionFactory.java:6055)atcom.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:144)atzsh_sender.main(zsh_sender.java:29)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)atjava.lang.reflect.Method.invoke(Method.java:597)atcom.intellij.rt.execution.application.AppMain.main(AppMain.java:90)Causedby:com.ibm.mq.jmqi.JmqiException:CC=2;RC=2397;AMQ9771:SSLhandshakefailed.[1=java.net.SocketException[java.security.NoSuchAlgorithmException:Errorconstructingimplementation(algorithm:Default,provider:SunJSSE,class:com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl)],3=SHIHUA.ncs.corp.int-ads/192.168.171.134:2000(SHIHUA.ncs.corp.int-ads),4=SSLSocket.createSocket,5=default]atcom.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.makeSocketSecure(RemoteTCPConnection.java:1544)atcom.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.connnectUsingLocalAddress(RemoteTCPConnection.java:643)atcom.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.protocolConnect(RemoteTCPConnection.java:980)atcom.ibm.mq.jmqi.remote.internal.system.RemoteConnection.connect(RemoteConnection.java:989)atcom.ibm.mq.jmqi.remote.internal.system.RemoteConnectionPool.getConnection(RemoteConnectionPool.java:293)atcom.ibm.mq.jmqi.remote.internal.RemoteFAP.jmqiConnect(RemoteFAP.java:1371)atcom.ibm.msg.client.wmq.internal.WMQConnection.<init>(WMQConnection.java:331)...11moreCausedby:java.net.SocketException:java.security.NoSuchAlgorithmException:Errorconstructingimplementation(algorithm:Default,provider:SunJSSE,class:com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl)atjavax.net.ssl.DefaultSSLSocketFactory.throwException(SSLSocketFactory.java:179)atjavax.net.ssl.DefaultSSLSocketFactory.createSocket(SSLSocketFactory.java:199)atcom.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.makeSocketSecure(RemoteTCPConnection.java:1537)...17moreCausedby:java.security.NoSuchAlgorithmException:Errorconstructingimplementation(algorithm:Default,provider:SunJSSE,class:com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl)atjava.security.Provider$Service.newInstance(Provider.java:1245)atsun.security.jca.GetInstance.getInstance(GetInstance.java:220)atsun.security.jca.GetInstance.getInstance(GetInstance.java:147)atjavax.net.ssl.SSLContext.getInstance(SSLContext.java:125)atjavax.net.ssl.SSLContext.getDefault(SSLContext.java:68)atjavax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:102)atcom.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.chooseSocketFactory(RemoteTCPConnection.java:1940)atcom.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.makeSocketSecure(RemoteTCPConnection.java:1527)...17moreCausedby:java.io.IOException:Keystorewastamperedwith,orpasswordwasincorrectatsun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:771)atsun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:38)atjava.security.KeyStore.load(KeyStore.java:1185)atcom.sun.net.ssl.internal.ssl.DefaultSSLContextImpl.getDefaultKeyManager(DefaultSSLContextImpl.java:150)atcom.sun.net.ssl.internal.ssl.DefaultSSLContextImpl.<init>(DefaultSSLContextImpl.java:40)atsun.reflect.NativeConstructorAccessorImpl.newInstance0(NativeMethod)atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)atjava.lang.reflect.Constructor.newInstance(Constructor.java:513)atjava.lang.Class.newInstance0(Class.java:355)atjava.lang.Class.newInstance(Class.java:308)atjava.security.Provider$Service.newInstance(Provider.java:1221)...24moreCausedby:java.security.UnrecoverableKeyException:Passwordverificationfailedatsun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:769)...35more
解决方案三:
在线等你们啊
解决方案四:
现在变成这个错误了,Remotehostclosedconnectionduringhandshake,刚才那个问题是在做密码库的时候换了密码,但是在运行程序的时候没有换回来.com.ibm.msg.client.jms.DetailedJMSException:JMSWMQ0018:Failedtoconnecttoqueuemanager'QM_TEST'withconnectionmode'Client'andhostname'192.168.171.134'.Checkthequeuemanagerisstartedandifrunninginclientmode,checkthereisalistenerrunning.Pleaseseethelinkedexceptionformoreinformation.atcom.ibm.msg.client.wmq.common.internal.Reason.reasonToException(Reason.java:599)atcom.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:219)atcom.ibm.msg.client.wmq.internal.WMQConnection.<init>(WMQConnection.java:410)atcom.ibm.msg.client.wmq.factories.WMQConnectionFactory.createV7ProviderConnection(WMQConnectionFactory.java:7855)atcom.ibm.msg.client.wmq.factories.WMQConnectionFactory.createProviderConnection(WMQConnectionFactory.java:7331)atcom.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.createConnection(JmsConnectionFactoryImpl.java:276)atcom.ibm.mq.jms.MQConnectionFactory.createCommonConnection(MQConnectionFactory.java:6055)atcom.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:144)atzsh_sender.main(zsh_sender.java:29)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)atjava.lang.reflect.Method.invoke(Method.java:597)atcom.intellij.rt.execution.application.AppMain.main(AppMain.java:90)Causedby:com.ibm.mq.MQException:JMSCMQ0001:WebSphereMQcallfailedwithcompcode'2'('MQCC_FAILED')reason'2397'('MQRC_JSSE_ERROR').atcom.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:206)...12moreCausedby:com.ibm.mq.jmqi.JmqiException:CC=2;RC=2397;AMQ9771:SSLhandshakefailed.[1=javax.net.ssl.SSLHandshakeException[Remotehostclosedconnectionduringhandshake],3=SHIHUA.ncs.corp.int-ads/192.168.171.134:2000(SHIHUA.ncs.corp.int-ads),4=SSLSocket.startHandshake,5=default]atcom.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.protocolConnect(RemoteTCPConnection.java:995)atcom.ibm.mq.jmqi.remote.internal.system.RemoteConnection.connect(RemoteConnection.java:989)atcom.ibm.mq.jmqi.remote.internal.system.RemoteConnectionPool.getConnection(RemoteConnectionPool.java:293)atcom.ibm.mq.jmqi.remote.internal.RemoteFAP.jmqiConnect(RemoteFAP.java:1371)atcom.ibm.msg.client.wmq.internal.WMQConnection.<init>(WMQConnection.java:331)...11moreCausedby:javax.net.ssl.SSLHandshakeException:Remotehostclosedconnectionduringhandshakeatcom.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:808)atcom.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1112)atcom.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1139)atcom.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1123)atcom.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.protocolConnect(RemoteTCPConnection.java:989)...15moreCausedby:java.io.EOFException:SSLpeershutdownincorrectlyatcom.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:333)atcom.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:789)...19morecom.ibm.mq.MQException:JMSCMQ0001:WebSphereMQcallfailedwithcompcode'2'('MQCC_FAILED')reason'2397'('MQRC_JSSE_ERROR').**********************LinkExceptioninformation****************atcom.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:206)atcom.ibm.msg.client.wmq.internal.WMQConnection.<init>(WMQConnection.java:410)atcom.ibm.msg.client.wmq.factories.WMQConnectionFactory.createV7ProviderConnection(WMQConnectionFactory.java:7855)atcom.ibm.msg.client.wmq.factories.WMQConnectionFactory.createProviderConnection(WMQConnectionFactory.java:7331)atcom.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.createConnection(JmsConnectionFactoryImpl.java:276)atcom.ibm.mq.jms.MQConnectionFactory.createCommonConnection(MQConnectionFactory.java:6055)atcom.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:144)atzsh_sender.main(zsh_sender.java:29)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)atjava.lang.reflect.Method.invoke(Method.java:597)atcom.intellij.rt.execution.application.AppMain.main(AppMain.java:90)Causedby:com.ibm.mq.jmqi.JmqiException:CC=2;RC=2397;AMQ9771:SSLhandshakefailed.[1=javax.net.ssl.SSLHandshakeException[Remotehostclosedconnectionduringhandshake],3=SHIHUA.ncs.corp.int-ads/192.168.171.134:2000(SHIHUA.ncs.corp.int-ads),4=SSLSocket.startHandshake,5=default]atcom.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.protocolConnect(RemoteTCPConnection.java:995)atcom.ibm.mq.jmqi.remote.internal.system.RemoteConnection.connect(RemoteConnection.java:989)atcom.ibm.mq.jmqi.remote.internal.system.RemoteConnectionPool.getConnection(RemoteConnectionPool.java:293)atcom.ibm.mq.jmqi.remote.internal.RemoteFAP.jmqiConnect(RemoteFAP.java:1371)atcom.ibm.msg.client.wmq.internal.WMQConnection.<init>(WMQConnection.java:331)...11moreCausedby:javax.net.ssl.SSLHandshakeException:Remotehostclosedconnectionduringhandshakeatcom.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:808)atcom.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1112)atcom.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1139)atcom.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1123)atcom.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.protocolConnect(RemoteTCPConnection.java:989)...15moreCausedby:java.io.EOFException:SSLpeershutdownincorrectlyatcom.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:333)atcom.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:789)...19more
解决方案五:
先去下载补丁打上去一下。
解决方案六:
我也遇到通道的错误。。楼主解决了吗?求指教啊。。
解决方案七:
先去下载补丁打上去一下。
解决方案八:
下载补丁打上去一下。
解决方案九:
顶一下。
解决方案十:
请问下下载什么补丁???
解决方案十一:
楼主这个问题解决了吗?我也被这个问题block住了

时间: 2024-10-08 14:22:43

关于MQ简单的ssl定义问题,请高手指点啊.的相关文章

c#+asp.net+mapxtreme 2005在运行web示例程序时怎么总是出现“COM+ 激活失败”这样的错误是怎么回事啊,高手指点啊!!!

问题描述 c#+asp.net+mapxtreme2005在运行web示例程序时怎么总是出现"COM+激活失败"这样的错误是怎么回事啊,高手指点啊!!!

树形结构表与xml的转换,高手指点啊!!!

问题描述 表结构是树形结构如下字段:createtabletmptable(kpi_code,--指标编码kpi_name,--指标名称rel_kpi_code--关联编码,也就是父指标编码)怎么将该表中的数据转换成xml格式呢

图片-C语言简单的全局变量定义问题

问题描述 C语言简单的全局变量定义问题 请问为什么我在函数外面定义了全局变量,变量的值没有改变? 解决方案 你这个问题是因为你在add这个函数里定义了一个形参x,与全局变量x冲突,所以编译器自动屏蔽全局变量x,也就是说这个形参x和全局变量x不是同一个变量,你对形参做的一切改动在其他函数里都是看不到的.其实你既然已经定义了全局变量,那add函数就根本不需要再把x的值传进去,直接执行x=x+3即可,因为x是全局变量. 解决方案二: C语言中如何定义全局变量[C语言]防止头文件和全局变量重复定义 解决

高手指點一下!

问题描述 目前我在用IE直接開啟本機的EXE檔案,但是無法直接開啟,請高手指點一下!如何在IE瀏覽器中執行EXE檔案! 解决方案 解决方案二:要不把exel防进网页里?解决方案三:能具體點嗎?我想在頁面直接開啟喔!

winxp+iis+vs2005无法调试asp.net2.0,请高从指点!

问题描述 我的系统是winxp,iis和vs2005都安装了,可就是无法调试asp.net2.0,请哪位大哥指点,非常感谢! 解决方案 解决方案二:没有遇到过,不好意思.

小弟初学者,还请高人们多多指教

问题描述 classCar{classWheel{}}classPlaneWheelextendsCar.Wheel{PlaneWheel(Carcar){car.super();}publicstaticvoidmain(String[]args){Carcar=newCar();PlaneWheelpw=newPlaneWheel(car);}}在这段代码中PlaneWheel(Carcar){car.super();}具体有什么用,请各位高人给详细的分析一下 解决方案 解决方案二:调用ca

请高手谈大型网站架构及安全问题

问题描述 请高手以慧聪安防网(http://www.secu.hc360.com)为例来谈谈架构及安全问题:1.要几台服务器,如何布局,为防止系统破坏导致数据丢失问题,采取什么措施备份?如何备份?2.用工具asp.net来开发怎么样?3.要多少人多长时间才能开发出这样的网站?4.开发人员如何分工? 解决方案 解决方案二:好大的命题,从基础做起多做优化,防止sql注入...解决方案三:问题很大大家一点一点来完善啊最基本的数据库要单独放一台服务器然后做磁盘阵列可以设置sqlserver每天自动备份保

实在搞不懂了,请高人们进来指点指点.

问题描述 问题是这样的.网站www.cmbin.com用到了ajax,我在本地调试时是好好的,但是上传到服务器上后那个分页的部分一直显示:正在加载数据.我通过alert设置了"断点"看了一下,它根本就没有执行某一段代码,具体是这样的functionreadsss(){//代码片断1for(){//forxunhuan里的代码片段2}//代码片段3}问题是它执行完代码片段2后直接跳出来了,没有执行代码片段3里面的分页代码.这是怎么回事?另外:为什么我在本地调试好的代码上传到服务器上后会发

说不上难和简单的问题,请赐教

问题描述 petshop谁给系统的解析一下,说一下它的轮廓谢了哈 解决方案 解决方案二:不简单,还是自己慢慢看吧,范围太广LZ可摘一段出来询问解决方案三:网上搜搜资料吧.....