Author |
Message
|
bruce2359 |
Posted: Fri Apr 10, 2009 7:17 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
gmo.waitInterval = MQC.MQWI_UNLIMITED;
wait unlimited is a no-no. Why? Because endmqm or endmqm -c will allow all currently connected applications to execute until they disconnect. i- option allows all current mqi calls to complete, but no new ones. -p preemptively abends all current calls.
Wait unlimited never ends; thus the application never ends, and you must use the -p options to terminate the qmgr. This is a worst-practice, and well-documented in the APG and APR manuals.
Code samples? Can you post the actual code from the offending program? _________________ 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.
Last edited by bruce2359 on Fri Apr 10, 2009 7:28 am; edited 2 times in total |
|
Back to top |
|
 |
Sam Uppu |
Posted: Fri Apr 10, 2009 7:25 am Post subject: |
|
|
 Yatiri
Joined: 11 Nov 2008 Posts: 610
|
bruce2359 wrote: |
gmo.waitInterval = MQC.MQWI_UNLIMITED;
wait unlimited is a no-no.
Code samples? Can you post the actual code from the offending program? |
I sent an email request. I will let you know guys once they get back to me with the code.
Thanks. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Fri Apr 10, 2009 7:56 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
bruce2359 wrote: |
gmo.waitInterval = MQC.MQWI_UNLIMITED;
wait unlimited is a no-no. Why? Because endmqm or endmqm -c will allow all currently connected applications to execute until they disconnect. i- option allows all current mqi calls to complete, but no new ones. -p preemptively abends all current calls.
Wait unlimited never ends; thus the application never ends, and you must use the -p options to terminate the qmgr. This is a worst-practice, and well-documented in the APG and APR manuals.
|
http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzak.doc/js00862.htm
As long as MQGMO_FAIL_IF_QUIESCING was coded, you don't need to use endmqm -p to cause that never ending get with wait to end. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
bruce2359 |
Posted: Fri Apr 10, 2009 8:33 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
I can hardly wait to see the actual source-code.
I'm sure it will find its way into my collection of How-Not-To's. _________________ 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 |
|
 |
exerk |
Posted: Fri Apr 10, 2009 3:56 pm Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
I was under the impression, and more than happy to be corrected, that a -i would break out a gmo.waitInterval=MQC.MQWI_UNLIMITED. I've always thought that a -p was a sledge hammer to crack a nut, unless there was absolutely no other way - except a reboot  _________________ 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 |
|
 |
bruce2359 |
Posted: Fri Apr 10, 2009 6:14 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
From the WMQ System Admin manual:
-p Preemptive shutdown. Use this type of shutdown only in exceptional circumstances. For example, when a queue manager does not stop as a result of a normal endmqm command. The queue manager might stop without waiting for applications to disconnect or for MQI calls to complete. This can give unpredictable results for WebSphere MQ applications. The shutdown mode is set to immediate shutdown. If the queue manager has not stopped after a few seconds, the shutdown mode is escalated, and all remaining queue manager processes are stopped.
So, maybe. _________________ 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 |
|
 |
PeterPotkay |
Posted: Sat Apr 11, 2009 4:56 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
endmqm
endmqm -c
endmqm -w
endmqm -i
endmqm -p
Should all cause the Get With Wait to be cancelled immediatly IF the MQGMO_FAIL_IF_QUIESCING option was coded. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
bruce2359 |
Posted: Sat Apr 11, 2009 5:37 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
IF the MQGMO_FAIL_IF_QUIESCING was coded ...
All those that think that it was not coded, raise your hands... _________________ 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 |
|
 |
Sam Uppu |
Posted: Mon Apr 13, 2009 5:40 am Post subject: |
|
|
 Yatiri
Joined: 11 Nov 2008 Posts: 610
|
Hi Guys,
Here is the code snippet what everybody is looking for:
The queue is opened with these options:
openOptions = MQC.MQOO_INPUT_AS_Q_DEF | MQC.MQOO_FAIL_IF_QUIESCING | MQC.MQOO_INQUIRE ;
and the only get message option is MQGMO_WAIT:
MQGetMessageOptions getMsgOptions = new MQGetMessageOptions();
getMsgOptions.options = getMsgOptions.options | MQC.MQGMO_WAIT;
getMsgOptions.waitInterval = 1000;
As you guys were pointing, the app is not providing MQGMO_FAIL_IF_QUIESCING in the gmo.options.
I will ask them to include this in gmo.options and try.
You guys are wonderful.
Thanks everybody.
I appreciate your help in this regard. |
|
Back to top |
|
 |
crossland |
Posted: Thu Nov 24, 2011 7:14 am Post subject: |
|
|
Master
Joined: 26 Jun 2001 Posts: 248
|
Anybody seen 'endmqm -p' fail before?
After issuing, 'endmqm -p', the queue manager is stuck in 'Ending immediately' status and will not restart (and yes, the -p was issued as a last resort).
Looking at the Event Viewer, there are errors connecting to a remote host (which COULD be from another queue manager as there are multiple queue managers on the server).
This is on Windows, with MQ 6.0.2.3.
Any helpful suggestions very welcome! |
|
Back to top |
|
 |
exerk |
Posted: Thu Nov 24, 2011 7:20 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
crossland wrote: |
Anybody seen 'endmqm -p' fail before?
.
.
.
Any helpful suggestions very welcome! |
Yes, and killing the processes in the order stated in the manual HERE was used, followed by a reboot of the server. _________________ 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 |
|
 |
crossland |
Posted: Thu Nov 24, 2011 7:33 am Post subject: |
|
|
Master
Joined: 26 Jun 2001 Posts: 248
|
|
Back to top |
|
 |
crossland |
Posted: Thu Nov 24, 2011 8:13 am Post subject: |
|
|
Master
Joined: 26 Jun 2001 Posts: 248
|
In case anyone else hit the problem of knowing which process belongs to which queue manager on Windows, there is a possible solution here:
http://www.mqseries.net/phpBB2/viewtopic.php?t=48178
The problem is that it involves installing/testing a freeware download, which isn't always possible in a live environment. It would be great if you could see information on process ids by queue manager in a future version of the MQ Explorer ... |
|
Back to top |
|
 |
exerk |
Posted: Thu Nov 24, 2011 8:19 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
crossland wrote: |
It would be great if you could see information on process ids by queue manager in a future version of the MQ Explorer ... |
And if your queue manager is unresponsive? Although I suppose a process of elimination would work. _________________ 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 |
|
 |
crossland |
Posted: Thu Nov 24, 2011 8:30 am Post subject: |
|
|
Master
Joined: 26 Jun 2001 Posts: 248
|
exerk wrote: |
crossland wrote: |
It would be great if you could see information on process ids by queue manager in a future version of the MQ Explorer ... |
And if your queue manager is unresponsive? Although I suppose a process of elimination would work. |
Indeed - it would be great to see potentially useful information provided by a freeware download available in MQ Explorer. |
|
Back to top |
|
 |
|