Author |
Message
|
whytec |
Posted: Tue May 08, 2007 7:55 pm Post subject: Solved: Multiple mqsideploy commands in a batch file |
|
|
 Apprentice
Joined: 28 Nov 2005 Posts: 26 Location: Brisbane Australia
|
Hi All,
I have a need to do multiple deploys in a batch configuration. I have a batch file that contains consecutive calls to the mqsideploy command for each .bar file that I have. All .bar files are being deployed to the same broker. I am using WBIMB5.
The first mqsideploy works ok but the next mqsideploy results in the following error:
Quote: |
"An attempt was made to deploy configuration data to one or more brokers, but the Configuration Manager is already deploying to broker MyBroker. You can not deploy to a set of brokers if there is an earlier deploy outstanding to any broker in the set. The deploy operation was not performed." |
The contents of my batch file are as follows:
Code: |
call mqsideploy -b MyBroker -e MyEG -bar MyBAR1.bar -connection mqsideploy.config
call mqsideploy -b MyBroker -e MyEG -bar MyBAR2.bar -connection mqsideploy.config
call mqsideploy -b MyBroker -e MyEG -bar MyBAR3.bar -connection mqsideploy.config
call mqsideploy -b MyBroker -e MyEG -bar MyBAR4.bar -connection mqsideploy.config |
I know this is due to the same problem in the Toolkit when you try and deploy before receiving a response in the Toolkit's Event Log Editor. My question is, how can I get this to work without having to resort to adding pause commands between each deploy? I need this to be an automatic process, so the pause statements are not an option.
Thanks in advance.
Last edited by whytec on Wed May 09, 2007 9:22 pm; edited 1 time in total |
|
Back to top |
|
 |
Mensch |
Posted: Tue May 08, 2007 8:07 pm Post subject: |
|
|
Disciple
Joined: 17 Jul 2005 Posts: 166
|
-c option in mqsideploy command
Quote: |
'-c' tells the Configuration Manager to stop waiting for broker responses to currently outstanding deploy requests, across the domain or on the specified broker. Use this flag with caution; any subsequent responses to cancelled deploys will be ignored by the Configuration Manager, meaning that the status reported by the Configuration Manager may be incorrect. |
_________________ Thanks and Regards ,
Mensch |
|
Back to top |
|
 |
whytec |
Posted: Tue May 08, 2007 9:13 pm Post subject: |
|
|
 Apprentice
Joined: 28 Nov 2005 Posts: 26 Location: Brisbane Australia
|
It Worked!
The command in WBIMB5 is -cancel, and it worked perfectly
Just so everyone else knows, the following code before each call to mqsideploy is what did the trick.
Code: |
call mqsideploy -cancel -connection mqsideploy.config |
Thankyou very much Mensch  |
|
Back to top |
|
 |
Mensch |
Posted: Tue May 08, 2007 11:39 pm Post subject: |
|
|
Disciple
Joined: 17 Jul 2005 Posts: 166
|
m glad that you got it worked
Please mark the topic as solved _________________ Thanks and Regards ,
Mensch |
|
Back to top |
|
 |
mqmatt |
Posted: Wed May 09, 2007 2:46 am Post subject: |
|
|
 Grand Master
Joined: 04 Aug 2004 Posts: 1213 Location: Hursley, UK
|
NO NO NO!! This will not work!!!
The cancel option will simply cause the Config Manager to stop waiting for responses to a deployment request and to ignore any subsequent responses to that request. So while using this option will cause deployment to work for the broker, you will then have a timing window that could cause the Config Manager to go out of sync with the broker. This means that the Config Manager (and hence the toolkit) will not correctly report what you have deployed.
Being able to queue up multiple deployment requests though mqsideploy was only added in Message Broker V6. In Message Broker V5, you should put suitable pauses between the deploy requests in the batch file... Or migrate to v6.
-Matt |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed May 09, 2007 3:34 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Yeah.
NEVER cancel a deploy, unless you *absolutely* have to AND you know that the deploy is NOT going to complete - like the broker in question has been deleted. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Mensch |
Posted: Wed May 09, 2007 4:11 am Post subject: |
|
|
Disciple
Joined: 17 Jul 2005 Posts: 166
|
Quote: |
Posted: Wed May 09, 2007 2:46 am Post subject:
--------------------------------------------------------------------------------
NO NO NO!! This will not work!!!
The cancel option will simply cause the Config Manager to stop waiting for responses to a deployment request and to ignore any subsequent responses to that request. So while using this option will cause deployment to work for the broker, you will then have a timing window that could cause the Config Manager to go out of sync with the broker. This means that the Config Manager (and hence the toolkit) will not correctly report what you have deployed.
Being able to queue up multiple deployment requests though mqsideploy was only added in Message Broker V6. In Message Broker V5, you should put suitable pauses between the deploy requests in the batch file... Or migrate to v6.
-Matt
|
Hi Matt,
thanks a lot ..You are right..I had no idea about this  _________________ Thanks and Regards ,
Mensch |
|
Back to top |
|
 |
whytec |
Posted: Wed May 09, 2007 5:40 pm Post subject: |
|
|
 Apprentice
Joined: 28 Nov 2005 Posts: 26 Location: Brisbane Australia
|
Thanks for the response guys. Looks like I'm stuck with adding in pauses then. At least I now have some extra ammunition for my crusade to migrate to WMB6 as soon as possible  |
|
Back to top |
|
 |
whytec |
Posted: Wed May 09, 2007 8:51 pm Post subject: |
|
|
 Apprentice
Joined: 28 Nov 2005 Posts: 26 Location: Brisbane Australia
|
After a bit more experimentation I've found that using the -w parameter with a suitably large amount of time, everything works exactly as I wanted.
Code: |
call mqsideploy -b MyBroker -e MyEG -bar MyBAR1.bar -w 600 -connection mqsideploy.config
call mqsideploy -b MyBroker -e MyEG -bar MyBAR2.bar -w 600 -connection mqsideploy.config
call mqsideploy -b MyBroker -e MyEG -bar MyBAR3.bar -w 600 -connection mqsideploy.config
call mqsideploy -b MyBroker -e MyEG -bar MyBAR4.bar -w 600 -connection mqsideploy.config |
|
|
Back to top |
|
 |
|