|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Client application returnes RC 2058 |
« View previous topic :: View next topic » |
Author |
Message
|
Bill57 |
Posted: Fri Jul 26, 2002 5:25 am Post subject: Client application returnes RC 2058 |
|
|
Apprentice
Joined: 26 Jul 2002 Posts: 35 Location: Atlanta, GA
|
I recently wrote a quick little application to demo the MQAI's ability to monitor queue depth. I compiled it (on win200) using the mqic32.lib, and used the SET MQSERVER=SERVERCONN/TCP/IP Address to set up the channel to my test server. I have a listener running on the default port, but every time I run the app I get a 2058 (MQRC_Q_MGR_NAME_ERROR).
By the way, if I link it with the mqm library, it works just fine, assuming it is running on the same machine as the queue manager of course!
any thoughts?
Thanks
Bill _________________ Bill Anderson
MQSeries Developer |
|
Back to top |
|
 |
mrlinux |
Posted: Fri Jul 26, 2002 6:01 am Post subject: |
|
|
 Grand Master
Joined: 14 Feb 2002 Posts: 1261 Location: Detroit,MI USA
|
Are you specifing the qmgr name ?? Also is the qmgr set up as the default queue manager ???
The 2058 Reason code indicates you are connecting to the listener but you are passing the correct qmgr name. _________________ Jeff
IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries |
|
Back to top |
|
 |
Bill57 |
Posted: Fri Jul 26, 2002 10:33 am Post subject: |
|
|
Apprentice
Joined: 26 Jul 2002 Posts: 35 Location: Atlanta, GA
|
I have attempted to connect two different queue managers, one remote, and one on the same machine I wrote the application on. I the remote machine is not a default qmgr, but the local one is. I have tried both specifing the qmgr name, and leaving it blank (on the default qmgr only).
Keep in mind it works perfectly when linked to mqm.lib
Thanks for the response
Bill _________________ Bill Anderson
MQSeries Developer |
|
Back to top |
|
 |
kirani |
Posted: Fri Jul 26, 2002 11:19 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Bill,
I hope you are using MQCONNX call in your code. Could you post the part of your code where you are making Connection to queue manager? _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
Bill57 |
Posted: Fri Jul 26, 2002 11:48 am Post subject: |
|
|
Apprentice
Joined: 26 Jul 2002 Posts: 35 Location: Atlanta, GA
|
I am using MQCONN to connect. This should work just fine as a client because I am not connecting to multiple servers at once (at least not yet). The code is very straight forward really, but at your request I have included to call below.
if (argc > 1)
strncpy(QmgrName, argv[1], (size_t)MQ_Q_MGR_NAME_LENGTH);
MQCONN(QmgrName, &Hconn, &CompCode, &MQConnReason);
Thanks!
Bill _________________ Bill Anderson
MQSeries Developer |
|
Back to top |
|
 |
kirani |
Posted: Fri Jul 26, 2002 12:13 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Bill,
Could you try running amqsgetc utility to get some dummy message from some queue from remote queue manager? This will tell us two things:
1. MQSERVER variable is set correctly.
2. The listner on remote queue manager is responding properly.
Is your QmgrName defined as char array? What are the arguments and their sequence?
Is it Programname queuename queuemanagername?
Here is a sample:
char QmgrName[50];
...
QmgrName[0]=0;
if (argc > 1)
strcpy(QmgrName, argv[1]);
...
MQCONN(QmgrName, &Hconn, &CompCode, &MQConnReason);
... _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
Bill57 |
Posted: Mon Jul 29, 2002 6:15 am Post subject: Fixed it |
|
|
Apprentice
Joined: 26 Jul 2002 Posts: 35 Location: Atlanta, GA
|
For some reason, I only get the 2058 when I execute my app from the build menu of the Visual C++ IDE. When I just use the command line from a DOS window, it works just fine. That is strange in deed, but at least it works now.
Your suggestion of using the amqsgetc.exe sample program helped me find a solution.... thanks!
Bill _________________ Bill Anderson
MQSeries Developer |
|
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
|
|
|
|