ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » endmqm & strmqm functionality

Post new topic  Reply to topic Goto page Previous  1, 2, 3, 4  Next
 endmqm & strmqm functionality « View previous topic :: View next topic » 
Author Message
bruce2359
PostPosted: Fri Apr 10, 2009 7:17 am    Post subject: Reply with quote

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
View user's profile Send private message
Sam Uppu
PostPosted: Fri Apr 10, 2009 7:25 am    Post subject: Reply with quote

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
View user's profile Send private message
PeterPotkay
PostPosted: Fri Apr 10, 2009 7:56 am    Post subject: Reply with quote

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
View user's profile Send private message
bruce2359
PostPosted: Fri Apr 10, 2009 8:33 am    Post subject: Reply with quote

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
View user's profile Send private message
exerk
PostPosted: Fri Apr 10, 2009 3:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
bruce2359
PostPosted: Fri Apr 10, 2009 6:14 pm    Post subject: Reply with quote

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
View user's profile Send private message
PeterPotkay
PostPosted: Sat Apr 11, 2009 4:56 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

PeterPotkay wrote:

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.



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
View user's profile Send private message
bruce2359
PostPosted: Sat Apr 11, 2009 5:37 am    Post subject: Reply with quote

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
View user's profile Send private message
Sam Uppu
PostPosted: Mon Apr 13, 2009 5:40 am    Post subject: Reply with quote

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
View user's profile Send private message
crossland
PostPosted: Thu Nov 24, 2011 7:14 am    Post subject: Reply with quote

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
View user's profile Send private message
exerk
PostPosted: Thu Nov 24, 2011 7:20 am    Post subject: Reply with quote

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
View user's profile Send private message
crossland
PostPosted: Thu Nov 24, 2011 7:33 am    Post subject: Reply with quote

Master

Joined: 26 Jun 2001
Posts: 248

If only it was on Unix!

The problem with the equivalent procedure on Windows is determining which processes belong to which queue manager:

http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=%2Fcom.ibm.mq.amqzag.doc%2Ffa22300_.htm
Back to top
View user's profile Send private message
crossland
PostPosted: Thu Nov 24, 2011 8:13 am    Post subject: Reply with quote

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
View user's profile Send private message
exerk
PostPosted: Thu Nov 24, 2011 8:19 am    Post subject: Reply with quote

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
View user's profile Send private message
crossland
PostPosted: Thu Nov 24, 2011 8:30 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2, 3, 4  Next Page 3 of 4

MQSeries.net Forum Index » General IBM MQ Support » endmqm & strmqm functionality
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.