3
votes

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.

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

1
That error reports TOPIC-NAME is that really the name of the topic to use? Or is it some value that has not been replaced to the actual value?Claus Ibsen
TOPIC-NAME dummy value. I should not share actual topic name.Gnana
Did you try any of the diagnostics I mentioned in my answer? What happened when you did?T.Rob

1 Answers

5
votes

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:

  1. Is the QMgr running.
  2. Is the listener running? On what port?
  3. Can I telnet to the QMgr on the listener port? i.e. telnet mqhost 1414.
  4. Is the channel defined? If so, is it available?
  5. Do the sample client programs work? In this case, amqspubc is the one to try.

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.