Author |
Message
|
j1 |
Posted: Fri Mar 24, 2006 1:06 pm Post subject: MQ Client not picking up MQCHLIB/MQCHLTAB |
|
|
 Centurion
Joined: 23 Jun 2003 Posts: 139
|
Hi All, This may be a simple question, but I didnt find a sloution going through the forums or the MQ Clients book. My C Client works fiine when i use MQSERVER variable but when I blank it out and try to use the MQCHLLIB/MQCHLTAB, I get the below error form the error logs on the client side.
Quote: |
03/24/06 13:59:31 - Process(150.1) User(root) Program(mqconnxsample2)
AMQ9202: Remote host '' not available, retry later.
EXPLANATION:
The attempt to allocate a conversation using TCP/IP to host '' was not
successful. However the error may be a transitory one and it may be possible
to successfully allocate a TCP/IP conversation later.
|
It looks like its not picking up the server ip address. i have copied over the channel table from the server, the QMNAME attribute on the client channel its set for what its worth, but im still getting 2058/2059's |
|
Back to top |
|
 |
wschutz |
Posted: Fri Mar 24, 2006 1:13 pm Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
It looks like the client is trying to use 'SYSTEM.DEF.CLNTCONN', which has a null conname.
Did you specify the QMNAME on the MQCONN call that matches the one you put in the channel table? _________________ -wayne |
|
Back to top |
|
 |
j1 |
Posted: Fri Mar 24, 2006 1:15 pm Post subject: |
|
|
 Centurion
Joined: 23 Jun 2003 Posts: 139
|
Should I enter a qmgr name (I didnt). I thought the whole idea of using a channel table was that it would "find" the qmgr based on the CONNAME in the channel definition? |
|
Back to top |
|
 |
j1 |
Posted: Fri Mar 24, 2006 1:17 pm Post subject: |
|
|
 Centurion
Joined: 23 Jun 2003 Posts: 139
|
what I mean is that this means that the Qmgr name will now have to be hard coded in the code and thats not eccesarily a good thing. Is there any way around it... |
|
Back to top |
|
 |
wschutz |
Posted: Fri Mar 24, 2006 1:29 pm Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Well, usually things like a qmgr name are passed in as parms or read from a properties file. Did you try passing it on the MQCONN and see if it works? _________________ -wayne |
|
Back to top |
|
 |
mvic |
Posted: Fri Mar 24, 2006 1:30 pm Post subject: |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
sk1 wrote: |
what I mean is that this means that the Qmgr name will now have to be hard coded in the code and thats not eccesarily a good thing. Is there any way around it... |
Make your program read it out of a file if that's what you want. You have to supply something to the MQCONN or MQCONNX call - the client channel table can contain many definitions.
The file you read the qmgr name from could be on a shared filesystem if you need.
Check up the Clients manual again - it's in there. For example : http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzaf.doc/csqzaf0857.htm
(By the way, JMS and XMS give you the ability to look up connection factory info from LDAP, file system etc. - maybe this helps) |
|
Back to top |
|
 |
j1 |
Posted: Fri Mar 24, 2006 1:51 pm Post subject: |
|
|
 Centurion
Joined: 23 Jun 2003 Posts: 139
|
works like a charm, Thanks. I guess ill have to look at the other options later.. |
|
Back to top |
|
 |
wschutz |
Posted: Fri Mar 24, 2006 1:58 pm Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Just one more thing.... the qmname name passed on the MQCONN is used as a key to match one or more entires in the channel table (QMNAME). If you have more than one channel with the same QMNAME, the channels are searched alphabetically and the first one that matches is tried. If the connection fails, then the next matching channel is used, until all matching channels are used, then a failure is returned on the MQCONN.
You normally have the QMNAME in the channel table also match the qmgr that you want to connect to. But you can override that by specifying an "*" as the first character of the qmname on the MQCONN, in which case that name is ONLY used to match whats in the channel table (minus the *) and doesn't need to match the actual name of the qmgr you connect to.
Hope this helps.... _________________ -wayne |
|
Back to top |
|
 |
|