我正在尝试使用ccdt.tab文件连接到队列管理器。以下是我所尝试的:
String CHANNEL_TABLE_PATH = "/usr/dev/ccdt.tab";
URL chanTableUrl = new URL("file://"+ CHANNEL_TABLE_PATH);
connectionFactory.setCCDTURL(chanTableUrl);
connectionFactory.setQueueManager("*");
MQQueueConnection connection = (MQQueueConnection) connectionFactory.createQueueConnection();
connection.start();
以下是ccdt.tab中的内容
DIS CHL(*) QMNAME CONNAME
Display Channel details.
CHANNEL(C.TEST.1) CHLTYPE(CLNTCONN)
CONNAME(host1.test.com(1511), host2.test.com(1512)) QMNAME(QQ)
Display Channel details.
CHANNEL(C.TEST.2) CHLTYPE(CLNTCONN)
CONNAME( ) QMNAME( )
connectionFactory.setConnectionNameList("host1.test.com(1511), host2.test.com(1512)");
connectionFactory.setClientReconnectOptions(67108864);
connectionFactory.setClientReconnectTimeout(1800);
connectionFactory.setQueueManager("QQ");
connectionFactory.setChannel("C.TEST.1");
MQQueueConnection connection = (MQQueueConnection) connectionFactory_.createQueueConnection();
connection.start();
有谁知道哪里出了问题,怎么修复?
PS:我确实看到了那些帖子:在JMS中使用CCDT文件连接到IBM MQ
下面是链接的异常和异常在IsetQueueManager(“*”)
时打印出来的:
01-19-2018 00:36:02,581 ERROR [main] (MQConnection.java:60) - Caught JMSException
01-19-2018 00:36:02,581 ERROR [main] (MQConnection.java:61) - linked exceptions com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2059' ('MQRC_Q_MGR_NOT_AVAILABLE').
01-19-2018 00:36:02,581 ERROR [main] (MQConnection.java:66) - Exception Msg: JMSWMQ2020: Failed to connect to queue manager '*' with connection mode 'Client' and supplied CCDT URL 'file:/usr/dev/ccdt.tab', see linked exception for more information.
01-19-2018 00:36:02,581 ERROR [main] (MQConnection.java:70) - JMS Error code: JMSWMQ2020
01-19-2018 00:36:02,581 ERROR [main] (MQConnection.java:73) - JMS Explanation: null
01-19-2018 00:36:02,582 ERROR [main] (MQConnection.java:74) - JMS Explanation: Check the queue manager is started and if running in client mode, check there is a listener running. Please see the linked exception for more information.
01-19-2018 00:36:02,582 ERROR [main] (MQConnection.java:66) - Exception Msg: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2059' ('MQRC_Q_MGR_NOT_AVAILABLE').
01-19-2018 00:36:02,582 ERROR [main] (MQConnection.java:78) - WMQ Completion code: 2
01-19-2018 00:36:02,582 ERROR [main] (MQConnection.java:79) - WMQ Reason code: 2059
01-19-2018 00:36:02,583 ERROR [main] (MQConnection.java:66) - Exception Msg: CC=2;RC=2059;AMQ9204: Connection to host '' rejected. [1=com.ibm.mq.jmqi.JmqiException[CC=2;RC=2059;AMQ9213: A communications error for occurred. [1=java.net.ConnectException[Connection refused],3=localhost]],3=,5=RemoteTCPConnection.connnectUsingLocalAddress]
01-19-2018 00:36:02,584 ERROR [main] (MQConnection.java:82) - WMQ Log Message: 1/19/18 12:36:02 AM - User(Rle) Program(java)
AMQ9204: Connection to host '' rejected.
EXPLANATION:
Connection to host '' over '?' was rejected.
ACTION:
The remote system may not be configured to allow connections from this host.
Check the '?' listener program has been started on host ''.
If the conversation uses LU 6.2, it is possible that either the User ID or
Password supplied to the remote host is incorrect.
If the conversation uses TCP/IP, it is possible that the remote host does not
recognize the local host as a valid host.
The return code from the '?''RemoteTCPConnection.connnectUsingLocalAddress'
call was 'com.ibm.mq.jmqi.JmqiException[CC=2;RC=2059;AMQ9213: A communications
error for occurred. [1=java.net.ConnectException[Connection
refused],3=localhost]]' X('?').
Record the error values and tell the systems administrator.
---- RemoteFAP.java : 2010 -----------------------------------------------------
01-19-2018 00:36:02,585 ERROR [main] (MQConnection.java:83) - WMQ Explanation: Connection to host '' over '?' was rejected.
01-19-2018 00:36:02,585 ERROR [main] (MQConnection.java:84) - WMQ Msg Summary: AMQ9204: Connection to host '' rejected.
01-19-2018 00:36:02,585 ERROR [main] (MQConnection.java:85) - WMQ Msg User Response: The remote system may not be configured to allow connections from this host. Check the '?' listener program has been started on host ''.
If the conversation uses LU 6.2, it is possible that either the User ID or Password supplied to the remote host is incorrect.
If the conversation uses TCP/IP, it is possible that the remote host does not recognize the local host as a valid host.
The return code from the '?''RemoteTCPConnection.connnectUsingLocalAddress' call was 'com.ibm.mq.jmqi.JmqiException[CC=2;RC=2059;AMQ9213: A communications error for occurred. [1=java.net.ConnectException[Connection refused],3=localhost]]' X('?').
Record the error values and tell the systems administrator.
01-19-2018 00:36:02,585 ERROR [main] (MQConnection.java:87) - WMQ Msg Severity: 30
01-19-2018 00:36:02,586 ERROR [main] (MQConnection.java:66) - Exception Msg: CC=2;RC=2059;AMQ9213: A communications error for occurred. [1=java.net.ConnectException[Connection refused],3=localhost]
01-19-2018 00:36:02,586 ERROR [main] (MQConnection.java:82) - WMQ Log Message: 1/19/18 12:36:02 AM - User(Rle) Program(java)
AMQ9213: A communications error for occurred.
EXPLANATION:
An unexpected error occurred in communications.
ACTION:
The return code from the call was 'java.net.ConnectException[Connection
refused]' (X'?'). Record these values and tell the systems administrator.
---- RemoteTCPConnection.java : 663 --------------------------------------------
01-19-2018 00:36:02,587 ERROR [main] (MQConnection.java:83) - WMQ Explanation: An unexpected error occurred in communications.
01-19-2018 00:36:02,587 ERROR [main] (MQConnection.java:84) - WMQ Msg Summary: AMQ9213: A communications error for occurred.
01-19-2018 00:36:02,587 ERROR [main] (MQConnection.java:85) - WMQ Msg User Response: The return code from the call was 'java.net.ConnectException[Connection refused]' (X'?'). Record these values and tell the systems administrator.
01-19-2018 00:36:02,587 ERROR [main] (MQConnection.java:87) - WMQ Msg Severity: 30
01-19-2018 00:36:02,587 ERROR [main] (MQConnection.java:66) - Exception Msg: Connection refused
以下是当我setQueueManager(“QQ”)
时链接的异常和异常打印:
01-19-2018 16:58:18,825 ERROR [main] (MQConnection.java:60) - Caught JMSException
01-19-2018 16:58:18,825 ERROR [main] (MQConnection.java:61) - linked exceptions com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2058' ('MQRC_Q_MGR_NAME_ERROR').
01-19-2018 16:58:18,825 ERROR [main] (MQConnection.java:66) - Exception Msg: JMSWMQ2020: Failed to connect to queue manager 'QQ' with connection mode 'Client' and supplied CCDT URL'file:/usr/dev/ccdt.tab', see linked exception for more information.
01-19-2018 16:58:18,825 ERROR [main] (MQConnection.java:70) - JMS Error code: JMSWMQ2020
01-19-2018 16:58:18,825 ERROR [main] (MQConnection.java:73) - JMS Explanation: null
01-19-2018 16:58:18,825 ERROR [main] (MQConnection.java:74) - JMS Explanation: Check the queue manager is started and if running in client mode, check there is a listener running. Please see the linked exception for more information.
01-19-2018 16:58:18,826 ERROR [main] (MQConnection.java:66) - Exception Msg: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2058' ('MQRC_Q_MGR_NAME_ERROR').
01-19-2018 16:58:18,826 ERROR [main] (MQConnection.java:78) - WMQ Completion code: 2
01-19-2018 16:58:18,826 ERROR [main] (MQConnection.java:79) - WMQ Reason code: 2058
01-19-2018 16:58:18,830 ERROR [main] (MQConnection.java:66) - Exception Msg: CC=2;RC=2059;AMQ9204: Connection to host 'host1.test.com(1511)' rejected. [3=host1.test.com(1511)]
01-19-2018 16:58:18,831 ERROR [main] (MQConnection.java:82) - WMQ Log Message: 1/19/18 4:58:18 PM - User(Rle) Program(java)
AMQ9204: Connection to host 'host1.test.com(1511)' rejected.
EXPLANATION:
Connection to host 'host1.test.com(1511)' over '?' was rejected.
ACTION:
The remote system may not be configured to allow connections from this host.
Check the '?' listener program has been started on host
'host1.test.com(1511)'.
If the conversation uses LU 6.2, it is possible that either the User ID or
Password supplied to the remote host is incorrect.
If the conversation uses TCP/IP, it is possible that the remote host does not
recognize the local host as a valid host.
The return code from the '?''?' call was '?' X('?').
Record the error values and tell the systems administrator.
---- RemoteFAP.java : 1980 -----------------------------------------------------
01-19-2018 16:58:18,831 ERROR [main] (MQConnection.java:83) - WMQ Explanation: Connection to host 'host1.test.com(1511)' over '?' was rejected.
01-19-2018 16:58:18,831 ERROR [main] (MQConnection.java:84) - WMQ Msg Summary: AMQ9204: Connection to host 'host1.test.com(1511)' rejected.
01-19-2018 16:58:18,831 ERROR [main] (MQConnection.java:85) - WMQ Msg User Response: The remote system may not be configured to allow connections from this host. Check the '?' listener program has been started on host 'host1.test.com(1511)'.
If the conversation uses LU 6.2, it is possible that either the User ID or Password supplied to the remote host is incorrect.
If the conversation uses TCP/IP, it is possible that the remote host does not recognize the local host as a valid host.
The return code from the '?''?' call was '?' X('?').
Record the error values and tell the systems administrator.
01-19-2018 16:58:18,831 ERROR [main] (MQConnection.java:87) - WMQ Msg Severity: 30
当您指定SetQueueManager(“*”)
时,错误是:
AMQ9204: Connection to host '' rejected.
这是因为IBM MQ可以解析CCDT中的两个通道中的任何一个。通道c.test.2
没有conname
,因此当MQ选择该通道时,会导致上述错误。如果您多次尝试连接,如果它选择通道c.test.1
,可能会成功一些次。
当您指定SetQueueManager(“QQ”)
时,错误是:
JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2058' ('MQRC_Q_MGR_NAME_ERROR').
如果需要,还可以使用setQueueManager(“*”)
,但是需要使用MQ v8或更高版本runmqsc
来编辑CCDT并删除第二个通道delete CHL(c.test.2)
。这样,*
只能解析到剩下的单个通道QQ
,还允许您连接到监听conname
中指定的主机和端口的任何队列管理器
我是尝试使用websphereMq和spring jms功能通过soap over jms实现服务的新手。我已经确定下面的事情 生成的绑定文件没有遇到任何错误 队列管理器和队列的状态为已启动并正在运行。 我在尝试将消息放入websphereMQ时遇到以下错误 null
我是WebSphere MQ的初学者,我在MQ6上工作,它工作得很好,但现在我安装了MQ7.1,当我试图创建一个新的队列管理器时,我可以创建它,但它不能连接,这给我带来了以下错误: 你对此有什么想法吗?谢谢:)
我在 Linux 平台上安装了 WebSphere MQ 7.1,之后我安装了 WebSphere 消息代理 8.0.0.1。现在,当我尝试创建执行组时,我得到一个异常:原因码 2035。此异常表示用户未经授权连接到队列管理器。我已将此用户添加到 组中。当我使用MQ 7.0.x时,我没有遇到任何这样的问题。我搜索了很多,知道 MQ 7.1 中存在用户 ID 阻塞。但是,我希望此用户能够创建执行组,
误差 你好,Gnana
JMS应用程序需要七个参数才能与这里给出的MQ系列进行成功的SSL连接,https://github.com/ibm-messaging/mq-tls-ssl-wizard/blob/master/com.ibm.MQ.ssl-wizard/sample/sslsamplejms.java 我试图解释这些参数, > conname-服务器队列管理器的连接名,格式与MQSC DEFINE CHANN
null 但我无法连接。我得到这样的错误消息“无法建立到队列管理器的连接-原因2538.(AMQ4059)"。我能做什么?