Author |
Message
|
AntonGolovin |
Posted: Fri Aug 11, 2006 11:33 am Post subject: Problem accessing a Queue Manager running on Server 1 from.. |
|
|
Novice
Joined: 24 Jul 2006 Posts: 23
|
Hello, and thank you in advance for your help!
We are trying to configure MQ to use client option to connect to the MQ server. We are using the MQ channel definition table to expose two queue managers running on Computer 1, where our MQ server is. We created the channel definition file and brought it over from Computer 1 to Computer 2, where our client is. The WebSphere MQ Explorer, running on Computer 1, is able to connect to these Queue Managers by using the channel definition table, and to get and put messages. We also created the necessary two environment variables for the client to find this channel definition file.
However, when we make a sample jsp page and run it, we get the following stack trace in the logs:
Code: |
[8/11/06 15:26:37:007 EDT] 00000177 WebApp E SRVE0026E: [Servlet Error]-[/TestClientConnection.jsp]: javax.jms.InvalidDestinationException: MQJMS2008: failed to open MQ queue MQCONN.PUB.IN
at com.ibm.mq.jms.MQQueueServices.getQueueOpenException(MQQueueServices.java:408)
at com.ibm.mq.jms.MQQueueServices.getOutputQueue(MQQueueServices.java:350)
at com.ibm.mq.jms.JMSServicesMgr.getOutputQueue(JMSServicesMgr.java:137)
at com.ibm.mq.jms.MQSession.createQSender(MQSession.java:6187)
at com.ibm.mq.jms.MQQueueSession.createSender(MQQueueSession.java:276)
at com.ibm.ejs.jms.JMSQueueSenderHandle.<init>(JMSQueueSenderHandle.java:95)
at com.ibm.ejs.jms.JMSQueueSessionHandle.createSender(JMSQueueSessionHandle.java:232)
at com.ibm._jsp._TestClientConnection._jspService(_TestClientConnection.java:102)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:91)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1282)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:673)
at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:117)
at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.handleRequest(JSPExtensionServletWrapper.java:178)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2965)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:221)
at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:210)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1931)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:84)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:472)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:411)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:101)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
---- Begin backtrace for Nested Throwables
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2087
at com.ibm.mq.MQQueueManager.accessQueue(MQQueueManager.java:1544)
at com.ibm.mq.jms.MQQueueServices.getOutputQueue(MQQueueServices.java:347)
at com.ibm.mq.jms.JMSServicesMgr.getOutputQueue(JMSServicesMgr.java:137)
at com.ibm.mq.jms.MQSession.createQSender(MQSession.java:6187)
at com.ibm.mq.jms.MQQueueSession.createSender(MQQueueSession.java:276)
at com.ibm.ejs.jms.JMSQueueSenderHandle.<init>(JMSQueueSenderHandle.java:95)
at com.ibm.ejs.jms.JMSQueueSessionHandle.createSender(JMSQueueSessionHandle.java:232)
at com.ibm._jsp._TestClientConnection._jspService(_TestClientConnection.java:102)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:91)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1282)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:673)
at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:117)
at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.handleRequest(JSPExtensionServletWrapper.java:178)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2965)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:221)
at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:210)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1931)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:84)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:472)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:411)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:101)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code)) |
As we are very new to MQ messaging, this has confounded us. We are very grateful for any help.
The Queue Manager running on the server is called IHIIGTWY.MGQM, the client connection channel is called IHIIGTWY.SCC, the server connection channel is IHIIGTWY.SCC, and the Queue is MQCONN.PUB.IN |
|
Back to top |
|
 |
vennela |
Posted: Fri Aug 11, 2006 11:37 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Quote: |
2087 0x00000827 MQRC_UNKNOWN_REMOTE_Q_MGR |
How is the queue defined |
|
Back to top |
|
 |
AntonGolovin |
Posted: Fri Aug 11, 2006 12:01 pm Post subject: |
|
|
Novice
Joined: 24 Jul 2006 Posts: 23
|
vennela wrote: |
Quote: |
2087 0x00000827 MQRC_UNKNOWN_REMOTE_Q_MGR |
How is the queue defined |
It is defined as a local queue on Computer 2. It is possible to put messages in it when connecting from the MQ Explorer running on Computer 1 and using the channel definition table; but not from the WebSphere Application server running an application from which we attempt to connect. |
|
Back to top |
|
 |
vennela |
Posted: Fri Aug 11, 2006 12:29 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Using java it is a little different.
Anyway, I am not sure if you are using JMS and JNDI resources or are using regular base MQ API |
|
Back to top |
|
 |
AntonGolovin |
Posted: Fri Aug 11, 2006 12:34 pm Post subject: |
|
|
Novice
Joined: 24 Jul 2006 Posts: 23
|
vennela wrote: |
Using java it is a little different.
Anyway, I am not sure if you are using JMS and JNDI resources or are using regular base MQ API |
JMS and JNDI |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Aug 11, 2006 1:34 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Should not be different at all.
I expect your destination to be defined as :
"queue://QM2/QNAME?(attribute=value)"
Now if you get a 2087 that means in general that there is no default path between QM1 (the QM you are connected to) and QM2 your target queue manager. You will get the same when doing a put1.
Read up in the intercommunication manual on what it means to have a default path and check out the part on qmgr aliases.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
AntonGolovin |
Posted: Fri Aug 11, 2006 1:37 pm Post subject: |
|
|
Novice
Joined: 24 Jul 2006 Posts: 23
|
fjb_saper wrote: |
Should not be different at all.
I expect your destination to be defined as :
"queue://QM2/QNAME?(attribute=value)"
Now if you get a 2087 that means in general that there is no default path between QM1 (the QM you are connected to) and QM2 your target queue manager. You will get the same when doing a put1.
Read up in the intercommunication manual on what it means to have a default path and check out the part on qmgr aliases.
Enjoy  |
Sorry, we're not doing Queue Manager intercommunication. We are using a client to connect to a Queue Manager on a remote machine's MQ server. It is possible to connect to the remote machine's MQ Queue Manager by using the MQ explorer running on the client. However, it is not possible to connect from an application that tries to use the client (the client knows about the remote queue manager by the channel definition file, and the environment variables are set ok.) |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Aug 11, 2006 2:05 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Haven't tried channel table with JMS yet. I doubt that it would support it. You will need to define multiple factories (QCF/TCF) (one per qmgr).
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
AntonGolovin |
Posted: Fri Aug 11, 2006 2:12 pm Post subject: |
|
|
Novice
Joined: 24 Jul 2006 Posts: 23
|
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Aug 11, 2006 2:53 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Sure but remembering that JMS is mostly used in the Web Application Server (WAS) how do you relate connecting to an undefined qmgr when you have MDB's trying to read from queues that may not be there?
Usually this is feasible in a 'put only' scenario (or request reply only) where it does not matter much which qmgr you use for the put as long as the message can get to its destination...
Now try jumping qmgr on a get? MDBs will stop and nothing will get processed? When starting WAS you will risk having a whole part inactive because of starting error as it could not connect /open the queue with the right privileges...(remote /vs local queues) ...
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
AntonGolovin |
Posted: Fri Aug 11, 2006 3:16 pm Post subject: |
|
|
Novice
Joined: 24 Jul 2006 Posts: 23
|
fjb_saper wrote: |
Sure but remembering that JMS is mostly used in the Web Application Server (WAS) how do you relate connecting to an undefined qmgr when you have MDB's trying to read from queues that may not be there?
Usually this is feasible in a 'put only' scenario (or request reply only) where it does not matter much which qmgr you use for the put as long as the message can get to its destination...
Now try jumping qmgr on a get? MDBs will stop and nothing will get processed? When starting WAS you will risk having a whole part inactive because of starting error as it could not connect /open the queue with the right privileges...(remote /vs local queues) ...
Enjoy  |
Wait, I thought that if you use a client, you basically get what you get with a server, provided you get the correct channel definition table - the client will open the table, look for the queue manager, and then connect to the remote queue manager, as your MDB is requesting... |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Aug 11, 2006 8:08 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
AntonGolovin wrote: |
Wait, I thought that if you use a client, you basically get what you get with a server, provided you get the correct channel definition table - the client will open the table, look for the queue manager, and then connect to the remote queue manager, as your MDB is requesting... |
Yes you do. Now tell me what happens when you switch qmgr because the connection broke...
Remember you can only read from a queue that is defined as qlocal to the qmgr you are connected to...
Like I said perfect for fire and forget, or request reply as the requestor, Hell if you are the server that needs to send the reply... _________________ MQ & Broker admin |
|
Back to top |
|
 |
|