java 无法使用连接模式“客户端”和主机连接到队列管理器“QUEUE-NAME”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/29614706/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Failed to connect to queue manager 'QUEUE-NAME' with connection mode 'Client' and host
提问by Gnana
I have developed subscripe (topic) conncept using Camel. it is working fine in my local tomcat.but it is not working in my test environment tomcat. it is getting below mentioned error. kindly help me to resolve the issue and how to debug the issue.
我使用 Camel 开发了订阅(主题)概念。它在我的本地 tomcat 中运行良好。但它在我的测试环境 tomcat 中不起作用。它正在出现下面提到的错误。请帮助我解决问题以及如何调试问题。
is it related to server configuration ?
是否与服务器配置有关?
Error
错误
org.apache.camel.component.jms.JmsMessageListenerContainer refreshConnectionUntilSuccessful
SEVERE: Could not refresh JMS Connection for destination 'TOPIC-NAME' - retrying in 5000 ms. Cause: JMSWMQ0018: Failed to
connect to queue manager 'QUEUE-MANAGER' with connection mode 'Client' and
host name 'HOST-NAME'.; nested exception is com.ibm.mq.MQException:
JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED')
reason '2059' ('MQRC_Q_MGR_NOT_AVAILABLE').
regards, Gnana
问候, Gnana
回答by T.Rob
There is almost no information to go on here and therefore no way to answer with any confidence. Instead, I'll provide a diagnostic process and hopefully you will find the problem. Note that in the future if you have similar issues, it would help to list the diagnostics you have already tried so that people responding can narrow down their answers.
这里几乎没有信息可以继续,因此无法自信地回答。相反,我将提供一个诊断过程,希望您能找到问题所在。请注意,将来如果您遇到类似问题,列出您已经尝试过的诊断方法会有所帮助,以便做出响应的人可以缩小他们的答案范围。
In order for this to work, the QMgr must be running a listener, have a channel defined and available, have authorizations set up to allow the connection, and be able to resolve the queue or topic requested. With that in mind, the things I normally check and the order I check them in is as follows:
为了使其工作,QMgr 必须运行一个侦听器,定义一个可用的通道,设置授权以允许连接,并且能够解析请求的队列或主题。考虑到这一点,我通常检查的东西和我检查它们的顺序如下:
- Is the QMgr running.
- Is the listener running? On what port?
- Can I telnet to the QMgr on the listener port? i.e.
telnet mqhost 1414
. - Is the channel defined? If so, is it available?
- Do the sample client programs work? In this case,
amqspubc
is the one to try.
- QMgr 是否正在运行。
- 侦听器是否正在运行?在什么港口?
- 我可以通过 telnet 连接到侦听器端口上的 QMgr 吗?即
telnet mqhost 1414
。 - 通道定义了吗?如果有,是否可用?
- 示例客户端程序是否有效?在这种情况下,
amqspubc
是一个尝试。
There are other considerations and if all of the above work, it is time to look into the client code and configuration, the versions of the client and server, authorizations, etc. But until you know that the basic configuration is in place to support a client connection (which was not indicated in the question) then these are the things to start with.
还有其他注意事项,如果以上所有工作都有效,是时候查看客户端代码和配置、客户端和服务器的版本、授权等。但直到您知道基本配置已到位以支持客户端连接(问题中没有指出)那么这些就是开始的事情。