Author |
Message
|
shashivarungupta |
Posted: Mon Oct 25, 2010 7:43 am Post subject: amqscnxc and failover using .tab file ? |
|
|
 Grand Master
Joined: 24 Feb 2009 Posts: 1343 Location: Floating in space on a round rock.
|
Hi All,
I have another scenario with amqscnxc command.
we have 2 qmgrs A, B on 2 diff. servers. Client gottu connect them using .tab file. They are hitting amqscnxc command with qmgr name.
If they fail to get the connection on A then they should get the connection over B.
Thats the case of failover !!
I have provided them a tab file with the entries of the channels of the respective qmgr.
Referred the MQv6.0 Client.pdf redbook ! Chapter 13 (Running applications on WebSphere MQ clients).
on A : channels defined are :
Code: |
DEFINE CHANNEL(A.TMAN2NEW) CHLTYPE(SVRCONN) TRPTYPE(TCP) SSLCIPH(TRIPLE_DES_SHA_US) SSLCAUTH(OPTIONAL) MCAUSER('tman')
1 : DEFINE CHANNEL(A.TMAN2NEW) CHLTYPE(SVRCONN) TRPTYPE(TCP) SSLCIPH(TRIPLE_DES_SHA_US) SSLCAUTH(OPTIONAL) MCAUSER('tman')
AMQ8014: WebSphere MQ channel created.
:
DEFINE CHANNEL(A.TMAN2NEW) CHLTYPE(CLNTCONN) TRPTYPE(TCP) SSLCIPH(TRIPLE_DES_SHA_US) QMNAME(A) CONNAME('a.b.c.d(1414)')
2 : DEFINE CHANNEL(A.TMAN2NEW) CHLTYPE(CLNTCONN) TRPTYPE(TCP) SSLCIPH(TRIPLE_DES_SHA_US) QMNAME(A) CONNAME('a.b.c.d(1414)')
AMQ8014: WebSphere MQ channel created.
:
DEFINE CHANNEL(B.TMAN2NEW) CHLTYPE(CLNTCONN) TRPTYPE(TCP) SSLCIPH(TRIPLE_DES_SHA_US) QMNAME(A) CONNAME('a.b.c.e(1414)')
3 : DEFINE CHANNEL(B.TMAN2NEW) CHLTYPE(CLNTCONN) TRPTYPE(TCP) SSLCIPH(TRIPLE_DES_SHA_US) QMNAME(A) CONNAME('a.b.c.e(1414)')
AMQ8014: WebSphere MQ channel created.
|
on B : channels defined are :
Code: |
DEFINE CHANNEL(B.TMAN2NEW) CHLTYPE(SVRCONN) TRPTYPE(TCP) SSLCIPH(TRIPLE_DES_SHA_US) SSLCAUTH(OPTIONAL) MCAUSER('tman')
1 : DEFINE CHANNEL(B.TMAN2NEW) CHLTYPE(SVRCONN) TRPTYPE(TCP) SSLCIPH(TRIPLE_DES_SHA_US) SSLCAUTH(OPTIONAL) MCAUSER('tman')
AMQ8014: WebSphere MQ channel created.
|
Now, they have a AMQCLCHL.TAB from qmgr 'A' which Hold the definitions of the channels (defined at 'A')
They are successfully connect to the qmgr 'A'.
But suppose 'A' goes down OR Listener not up for 'A' OR we give wrong port of 'A' qmgr in the same AMQCLCHL.TAB File, it should failover to 'B' qmgr BUT THEN this is not happening !!!
My question is 'amqscnxc' command used for failover scenarios ?
amqscnxc uses MQCONNX, whereas in that redbook they have given example using MQCONN...does it make a difference ?
Thanks _________________ *Life will beat you down, you need to decide to fight back or leave it. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Oct 25, 2010 10:43 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
I would have tried putting a dummy qmgr name (DUMMY) into the clntconn channels.
Here you have the risk of confusion between a default qmgr and using the channel table ...
And use amqscnxc *DUMMY
To check failover to B just stop the svrconn chl on A.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
aditya.aggarwal |
Posted: Mon Oct 25, 2010 10:58 am Post subject: |
|
|
 Master
Joined: 13 Jan 2009 Posts: 252
|
if a client application provides a client-connection channel definition in an MQCD structure on an MQCONNX call, this definition is used in preference to any entries in a client channel definition table that can be accessed by the WebSphere MQ client.
so it should supports amqscnxc command |
|
Back to top |
|
 |
gbaddeley |
Posted: Mon Oct 25, 2010 3:26 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
aditya.aggarwal wrote: |
if a client application provides a client-connection channel definition in an MQCD structure on an MQCONNX call, this definition is used in preference to any entries in a client channel definition table that can be accessed by the WebSphere MQ client. |
Yes, try using amqsputc, it just does MQCONN. _________________ Glenn |
|
Back to top |
|
 |
shashivarungupta |
Posted: Tue Oct 26, 2010 9:20 am Post subject: |
|
|
 Grand Master
Joined: 24 Feb 2009 Posts: 1343 Location: Floating in space on a round rock.
|
Yesterday, before posting the issue here, I did ask them to test using amqscnxc *A because 'A' is the qmgr on the client conn channel defs.
But it also not worked for them ! Strange for me !
Neither this worked, amqscnxc * . _________________ *Life will beat you down, you need to decide to fight back or leave it. |
|
Back to top |
|
 |
shashivarungupta |
Posted: Tue Oct 26, 2010 9:28 am Post subject: |
|
|
 Grand Master
Joined: 24 Feb 2009 Posts: 1343 Location: Floating in space on a round rock.
|
gbaddeley wrote: |
aditya.aggarwal wrote: |
if a client application provides a client-connection channel definition in an MQCD structure on an MQCONNX call, this definition is used in preference to any entries in a client channel definition table that can be accessed by the WebSphere MQ client. |
Yes, try using amqsputc, it just does MQCONN. |
Oh Yes.. I will ask them to do this too.
Thanks _________________ *Life will beat you down, you need to decide to fight back or leave it. |
|
Back to top |
|
 |
exerk |
Posted: Tue Oct 26, 2010 11:21 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
shashivarungupta wrote: |
Yesterday, before posting the issue here, I did ask them to test using amqscnxc *A because 'A' is the qmgr on the client conn channel defs.
But it also not worked for them ! Strange for me !
Neither this worked, amqscnxc * . |
*A will not work for SVRCONN channels with a blank queue manager name, but will work for those with any populated queue manager name.
* will work for any SVRCONN channel with a blank queue manager name.
Take a look at THIS link for further information (for parts of it you may have to display the page source as the way it displays in some web browsers truncates some of the lines). _________________ 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 |
|
 |
shashivarungupta |
Posted: Fri Nov 12, 2010 12:07 pm Post subject: |
|
|
 Grand Master
Joined: 24 Feb 2009 Posts: 1343 Location: Floating in space on a round rock.
|
exerk wrote: |
Take a look at THIS link for further information (for parts of it you may have to display the page source as the way it displays in some web browsers truncates some of the lines). |
When I opened this link on Mozilla / Chrome browsers , I wasn't able see the contents of that page written in Green i.e. mq commands, i think those are right trimmed. Whereas text in back is not right trimmed. I tried to adjust the font size of the browser..but no luck. can you please paste those commands in sequence here. _________________ *Life will beat you down, you need to decide to fight back or leave it. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Nov 12, 2010 12:17 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
shashivarungupta wrote: |
exerk wrote: |
Take a look at THIS link for further information (for parts of it you may have to display the page source as the way it displays in some web browsers truncates some of the lines). |
When I opened this link on Mozilla / Chrome browsers , I wasn't able see the contents of that page written in Green i.e. mq commands, i think those are right trimmed. Whereas text in back is not right trimmed. I tried to adjust the font size of the browser..but no luck. can you please paste those commands in sequence here. |
Get the latest version of Mozilla. I had no problems reading the commands in green using FireFox 3.6.12.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
shashivarungupta |
Posted: Fri Nov 12, 2010 12:28 pm Post subject: |
|
|
 Grand Master
Joined: 24 Feb 2009 Posts: 1343 Location: Floating in space on a round rock.
|
fjb_saper wrote: |
shashivarungupta wrote: |
exerk wrote: |
Take a look at THIS link for further information (for parts of it you may have to display the page source as the way it displays in some web browsers truncates some of the lines). |
When I opened this link on Mozilla / Chrome browsers , I wasn't able see the contents of that page written in Green i.e. mq commands, i think those are right trimmed. Whereas text in back is not right trimmed. I tried to adjust the font size of the browser..but no luck. can you please paste those commands in sequence here. |
Get the latest version of Mozilla. I had no problems reading the commands in green using FireFox 3.6.12.  |
I'm having the same version !
I can see only this part of those lines...
1 : define channel(IN.SVRCONN.x) chltype(CLNTCONN) conname(9.9.9.9) qmname(DALE)
2 : define channel(IN.SVRCONN.y) chltype(CLNTCONN) conname(8.8.8.8 ) qmnam
and its unbelievable , when I paste the lines it gives me the name DALE ..otherwise I cant see it on the browser. wow.  _________________ *Life will beat you down, you need to decide to fight back or leave it. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Nov 12, 2010 12:36 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
|
Back to top |
|
 |
shashivarungupta |
Posted: Fri Nov 12, 2010 12:48 pm Post subject: |
|
|
 Grand Master
Joined: 24 Feb 2009 Posts: 1343 Location: Floating in space on a round rock.
|
fjb_saper wrote: |
You need to change the display size (ctr + "-" key) |
That worked for me. thanks. _________________ *Life will beat you down, you need to decide to fight back or leave it. |
|
Back to top |
|
 |
shashivarungupta |
Posted: Mon Dec 13, 2010 4:30 am Post subject: |
|
|
 Grand Master
Joined: 24 Feb 2009 Posts: 1343 Location: Floating in space on a round rock.
|
exerk wrote: |
shashivarungupta wrote: |
Yesterday, before posting the issue here, I did ask them to test using amqscnxc *A because 'A' is the qmgr on the client conn channel defs.
But it also not worked for them ! Strange for me !
Neither this worked, amqscnxc * . |
*A will not work for SVRCONN channels with a blank queue manager name, but will work for those with any populated queue manager name.
* will work for any SVRCONN channel with a blank queue manager name.
Take a look at THIS link for further information (for parts of it you may have to display the page source as the way it displays in some web browsers truncates some of the lines). |
It worked. I tried different scenarios using it and it worked perfectly fine. {I also followed the statements from MQ Clientsv6.0 redbook. (Chapter 13. Running applications on WebSphere MQ clients). First Example.} _________________ *Life will beat you down, you need to decide to fight back or leave it. |
|
Back to top |
|
 |
shashivarungupta |
Posted: Tue Dec 28, 2010 10:09 am Post subject: |
|
|
 Grand Master
Joined: 24 Feb 2009 Posts: 1343 Location: Floating in space on a round rock.
|
Raising this post again.. (in continuation)..
I have couple of qmgrs DERBY and BELMONT. DERBY should be treated as Primary and BELMONT as secondary in case of failover.
I did the setup and it works perfectly fine...in case of DERBY Listener Down/Qmgr itself not available...it switches using ccdt config file.
(I have created the .tab file using MO72 and which doesn't require to create the client conn channels physically on the DERBY Qmgr)
On DERBY :
Code: |
C:\>RUNMQSC DERBY
5724-H72 (C) Copyright IBM Corp. 1994, 2009. ALL RIGHTS RESERVED.
Starting MQSC for queue manager DERBY.
DEFINE CHANNEL(AUTOCAD.TODERBY) CHLTYPE(SVRCONN) TRPTYPE(TCP)
1 : DEFINE CHANNEL(AUTOCAD.TODERBY) CHLTYPE(SVRCONN) TRPTYPE(TCP)
AMQ8014: WebSphere MQ channel created.
|
On BELMONT :
Code: |
C:\>RUNMQSC BELMONT
5724-H72 (C) Copyright IBM Corp. 1994, 2009. ALL RIGHTS RESERVED.
Starting MQSC for queue manager BELMONT.
DEFINE CHANNEL(AUTOCAD.TOBELMONT) CHLTYPE(SVRCONN) TRPTYPE(TCP)
1 : DEFINE CHANNEL(AUTOCAD.TOBELMONT) CHLTYPE(SVRCONN) TRPTYPE(TCP)
AMQ8014: WebSphere MQ channel created.
|
FAILOVER .TAB FILE CREATED USING MO72 (which doesn't create the Physical CLNTCONN Channels on DERBY)
Code: |
C:\mo72\Windows>mqsc -n -t AMQXYZ.TAB
Current channel table file not found
Can not find file 'C:\Program Files\IBM\WebSphere MQ\AMQXYZ.TAB'
>DEFINE CHANNEL(AUTOCAD.TODERBY) CHLTYPE(CLNTCONN) TRPTYPE(TCP) CONNAME('LOCALHOST(1416)') QMNAME(DERBY)
AMQ8016: WebSphere MQ channel 'AUTOCAD.TODERBY' defined
>DEFINE CHANNEL(AUTOCAD.TOBELMONT) CHLTYPE(CLNTCONN) TRPTYPE(TCP) CONNAME('LOCALHOST(1417)') QMNAME(DERBY)
AMQ8016: WebSphere MQ channel 'AUTOCAD.TOBELMONT' defined
>END |
and after that did the setup of env. variables.
C:\>SET MQCHLLIB=C:\Program Files\IBM\WebSphere MQ\
C:\>SET MQCHLTAB=AMQXYZ.TAB
NOW when we give following command 'why does't it connect to Primary DERBY Qmgr' and 'why it goes to BELMONT qmgr' even though BOTH The Qmgrs are available & Listener UP.
C:\varun\WMQStuff\mo72\Windows>amqscnxc *DERBY
Sample AMQSCNXC start
Connecting to queue manager *DERBY
with no client connection information specified.
Connection established to queue manager BELMONT
Sample AMQSCNXC end
I/Appl.team wanted to use single command that would work in successful and failover scenario too. (above command works in that situation BUT when both the qmgrs are up & running it goes to BELMONT i.e. secondary server qmgr)
 _________________ *Life will beat you down, you need to decide to fight back or leave it. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Dec 28, 2010 11:19 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
I suspect it goes to Belmont first because "AUTOCAD.TOBELMONT" is alphanumerically sooner than "AUTOCAD.TODERBY", and both have "DERBY" as their QMNAME. |
|
Back to top |
|
 |
|