Author |
Message
|
pnicolay |
Posted: Mon Nov 29, 2010 3:59 am Post subject: 2058 MQRC_Q_MGR_NAME_ERROR with use of MQCHLTAB in C# |
|
|
Apprentice
Joined: 29 Nov 2010 Posts: 26
|
I'm trying to use a channel definition table, but I always get a 2058 MQRC_Q_MGR_NAME_ERROR on the C# statement
MQManager = new MQQueueManager("MYQM");
where I do have an entry in the channel definition file with queuemanager MYQM ? (actually I created a client connection channel with the name SYSTEM.DEF.SVRCONN holding the name of MYQM and the hostname it is located).
Is there anything else I need to do except pointing MQCHLLIB and MQCHLTAB to the correct file ? |
|
Back to top |
|
 |
Vitor |
Posted: Mon Nov 29, 2010 5:37 am Post subject: Re: 2058 MQRC_Q_MGR_NAME_ERROR with use of MQCHLTAB in C# |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
pnicolay wrote: |
where I do have an entry in the channel definition file with queuemanager MYQM ? (actually I created a client connection channel with the name SYSTEM.DEF.SVRCONN holding the name of MYQM and the hostname it is located). |
Do not use SYSTEM objects for applications.
Do you mean you created a client connection channel that matches SYSTEM.DEF.SVRCONN? Odd. You're much better off for a number of reasons creating your own pair for your application to use. If nothing else it allows you to change sizes without impact (as per your other thread)
pnicolay wrote: |
Is there anything else I need to do except pointing MQCHLLIB and MQCHLTAB to the correct file ? |
No. All other things being equal. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
pnicolay |
Posted: Mon Nov 29, 2010 6:17 am Post subject: |
|
|
Apprentice
Joined: 29 Nov 2010 Posts: 26
|
I did indeed created a client connection channel for SYSTEM.DEF.SVRCONN, but to follow your advice I now created both a server and client channel TEST.CHL... however still the same issue. |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Nov 29, 2010 6:20 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
So you have confirmed that the CLNTCONN has a QMNAME('MYQM') ?
And you've confirmed that you've linked your C# code against the MQ client libraries and not the MQ server libraries? |
|
Back to top |
|
 |
bruce2359 |
Posted: Mon Nov 29, 2010 6:33 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9471 Location: US: west coast, almost. Otherwise, enroute.
|
Quote: |
I did indeed created a client connection channel for SYSTEM.DEF.SVRCONN, /quote]
This definition already existed, and it is a server-connection channel, not a client channel.
quote]but to follow your advice I now created both a server and client channel TEST.CHL... however still the same issue. |
Please post both definitions you created. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
pnicolay |
Posted: Mon Nov 29, 2010 7:13 am Post subject: |
|
|
Apprentice
Joined: 29 Nov 2010 Posts: 26
|
DEFINE CHANNEL ('TEST.CHL') CHLTYPE(SVRCONN)
TRPTYPE(TCP)
MAXMSGL(104857600)
MCAUSER('*PUBLIC')
DEFINE CHANNEL ('TEST.CHL') CHLTYPE(CLNTCONN)
TRPTYPE(TCP)
CONNAME('MYHOSTNAME')
MAXMSGL(104857600)
QMNAME('MYQM') |
|
Back to top |
|
 |
ramires |
Posted: Mon Nov 29, 2010 7:23 am Post subject: |
|
|
Knight
Joined: 24 Jun 2001 Posts: 523 Location: Portugal - Lisboa
|
|
Back to top |
|
 |
pnicolay |
Posted: Mon Nov 29, 2010 12:37 pm Post subject: |
|
|
Apprentice
Joined: 29 Nov 2010 Posts: 26
|
I replaced the name of the queuemanager with MYQM in this case (but the name matches my queuemanager, and what I specify on the new MQQueueManager).
The two defines are extracted with the SAVEQMGR tool as I don't use MQSC for creating them (iSeries has a native command line tool for doing so).
BTW, during the new MQQueueManager there's no activity on the listener socket (based on iSeries TCP/IP information), so it really goes wrong on the PC during the instantiation of the MQQueueManager object. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Nov 29, 2010 1:04 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
The next question you need to answer is the earlier one about your application being linked client or server. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
pnicolay |
Posted: Tue Nov 30, 2010 12:51 am Post subject: |
|
|
Apprentice
Joined: 29 Nov 2010 Posts: 26
|
I'm using the amqmdnet.dll, which is the non-XA client.
The connection is from my PC (which has an MQ server installed, but is not being used) to an iSeries server. Anyway, when I just set the environment parameters (host, port, channel) in my program, it works fine. |
|
Back to top |
|
 |
shashikanth_in |
Posted: Tue Nov 30, 2010 3:29 am Post subject: |
|
|
Centurion
Joined: 26 Feb 2009 Posts: 123
|
Have you tried doing the below in your application to set MQLCHLTAB and MQLCHLLIB env variables
Environment.SetEnvironmentVariable("MQCHLLIB", "C:\\Program Files\\IBM\\WebSphere MQ\\Qmgrs\\MQQM\\@ipcc");
Environment.SetEnvironmentVariable("MQCHLTAB", "AMQCLCHL.TAB"); |
|
Back to top |
|
 |
pnicolay |
Posted: Tue Nov 30, 2010 3:37 am Post subject: |
|
|
Apprentice
Joined: 29 Nov 2010 Posts: 26
|
No, but I've read them in my program to validate if it picks them up correctly... and everything seems to be fine. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Tue Nov 30, 2010 4:08 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Hi,
Per Vitor's question, what type of connection are you using?
Did you set the following in your code:
Code: |
connProp.Add(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES_CLIENT); |
Or did you set the NMQ_MQ_LIB to mqic.dll
Code: |
<configuration>
<appSettings>
<add key="NMQ_MQ_LIB" value="mqic.dll"/>
</appSettings>
</configuration> |
Regards,
Roger Lacroix _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Nov 30, 2010 6:20 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
RogerLacroix wrote: |
Or did you set the NMQ_MQ_LIB to mqic.dll
Code: |
<configuration>
<appSettings>
<add key="NMQ_MQ_LIB" value="mqic.dll"/>
</appSettings>
</configuration> |
|
You always want to make it significantly more complicated that it should be.
Why can't we just leave it at SET? |
|
Back to top |
|
 |
pnicolay |
Posted: Wed Dec 01, 2010 12:02 am Post subject: |
|
|
Apprentice
Joined: 29 Nov 2010 Posts: 26
|
No, I haven't set that property (I'll give it a try tomorrow). I do wonder however why I would need to set it since not using a channel definition table works fine (or is he making the assumption based on the fact that I use MQEnvironment settings for host, port and channel) ?
In the mean while I found the following link from IBM; http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzav.doc/un10480_.htm however it's still unclear to me what the relation is between the mqic.dll and amqmdnet.dll (which I added to the project). |
|
Back to top |
|
 |
|