Author |
Message
|
mvcg |
Posted: Thu Nov 09, 2006 4:00 pm Post subject: 2058 - MQRC_Q_MGR_NAME_ERROR. |
|
|
Novice
Joined: 02 Jul 2003 Posts: 11
|
Hi,
Here's the setup...
I'm using a client table and have set environment variables to point to its temporary location:
MQCHLLIB=C:\
MQCHLTAB=AMQCLCHL.TAB
The sample application amqsputc.exe works just fine for me.
Using the .NET libraries, I can connect, using the client libraries, to the same remote queue manager by explicitly setting server channel name and connection name, using:
MQEnvironment.Hostname = hostName;
MQEnvironment.Channel = channelName;
mgr = new MQQueueManager(queueMgrName, queueMgrOpenOpt);
Per another topic I created a while back, I need to use the client table in order to PUT/GET messages more than 10MB in size if I'm using the .NET libraries. That's the reason for the client table and environment variables mentioned above.
Because I've set these environment variables, it's my understanding that I can use:
mgr = new MQQueueManager(queueMgrName);
to connect to the remote queue manager using client libraries.
Alas, that doesn't work and I get the 2058 - MQRC_Q_MGR_NAME_ERROR.
I've changed the value of the MQCHLTAB environment variable in order to make sure that amqsputc.exe is actually using those values and it is (you know, making sure there's not "something else" pointing to the remote queue manager).
mqver returns:
Name: WebSphere MQ
Version: 530.11 CSD11
CMVC level: p530-11-L050802
BuildType: IKAP - (Production)
Any help would be greatly appreciated and thank you in advance.
<Mark /> |
|
Back to top |
|
 |
hopsala |
Posted: Fri Nov 10, 2006 2:02 am Post subject: |
|
|
 Guardian
Joined: 24 Sep 2004 Posts: 960
|
Well, we need to know the content of your channel table.
Put the AMQCLCHL.TAB file back to the server library where it came from, and display all client channels; post the result. Also state what is the value of queueMgrName. |
|
Back to top |
|
 |
mvcg |
Posted: Fri Nov 10, 2006 5:08 pm Post subject: |
|
|
Novice
Joined: 02 Jul 2003 Posts: 11
|
Thanks for the reply hopsala, but I thought I pointed out that the client table works for the amqsputc.exe application. Given that, I believe it's safe to assume that the client table contains valid entries. Also, why do you need to know the specific value of my queueMgrName variable? I've stated that I can connect to the queue manager using a different constructor (using client libraries by setting MQEnvironment.Hostname and MQEnvironment.Channel) and therefore the queue manager name is valid.
After I've set the MQCHLLIB and MQCHLTAB environment variables correctly, can't I simply create an MQQueueManager object using the
MQQueueManager(string queueManagerName) constructor?
<Mark /> |
|
Back to top |
|
 |
wschutz |
Posted: Fri Nov 10, 2006 5:32 pm Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
When using channel tables and specifying a qmgr name on the mq connect call, you need to have a matching channel with that QMNAME in the channel table... do you have that .... for example, going back to amqsputc, does:
amqsputc SYSTEM.DEFAULT.LOCAL.QUEUE queueMgrName
work? (ie, you specify the queue mgr name on the amqsputc command)?? _________________ -wayne |
|
Back to top |
|
 |
hopsala |
Posted: Sat Nov 11, 2006 2:18 am Post subject: |
|
|
 Guardian
Joined: 24 Sep 2004 Posts: 960
|
wayne's answer might have clarified what I meant - that your chltab works in indeed assured by what you already stated; but it is not enough that it is "ok", you must make sure the qmgrname that you specify and that in the chltab are consistent. You might be using different names for amqsputc and in your prog.
That is why it will be easier for us to help you if you post chltab content and the value of the said parm, maybe I should have been more clear the first time.
And to answer your q, yes you can create a QQueueManager object using the specified call, if you get the qm name right... |
|
Back to top |
|
 |
mvcg |
Posted: Mon Nov 13, 2006 6:58 am Post subject: |
|
|
Novice
Joined: 02 Jul 2003 Posts: 11
|
Thanks for the clarification.
I have appended the results of running saveqmgr.exe at the end of this message. The queue definitions have been left out for the sake of brevity. And, yes, I know that the server channel is wide open. I'll close that door when I get there.
I am using "MQSERVER" as the queue manager name for both the amqsputc.exe application and my own, like:
amqsputc TESTQ MQSERVER (this works)
MQQueueManager qm = new MQQueueManager("MQSERVER"); (this doesn't work)
Your help is greatly appreciated.
<Mark />
* This file generated by SAVEQMGR V5.3.1 on 2006-11-13 at 08.42.59 hours.
*
* QMNAME (MQSERVER) +
* CRDATE (2006-11-09) +
* CRTIME (13.39.16) +
* ALTDATE (2006-11-09) +
* ALTTIME (13.39.16) +
* QMID (MQSERVER_2006-11-09_13.39.16) +
*
ALTER QMGR +
AUTHOREV(DISABLED) +
DEADQ(' ') +
DEFXMITQ(' ') +
DESCR(' ') +
INHIBTEV(DISABLED) +
LOCALEV(DISABLED) +
MAXHANDS(256) +
MAXUMSGS(10000) +
PERFMEV(DISABLED) +
REMOTEEV(DISABLED) +
STRSTPEV(ENABLED) +
TRIGINT(999999999) +
MAXMSGL(4194304) +
CHAD(DISABLED) +
CHADEV(DISABLED) +
CHADEXIT(' ') +
CLWLEXIT(' ') +
CLWLDATA(' ') +
REPOS(' ') +
REPOSNL(' ') +
CLWLLEN(100) +
SSLCRLNL (' ') +
SSLKEYR ('C:\Program Files\IBM\WebSphere MQ\qmgrs\MQSERVER\ssl\key') +
FORCE
DEFINE CHANNEL ('TOSERVER') CHLTYPE(SVRCONN) +
* ALTDATE (2006-11-09) +
* ALTTIME (16.10.40) +
TRPTYPE(TCP) +
DESCR(' ') +
HBINT(300) +
MAXMSGL(4194304) +
MCAUSER('Administrator') +
RCVDATA(' ') +
RCVEXIT(' ') +
SCYDATA(' ') +
SCYEXIT(' ') +
SENDDATA(' ') +
SENDEXIT(' ') +
SSLCAUTH(REQUIRED) +
SSLCIPH(' ') +
SSLPEER(' ') +
KAINT(AUTO) +
REPLACE
DEFINE CHANNEL ('TOSERVER') CHLTYPE(CLNTCONN) +
* ALTDATE (2006-11-09) +
* ALTTIME (16.10.57) +
TRPTYPE(TCP) +
CONNAME('192.168.1.150(1414)') +
LOCLADDR(' ') +
DESCR(' ') +
HBINT(300) +
MAXMSGL(4194304) +
QMNAME('MQSERVER') +
RCVDATA(' ') +
RCVEXIT(' ') +
SCYDATA(' ') +
SCYEXIT(' ') +
SENDDATA(' ') +
SENDEXIT(' ') +
USERID(' ') +
SSLCIPH(' ') +
SSLPEER(' ') +
KAINT(AUTO) +
REPLACE |
|
Back to top |
|
 |
tleichen |
Posted: Mon Nov 13, 2006 11:18 am Post subject: |
|
|
Yatiri
Joined: 11 Apr 2005 Posts: 663 Location: Center of the USA
|
Ok, but where's the chltab content?  _________________ IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer |
|
Back to top |
|
 |
mvcg |
Posted: Mon Nov 13, 2006 4:18 pm Post subject: |
|
|
Novice
Joined: 02 Jul 2003 Posts: 11
|
I really, really don't mean to be difficult, but isn't the client table created based on the "DEFINE CHANNEL ('TOSERVER') CHLTYPE(CLNTCONN)..." section of the script? That's my understanding and that's why I posted that. What I posted is the full extent (sans the queue definitions) of my queue manager script.
If I'm way off base, then how do I display the contents of the client table without taking a screen shot of the Client Connections section of MQ Explorer? I'm using MQ 5.3 CSD 11.
<Mark /> |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Nov 13, 2006 4:33 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
mvcg wrote: |
isn't the client table created based on the "DEFINE CHANNEL ('TOSERVER') CHLTYPE(CLNTCONN)..." section of the script? |
I hope so. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
wschutz |
Posted: Mon Nov 13, 2006 5:26 pm Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
The latest version of mo72-MQSC_Client_for_WebSphere_MQ allows you to dump the client channel table directyl from the amqclchl.tab file. But in any case, given the output from ms03, you should be able to connect using "MQSERVER" as your queueMgrName in the mgr = new MQQueueManager(queueMgrName) call.... _________________ -wayne |
|
Back to top |
|
 |
mvcg |
Posted: Mon Nov 13, 2006 7:02 pm Post subject: |
|
|
Novice
Joined: 02 Jul 2003 Posts: 11
|
Thanks Wayne. I'll look for mo72_MQSC_Client_for_WebSphere_MQ. In the meantime, since I can't connect to the queue manager using that constructor does anyone have any insights, tests, etc?
For what it's worth, I can't connect even after setting the MQSERVER variable accordingly:
SET MQSERVER=TOSERVER/TCP/192.168.1.150(1414)
Again, amqsputc.exe DOES work using either the client table or environment variable.
*Note: The name of the queue manager and the environment variable being named the same is purely coincidental and, arguably, bad style.
I'm at my wits end here...
<Mark /> |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Nov 13, 2006 7:11 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
|
Back to top |
|
 |
mvcg |
Posted: Thu Nov 16, 2006 8:31 am Post subject: |
|
|
Novice
Joined: 02 Jul 2003 Posts: 11
|
Setting the NMQ_MQ_LIB environment variable seemed to fix the problem. I set it to the value "mqic32.dll" to indicate the .NET libraries are to connect as a non-XA client.
Thanks to all for your help!
<Mark /> |
|
Back to top |
|
 |
|