?
Solved

stop/start mq environment

Posted on 2009-05-10
7
Medium Priority
?
5,329 Views
Last Modified: 2013-12-11
what are the best practices to stop/start mq environment.
what needs to be stopped/started first - QM, channel or listener or anything else ?
what happens to messages that are in flight during stop process?
please provide the answer for both clustered and none-clustered environments.
thanks
0
Comment
Question by:wasadmin770
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
7 Comments
 
LVL 41

Expert Comment

by:HonorGod
ID: 24356195
Q: What are the best practices to for stopping/starting an MQ environment?
A: 1. Stop all WebSphere Application Server application on the machine(s) and any applications accessing remote resources.
    2. End all MQ activity:
        - Log in as a user authorized in the mqm group
        - Use the dspmq command to display the state of all the queue managers on the system.
        - Use the endmqm command to stop all running queue managers.
        - Stop any listeners associated with the queue managers, using the command:
           * Use "endmqlsr -m QMgrName"
           * To check that you have stopped all necessary WebSphere MQ activity, type:
             => ps -ef | grep mq
           * Check that there are no processes listed that are running command lines beginning amq or runmq. Ignore any that start with amqi.

I'm pretty sure that the stopping order is documented here:
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/index.jsp?topic=/com.ibm.mq.amq1ac.doc/lq10880_.htm

For starting, use the reverse process.  i.e., start MQ, and then WebSphere and other applications

Start command: strmqm QMgrName

It is strongly encouraged to use the MQ Listeners as objects inside the QMgr (this was introduced in V6)

Here is the WebSphere MQ V6 Fundamentals document
http://www.redbooks.ibm.com/abstracts/SG247128.html?Open

See page 269.
1. Create a listener that is started and stopped automatically with the queue
manager by issuing the following MQSC command against host1/echo.hub:
DEFINE LISTENER('LISTENER.TCP') +
TRPTYPE(TCP) PORT(9001) CONTROL(QMGR) +
DESCR('TCP/IP Listener for queue manager')
2. Start the listener using the following MQSC command:
START LISTENER('LISTENER.TCP')

For MQ clustered environments, first stop the Partial repositories, then the Full ones.

Q: What about inflight messages?
A: If the queue manager is asked "nicely" to stop while there are inflight transactions, then the queue manager will NOT stop until the transaction is rolled back or committed.
However if the queue manager is FORCED to stop, then the inflight transactions will be rolled back and this information will be in the MQ recovery logs.

Depending on how the queue manager was forced to stop, then during the restart, the queue manager will try to recover from the recovery logs. It will not begin the transaction that was rolled back.

Hopefully this helps.
0
 

Author Comment

by:wasadmin770
ID: 24366870
please elaborate more on what you mean by "if the queue manager is asked "nicely" to stop" and
"if the queue manager is FORCED to stop". which commands you meant?
also what about stopping/starting channels?
thanks
0
 
LVL 41

Expert Comment

by:HonorGod
ID: 24366939
A"nice" stop is one where the queue manager is given time to deal with the pending operations.

A "hard" or "forced" stop basically says "stop, right now!  I don't care what you are in the middle of, just stop it!".

ok?
0
Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

 

Author Comment

by:wasadmin770
ID: 24370873

i understand the differerence. the question was - what is the actuall syntax for these 2
approaches.
also do i need to stop/start channels as well?
thanks
0
 
LVL 41

Expert Comment

by:HonorGod
ID: 24371215
Ah, sorry for the misunderstanding... I'll have to check on that tomorrow, and get back to you.
0
 
LVL 41

Accepted Solution

by:
HonorGod earned 2000 total points
ID: 24373372
To stop a QueueManager, use the endmqm command.

http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.amqzag.doc/fa15800_.htm

The text from which states:

Syntax:

endmqm [option] QueueName

Options:
  -c = controlled (default)
         This is the "nice" version of the stop.  The queue manager is stopped only after all applications have disconnected.

  -w = wait
         This is another "nice" shutdown.  Control is returned only after the queue manager is stopped.

  -i = immediate
        The queue manager stops after it has completed all the MQI calls currently being processed. Any MQI requests issued after the command has been issued fail. Any incomplete units of work are rolled back when the queue manager is next started.

  -p = preemptive
         Warning: 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.

The effect on any client applications connected through a server-connection channel is equivalent to a STOP CHANNEL command issued in TERMINATE mode.
0
 
LVL 41

Expert Comment

by:HonorGod
ID: 24380287
Thanks for the grade & points

Good luck & have a great day
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This article was originally published on Monitis Blog, you can check it here . If you have responsibility for software in production, I bet you’d like to know more about it. I don’t mean that you’d like an extra peek into the bowels of the sourc…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question