Author |
Message
|
krish_blore |
Posted: Mon Dec 20, 2010 9:40 am Post subject: MQCONNX ended with reason code 2538 |
|
|
Novice
Joined: 29 Nov 2010 Posts: 19
|
Hi,
I have tried to execute amqsnxc on sample program and got below error,
any help should be appreciated to reolve this.
e3002761@/usr/mqm/samp/bin$ echo $MQSERVER
CHANNEL2/TCP/10.135.128.184(9003)
e3002761@/usr/mqm/samp/bin$ ./amqscnxc -x 10.135.128.184 -c CHANNEL2
Sample AMQSCNXC start
Connecting to the default queue manager
using the server connection channel CHANNEL2
on connection name 10.135.128.184.
MQCONNX ended with reason code 2538
e3002761@/usr/mqm/samp/bin$ ping atllpf03
PING atllpf03: (10.135.128.184): 56 data bytes
64 bytes from 10.135.128.184: icmp_seq=0 ttl=64 time=0 ms
64 bytes from 10.135.128.184: icmp_seq=1 ttl=64 time=0 ms
64 bytes from 10.135.128.184: icmp_seq=2 ttl=64 time=0 ms
64 bytes from 10.135.128.184: icmp_seq=3 ttl=64 time=0 ms
^C
----atllpf03 PING Statistics----
4 packets transmitted, 4 packets received, 0% packet loss
Thanks for your time,
Krish |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Dec 20, 2010 9:57 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
MQCONNX does not use MQSERVER.
you didn't specify the port when you called amqscnxc.
 |
|
Back to top |
|
 |
bruce2359 |
Posted: Mon Dec 20, 2010 9:58 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
|
Back to top |
|
 |
bruce2359 |
Posted: Mon Dec 20, 2010 10:18 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
|
Back to top |
|
 |
mqjeff |
Posted: Mon Dec 20, 2010 10:41 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Yes, okay, so technically if you supply a NULL pointer to MQCONNX for the ConnectOpts it will in fact act like a normal MQCONN, and look up MQSERVER from the environment. So in that sense, what I said about MQCONNX is false.
The fact that amqscnxc will interpret a lack of parameters to pass a null pointer to MQCONNX for ConnectOpts has nothing to do with what I said, nor with what krish_blore did.
MQRC 2538 is MQRC_HOST_NOT_AVAILABLE. This is because krish_blore did not provide the options to amqscnxc to cause it to tell MQCONNX either what the PORT number was or to use MQSERVER. |
|
Back to top |
|
 |
bruce2359 |
Posted: Mon Dec 20, 2010 10:55 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Sorry. I didn't mean to be needlessly argumentative.
There are far too many viewers of this site who don't read the manuals, take literally what is offered here. _________________ 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 |
|
 |
krish_blore |
Posted: Mon Dec 20, 2010 11:57 pm Post subject: |
|
|
Novice
Joined: 29 Nov 2010 Posts: 19
|
Thanks for your information..
I am using AIX as a client and LINUX is server ,
unset MQSERVER and then tried the same with port number, below is the output,
$ ./amqscnxc -x 10.135.128.184[9003] -c CHANNEL2 QM_ORANGE
Sample AMQSCNXC start
Connecting to queue manager QM_ORANGE
using the server connection channel CHANNEL2
on connection name 10.135.128.184[9003].
MQCONNX ended with reason code 2538
In the server machine..default QUEUE is QM_ORANGE
QM_ORANGE:
---------
QUEUE NAME= QUEUE2
server(LINUX) setup:
-----------------------
define qlocal (queue2)
define channel (channel2) chltype (svrconn) trptype (tcp) mcauser ('mqm')
DEFINE CHANNEL(CHANNEL2) CHLTYPE(CLNTCONN) CONNAME('10.135.128.184(9003)') TRPTYPE(TCP) QMNAME(QM_ORANGE)
define listener (listener2) trptype (tcp) control (qmgr) port (9003)
start listener(listener2)
$ ps -ef|grep 9003
mqm 5167 5004 0 01:16 ? 00:00:00 /opt/mqm/bin/runmqlsr -r -m QM_ORANGE -t TCP -p 9003
e3002761 9169 4254 0 02:52 pts/25 00:00:00 grep 9003
Is it mandatory to point MQCHLLIB and MQCHLTAB?
Please correct me if i am missing anything. |
|
Back to top |
|
 |
exerk |
Posted: Tue Dec 21, 2010 12:16 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
krish_blore wrote: |
...Is it mandatory to point MQCHLLIB and MQCHLTAB?... |
You are missing reading the Info Centre in more detail...
Quote: |
When an MQCONNX call is issued by an application on a WebSphere MQ client, the MQI client library searches for the client channel information in the following order:
1. Using the contents of the ClientConnOffset or ClientConnPtr fields of the MQCNO structure (if supplied). These identify the channel definition structure (MQCD) to be used as the definition of the client connection channel.
2. If the MQSERVER environment variable is set, the channel it defines is used.
3. If the MQCHLLIB and MQCHLTAB environment variables are set, the client channel definition table they point to is used.
4. Finally, if the environment variables are not set, the client searches for a client channel definition table whose path and name are established from the DefaultPrefix in the mqs.ini file or the Registry for Windows. If this fails, the client uses the following paths:
* UNIX systems
⁄var⁄mqm⁄AMQCLCHL.TAB
* Windows
C:\Program Files\IBM\Websphere MQ\amqclchl.tab
The first of the options described above (using the ClientConnOffset or ClientConnPtr fields of MQCNO) is supported only by the MQCONNX call. |
_________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
krish_blore |
Posted: Tue Dec 21, 2010 12:16 am Post subject: |
|
|
Novice
Joined: 29 Nov 2010 Posts: 19
|
I have followed the steps in the below link also,
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/index.jsp?topic=/com.ibm.mq.csqzal.doc/fg17940_.htm
step1 :
export MQSERVER=CHANNEL2/TCP/'10.135.128.184(9003)'
./amqscnxc
Sample AMQSCNXC start
Connecting to the default queue manager
with no client connection information specified.
Connection established to queue manager QM_ORANGE
Sample AMQSCNXC end
step 2 : UNSET the MQSERVER
$ ./amqscnxc -x 10.135.128.184[9003] -c CHANNEL2 QM_OR
ONGE
Sample AMQSCNXC start
Connecting to queue manager QM_ORONGE
using the server connection channel CHANNEL2
on connection name 10.135.128.184[9003].
MQCONNX ended with reason code 2538
I am getting the same Error
MQRC_HOST_NOT_AVAILABLE
Thanks ,
krish |
|
Back to top |
|
 |
exerk |
Posted: Tue Dec 21, 2010 12:20 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Have you tried it with () brackets? _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
krish_blore |
Posted: Tue Dec 21, 2010 12:32 am Post subject: |
|
|
Novice
Joined: 29 Nov 2010 Posts: 19
|
s..even i tried with () also it is giving syntax error..thats y i didnt post
$ ./amqscnxc -x 10.135.128.184(9003) -c CHANNEL2 QM_ORANGE
ksh: 0403-057 Syntax error: `(' is not expected.
Thanks,
krish |
|
Back to top |
|
 |
exerk |
Posted: Tue Dec 21, 2010 1:09 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
You need to go back and read the manual in regard to the correct syntax of amqscnxc, particularly in regard to what flags you can specify together. _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Dec 21, 2010 2:36 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
|
Back to top |
|
 |
mvic |
Posted: Tue Dec 21, 2010 2:53 am Post subject: |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
krish_blore wrote: |
ksh: 0403-057 Syntax error: `(' is not expected. |
That error message is Korn shell telling you you have a syntax error on your command. So the shell did not even start amqscnxc for you, because of this error.
Correct your shell syntax. Remember "(" and ")" have special meaning in Unix shells so you have to quote them somehow.
Please search the internet for answers to this, I don't think we can hope to teach you all about Korn shell syntax on this site. |
|
Back to top |
|
 |
krish_blore |
Posted: Tue Dec 21, 2010 3:03 am Post subject: |
|
|
Novice
Joined: 29 Nov 2010 Posts: 19
|
Thanks Jeff it worked....
$ ./amqscnxc -x '10.135.128.184(9003)' -c CHANNEL2 QM_
ORANGE
Sample AMQSCNXC start
Connecting to queue manager QM_ORANGE
using the server connection channel CHANNEL2
on connection name 10.135.128.184(9003).
Connection established to queue manager QM_ORANGE
Sample AMQSCNXC end |
|
Back to top |
|
 |
|