Author |
Message
|
popeye007 |
Posted: Wed Aug 20, 2003 3:30 am Post subject: Connection problems between two Unix Machines |
|
|
 Newbie
Joined: 20 Aug 2003 Posts: 7
|
Hi,
Am facing a pretty irritating problem while using a C application which I have written. The application reads from a queue in one Unix machine and writes to another queue on the other Unix machine. I have used the MQCONNX call to connect to the second queue manager;and have set the values of the Channel Type & Transport Type and Connection Name,a s well as the Channel Name.
However, the application fails to connect to the second machine: gives me a reason code:2058, i.e Can't recognise the Queue Manager.
Will be very nice if anybody can help me out of this....
Thanks guys... |
|
Back to top |
|
 |
PeterPotkay |
Posted: Wed Aug 20, 2003 2:16 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Are you positive you are specifying the correct queue manager name (its case sensitive) in the MQCONNX call?
If so, is the other queue manager up and running? _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
EddieA |
Posted: Wed Aug 20, 2003 2:51 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
And a Listener.
You could check connectivity using amqsgetc, after setting the correct environment variable.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
PeterPotkay |
Posted: Wed Aug 20, 2003 2:53 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Eddie, I was gonna list the listner, but if it was not running, would we not see a 2059 or a 2009 instead? I think 2058 implies the listener is up???? _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
vennela |
Posted: Wed Aug 20, 2003 5:36 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
But even before that
Where is the application? On the first Unix Machine? Or on a different machine which is different from the two machines that are running the QMGRs.
From what popeye007 wrote I got the impression that he is running the application from the box where his first QMGR is. If that is the case, then he instead of PUTting the message directly to the second box, use MQ services to do that right. |
|
Back to top |
|
 |
dsim |
Posted: Wed Aug 20, 2003 6:17 pm Post subject: |
|
|
Acolyte
Joined: 11 Aug 2003 Posts: 67 Location: Toronto
|
You can also test mq between the 2 machines using mqput. If mqput works it's a problem with your code, if not is a problem with mq settings.
Dan |
|
Back to top |
|
 |
popeye007 |
Posted: Wed Aug 20, 2003 8:35 pm Post subject: Connection problem between two Unix Machines...Clarification |
|
|
 Newbie
Joined: 20 Aug 2003 Posts: 7
|
Thank you guys...
but I guess the fault lay with me for not properly xplaining the situation.
The grand scenario is this : I have my application running on one Unix box...where I have a Queue Manager running and am connected to it. I use the application to read messages from a named queue and then simultaneously post it to another queue in another Queue Manager running on the second Unix box. Since Unix doesn't allow a single process to connect to 2 QMs simutaneoulsy, I have had to fork another process to connect to the second QM. The problem is that either the MQCONNX doesn't connect or it just sits there doing nothing...the process controlling the PUT just hangs.
Will be gr8 if any of you can gimme a solution...been wracking my brains off over this! |
|
Back to top |
|
 |
PeterPotkay |
Posted: Thu Aug 21, 2003 4:40 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Why don't you just make a remote queue definition on the 1st Unix box that you are already connected to pointing to the other queue on the other queue manager? There is no need (from the details provided) for you to try and connect to that second box / QM.
This would be SOOOOOOO much simpler!  _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
syangloo |
Posted: Thu Aug 21, 2003 6:41 pm Post subject: |
|
|
Centurion
Joined: 01 Oct 2002 Posts: 120 Location: Kuala Lumpur
|
Yes, agreed with PeterPorker.
If you create the remote queue at the 1st UNIX box qmgr, the connection to the 2nd qmgr will be up. (you just need to make sure the channel is up)
You just need to connect to one qmgr at unix box, get the msg from local queue and put it into remote queue for MQ send it to 2nd box of server.
Regards
Syangloo |
|
Back to top |
|
 |
popeye007 |
Posted: Thu Aug 21, 2003 8:25 pm Post subject: Unix Connection |
|
|
 Newbie
Joined: 20 Aug 2003 Posts: 7
|
Well, the client requirement is that remote queue definitions aren't allowed.dont ask me why they put such a condition, but that is definite;y out for the moment, if u ask me.
Remote q definitons is the first thing I had suggested but it's been ruled out.
Any other ideas u mite b having, pls feel free to advise me...I desperately need a solution! |
|
Back to top |
|
 |
PeterPotkay |
Posted: Fri Aug 22, 2003 3:49 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
First off, it is RIDICULOUS that they are not allowing remote queue defs. That is one of the most basic of MQ functions. What is their reason? I hope its not because someone screwed up some remote queue definitions early on, and now they think they don't work.
Anyway, if that is really the case, , then have the original app be a pure MQClient. It can client connect to the first box and client connect to the second box. MQClient applications can concurrently connect to more than one queue manager.
You can use the CONNX call for both, or simply use the regular MQCONN call , specifying the QM name, and relying on MQ Channel Tables to make the proper connection choices for you. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
popeye007 |
Posted: Fri Aug 22, 2003 5:04 am Post subject: Thanks Peter and all of u guys! |
|
|
 Newbie
Joined: 20 Aug 2003 Posts: 7
|
Peter..thnx a ton mate!
I tried the second option and it works.feels gr8....
all of you who responded to my problem(s)...thnx again to all of you!
Cheers! |
|
Back to top |
|
 |
|