|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Beginner question |
« View previous topic :: View next topic » |
Author |
Message
|
WolfgangGPropfe |
Posted: Fri Mar 03, 2006 11:36 am Post subject: Beginner question |
|
|
Newbie
Joined: 03 Mar 2006 Posts: 5
|
Dear all:
I am new to MQ config and to this forum, but I will need to work with MQ soon. I read the concepts in the documentation and have not started the API part yet (the individual queues and connections work using the First Steps).
My question is around a very simple example setting up two channels where I don't know exactly what to expect and why it seems to not work. Here is what I attempt to do on Win2000, MQ version 5.3 (?):
- I set up two queue managers without clusters, say A and B.
- In each I set up a receiver channel, a sender channel, one transmission queue, a local RCV queue and a remote SND queue, trying to communicate between A and B (both on the same computer). I want to simulate the simple sender/receiver example in the docu.
- I get status 'inactive' on the receiver channels and 'retrying' on the sender channels. The sender channel double-click shows one connection (in failure, the MCA stopped and it has an exclamation mark). The receiver channel double-click shows no connection.
- I named the communicating receiver and sender channels the same on the respective queue manager.
- I try to simulate two separate queue managers who talk to each other whereby the next step should be to set them up on two machines. Is the above so far somewhat normal and can it be done on the same machine? My friend has MQ at work and his receiver and sender channels are in status 'running' and both show a connection on double-click.
I don't expect a detailed answer, but I am asking whether a step-by-step example, ideally with screen prints and sample queue/channel/... names exists on the web, so you could point me to it. The documentation I found is either conceptual (high level) or around API (programming), but my basic configuration appears to be wrong. I want to put a sample message using the First Steps API say on manager A and see it in manager B after the delivery.
Any pointer to a good and simple '101' book or better yet web link would be appreciated. Sorry, I know too little yet to express myself any better.
Thanks,
Wolfgang
P.S.: I searched this forum briefly without a good 'hit'. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Mar 03, 2006 11:40 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I had thought there were more detailed descriptions of the basic steps in the documentation than high level.
Regardless, it sounds like you have things mostly right. You now should actually troubleshoot - and this is a good thing to learn.
When a sender channel goes from "binding" to "retrying", it will log an error in the Application Log on the queue manager machine. That error will contain some information, including an MQ Reason Code. The Reason Codes are all documented in the manual called "Messages", in an appendix on API Completion and Reason Codes.
If you read through the error messages that have been logged, and read through the reason code descriptions, it should help you understand what's going wrong. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
clindsey |
Posted: Fri Mar 03, 2006 11:44 am Post subject: |
|
|
Knight
Joined: 12 Jul 2002 Posts: 586 Location: Dallas, Tx
|
Wolfgang,
The Window Quick Beginnings has the steps under "Setting up Communications". It sounds like you are pretty close, though.
When you set up 2 amgrs on the same server, the listeners must be on different ports, like 1414 and 1415. Then change the connection names to include the port .... localhost(1415).
Charlie |
|
Back to top |
|
 |
WolfgangGPropfe |
Posted: Fri Mar 03, 2006 12:04 pm Post subject: |
|
|
Newbie
Joined: 03 Mar 2006 Posts: 5
|
Dear Charlie and Jeff:
Thanks for your quick reply and your good pointers. I got an error code but did not know where to look it up. I'll look again and try it on the weekend.
I did configure ports 5001/5002 on 'A' and 5003/5004 on 'B' for the ports (not sure whether the numbers are OK) upon initial creation of the queue managers, yet I could not see those numbers anymore later on. My friend confirmed that those ports do not need to be in the 'service' file under Windows when he looked up his working configuration.
I tried 127.0.0.1(5001) but not localhost(5001), will try again. I'll also try 1414, in case my port numbers are incorrect, and I'll also look for the example section. Sometimes finding the right section is harder than the actual setup. I am glad to hear that two managers on one machine should work.
I'll post again to let you know, if/when I make progress.
Regards,
Wolfgang |
|
Back to top |
|
 |
clindsey |
Posted: Fri Mar 03, 2006 1:09 pm Post subject: |
|
|
Knight
Joined: 12 Jul 2002 Posts: 586 Location: Dallas, Tx
|
Wolfgang,
First be sure about which ports are defined for the listeners.
bring up the WebSphere MQ Services UI
click on the queue manager and the services will be displayed
right click on the listener and select properties.
click the parameters tab and check the port to make sure it is what you want.
Then look at the status of the listener and make sure it is running. If not start it. If you changed the port, stop it and re-start it.
Now bring up WebSphere MQ Explorer and look at the sender channel defs for the queue manager.
Right click on the sender channel and select properties.
Look at the connection name and it shoud be localhost(port) where port is the number you verified about for the other queue manager.
Then right click on the channel and select start to see if it will start.
Charlie |
|
Back to top |
|
 |
WBI_user |
Posted: Fri Mar 03, 2006 3:35 pm Post subject: |
|
|
Partisan
Joined: 07 Aug 2001 Posts: 386
|
Hi Wolfgang, you said
"I did configure ports 5001/5002 on 'A' and 5003/5004 on 'B' ", just curious why you need two ports for each queue Manager.
I assume that you are using the windows explorer to define the sender and receiver channels and you also take all the defaults values.
If your sender channel on Qmgr A is sending to 127.0.0.1(5001) or localhost(5001) and you have the listener on Qmgr B listening on port 5001 There is no reason why the channel will not run when it is a newly created channel unless there is a problem with the network layer.
I have seen problems before that some one has to install the windows loopback adapter in order for the Qmgrs under the same Windows OS to talk but I don't know why. But I am running multiple Qmgrs on my WIN2K box without the loopback adapter. |
|
Back to top |
|
 |
WolfgangGPropfe |
Posted: Sat Mar 04, 2006 9:15 am Post subject: |
|
|
Newbie
Joined: 03 Mar 2006 Posts: 5
|
Dear all:
Again, thanks for your help. It's still not working, but the weekend is not over yet.
I found the 'circular' log but it looks binary, not plain text. I found another log in plain text that just says 'queue manager started' and the date/time. Not sure where to find the application log for when a channel retries.
My description was slightly off: I had 5001/5002 on one laptop and 5003/5004 on another, so one port per channel only. On one of the laptops I trashed the queue managers and started over. I have one default manager which I don't use and set up QM_A and QM_B, this time with ports 1415 and 1416 (to rule out funny port numbers as the culprit). When I tried to run the listener program according to the documentation, it failed, but the MQ server already reported a running listener for that port after the initial setup, so that may have been the reason. The listener in the MQ Server application showed running and the proper port. I even stopped and restarted both the listeners and then the whole MQ Series.
I set up a receiver channel TO_A in QM_A and TO_B in QM_B. Then I set up a transmission queue TO_B in QM_A and TO_A in QM_B. Finally I set up the sender channels TO_A in QM_B and TO_B in QM_A (same names as receiver channel there) and added the remote sending queues using the transmission queues.
At some point I tried to put a message into the transmission queue (the API from First Steps did not let me put one into the sending queue), and when I checked, one sender channel was running and one was retrying.
I find it odd that the transmission queue is not attached to a target queue manager. The attachment is in the remote queue definition, but what prevents one transmission queue from being used by two different remote queues for two different queue managers? I wonder whether I can call a queue and a channel the same name, or whether it messes something up.
Anyway, the way I understood the documentation for this simple example is to have a local inbound queue and a remote outbound queue (with a local transmission queue). To send I would put on the transmission queue and to receive a get on the inbound, right? Do any of the queues need to be triggering? According to the Windows Example you pointed me to, I should only need the sender/receiver channels and the listener, then it's all queues from there.
If I figure it out, I will post a step-by-step of what I did from scratch. BTW, I deliberately don't use clusters, since I want to go across machines later on. Will I have to set up separate clusters for the repository to make it work? If I try, the wizard requires two queue managers, so I cannot just set up a cluster for one each. However, the default queue manager is in a cluster of its own. Oh well, I'll check Barnes&Noble, too. I am not even at the level where I 'speak your language' yet.
Ironically, I have used MQSeries from SAP and even programmed a user exit in C for MQ. But someone else configured it back then, so I was already past this 'bang-your-head-against-the-wall-here' point.
Regards,
Wolfgang |
|
Back to top |
|
 |
jefflowrey |
Posted: Sat Mar 04, 2006 9:21 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
WolfgangGPropfe wrote: |
Not sure where to find the application log for when a channel retries. |
I meant the Application log under Event Viewer. right-click on "My Computer", select "Manage", expand "Event Viewer" and click on "Application". _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
WolfgangGPropfe |
Posted: Sat Mar 04, 2006 10:14 am Post subject: |
|
|
Newbie
Joined: 03 Mar 2006 Posts: 5
|
Dear Jeff:
Thanks, it only shows a security entry and entries from McAfee Virus Scanner and MS SQL Server, not MQ.
I made some progress after a reboot - the sender channels show running and the receiver channels inactive. However, now I cannot put a test message. The (local) transmission queue says 'in use' and the (remote) sender queue gives me a failure on open (wrong type), so I cannot put a message there.
Perhaps I need to focus on the queue setup. One other odd thing is that if I try to start the receiver channel, it says it is already active although the status says 'inactive'.
Well, I'll head out and look for a hands-on book. It is probably a small thing with a big impact.
Thanks,
Wolfgang |
|
Back to top |
|
 |
clindsey |
Posted: Sun Mar 05, 2006 7:19 am Post subject: |
|
|
Knight
Joined: 12 Jul 2002 Posts: 586 Location: Dallas, Tx
|
Wolfgang,
This should help. http://advisor.com/Articles.nsf/nl/BOWEO001
It will be easier if you name your xmit queues the same as the queue manager you are sending to. On QM_A, your xmit queue name should be QM_B.
Charlie |
|
Back to top |
|
 |
WolfgangGPropfe |
Posted: Sun Mar 05, 2006 9:17 am Post subject: Problem solved |
|
|
Newbie
Joined: 03 Mar 2006 Posts: 5
|
Dear Charlie:
Thanks, that was the breakthrough!!!
My configuration was already correct after your and Jeff's help, but I could not MQOPEN the remote queue with the API Exerciser ('wrong type'). It worked with your command ('amqsput'), and when I tried the MQPUT1 in the API Exerciser, it worked, too. I guess you cannot keep a remote channel open, so it makes sense to do an all-at-once PUT.
I can probably expand the simple example from here by adding triggers, initiators, user exits, etc. This was the equivalent of 'Hello world' to me.
If you (or anybody here on this forum) has a similar getting-started issue with SAP/ABAP, perhaps I can return the favor and help out. My email is wolfgang@wolfgangconsulting.com. Otherwise I can only thank you for all your help and try to 'pay it forward' to the next person who needs to get started.
Thanks,
Wolfgang
P.S.: Write-up:
All the config is already mentioned in this thread, so I won't post it again. The main thing for me was to feed the remote queue with the MQPUT1, not the transmission queue with MQPUT. The channels were working right as soon as I added the localhost(xxxx) connection name with the proper port on the sender channel. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|