Вы находитесь на странице: 1из 10

Connecting to a queue manager using MQ Explorer

1. Launch MQ Explorer 2. Right click Queue Managers 3. Click Show/Hide Queue Managers

Note: Do not click New as that will create a queue manager on your PC/laptop 4. click Add 5. Enter the queue manager name

6. Click Next 7. Enter the server name or IP address of server on which MQ is running. Enter port number if the default is not correct. Accept the default server connection channel unless directed otherwise.

8. Click Finish 9. MQ Explorer will now attempt to connect to the queue manager. If the connection fails, check: a. The queue manager name if this is incorrect, you will have to delete and start over b. The host name, port number and server-connection channel name. c. That the queue manager has been started and that the queue manager listener is running.

Adding a new local queue using MQ Explorer


1. Launch MQ Explorer 2. Right click on the queue manager name and select Connect 3. Highlight Queues, select New then select Local Queue

4. Enter the queue name ALL CAPS

Note Enter the queue name with care. If it is entered incorrectly, the queue must be deleted and re-added 5. Click Next 6. Enter the description and change the value of the Persistence property to Persistent

7. Optionally, click on the Extended tab and change the value of the Max.queue Depth property if the default value of 5,000 is not acceptable.

8. Optionally, if the queue is a member of a cluster, click on the Cluster tab, click the radio button Shared in cluster and enter the name of the cluster.

9. Click OK

Sun/AIX/zLinux MQ Start/Stop Script


The start/stop script performs the following functions: 1. Lists all queue managers on the server and the associated port number 2. Shows the status of all the queue managers on the server 3. Starts a queue manager 4. Stops a queue manager The start/stop script file is /etc/init.d/mqm. It must be followed by one or two options. The first option is required. The second option is optional. The first option (required) specifies the verb or action to be taken: The second option, if included, is the queue manager. The possible commands are: Command Meaning /etc/init.d/mqm Invalid returns a list of verbs /etc/init.d/mqm list Lists the queue managers on the Server and the associated port number /etc/init.d/mqm status Displays the status of all queue manages on the server, the listener, etc. /etc/init.d/mqm start Start all queue manages on the server and associated listener for each queue manager /etc/init.d/mqm start qmgr Start the named queue manager and its listener /etc/init.d/mqm stop Stop all queue manages on the server and associated listener for each queue manager /etc/init.d/mqm stop qmgr Stop the named queue manager and its listener Samples comments in red Unix input or output in black You must become root
bash-3.00$ sesu Please enter your password: Sun Microsystems Inc. SunOS 5.10 You have new mail. Generic January 2005

root@epsun390# /etc/init.d/mqm usage: mqm start|stop|status

If an option is not entered

root@epsun390# /etc/init.d/mqm list list Queue queue name queue name queue name queue name queue name queue name

List option displays the queue managers on the server and the associated port number
Managers defined in the QM list = SVMQS106 - port = 1414 = SVMQT106 - port = 1415 = SVMQI106 - port = 1416 = SVMQY106 - port = 1417 = SVMQU106 - port = 1418 = SVMQV106 - port = 1419

queue name = SVMQX106

- port = 1420

Status option displays (1) the MQ version number, the status of all queue managers on the server; (2) the status of the server connection channels; and, (3) the active listeners and the port number being used. The most two important things to check: Status of the queue manager and (2) make sure there is a listener task for the queue manager.
root@epsun390# /etc/init.d/mqm status
MQ version information ... Name: WebSphere MQ Version: 6.0.2.1 CMVC level: p600-201-070307 BuildType: IKAP - (Production) status of MQ manager(s) ... QMNAME(SVMQS106) QMNAME(SVMQT106) QMNAME(SVMQI106) QMNAME(SVMQY106) QMNAME(SVMQU106) QMNAME(SVMQV106) QMNAME(SVMQX106) status of MQ svrconn channel(s) ... queue name = SVMQS106 - port = 1414 status of MQ svrconn channel for SVMQS106 ... WebSphere MQ Command Server Status . . : Running SVMQS106: WebSphere MQ Command Server Status queue name = SVMQT106 - port = 1415 status of MQ svrconn channel for SVMQT106 ... WebSphere MQ Command Server Status . . : Running SVMQT106: WebSphere MQ Command Server Status queue name = SVMQI106 - port = 1416 status of MQ svrconn channel for SVMQI106 ... WebSphere MQ Command Server Status . . : Running SVMQI106: WebSphere MQ Command Server Status queue name = SVMQY106 - port = 1417 status of MQ svrconn channel for SVMQY106 ... WebSphere MQ Command Server Status . . : Running SVMQY106: WebSphere MQ Command Server Status queue name = SVMQU106 - port = 1418 status of MQ svrconn channel for SVMQU106 ... WebSphere MQ Command Server Status . . : Running SVMQU106: WebSphere MQ Command Server Status queue name = SVMQV106 - port = 1419 status of MQ svrconn channel for SVMQV106 ... WebSphere MQ Command Server Status . . : Running SVMQV106: WebSphere MQ Command Server Status queue name = SVMQX106 - port = 1420 status of MQ svrconn channel for SVMQX106 ... WebSphere MQ Command Server Status . . : Running SVMQX106: WebSphere MQ Command Server Status STATUS(Running) STATUS(Running) STATUS(Running) STATUS(Running) STATUS(Running) STATUS(Running) STATUS(Running)

. . :

Running

. . :

Running

. . :

Running

. . :

Running

. . :

Running

. . :

Running

. . :

Running each QMgr) ... SVMQY106 -t TCP SVMQI106 -t TCP SVMQT106 -t TCP SVMQS106 -t TCP SVMQU106 -t TCP SVMQX106 -t TCP SVMQV106 -t TCP -p -p -p -p -p -p -p 1417 1416 1415 1414 1418 1420 1419

status of the listerner (you should see at least one entry for mqm 7805 9855 0 Sep 16 ? 0:02 runmqlsr -m mqm 5655 9855 0 Mar 13 ? 39:28 runmqlsr -m mqm 12709 9855 0 Feb 02 ? 0:16 runmqlsr -m mqm 13185 9855 0 Feb 02 ? 0:53 runmqlsr -m mqm 20794 9855 0 Apr 28 ? 0:07 runmqlsr -m mqm 377 9855 0 09:57:11 pts/12 0:00 runmqlsr -m mqm 7158 9855 0 Sep 25 ? 0:03 runmqlsr -m done with status ...

Stop option ends the execution of the queue manager and the associated listener. If the stop is following by a queue manager name, only take queue manager and listener are stopped; otherwise all queue managers/listeners on the server are stopped. It is strongly recommended that you explicitly include the queue manager name after the stop.
root@epsun390# /etc/init.d/mqm stop SVMQX106 Stopping MQ Series Queue Manager SVMQX106 Stopping MQ Series Listener on SVMQX106

Start option starts the execution of the queue manager and the associated listener. If the start is following by a queue manager name, only take queue manager and listener are started; otherwise all queue managers/listeners on the server are started. It is strongly recommended that you explicitly include the queue manager name after the start.
root@epsun390# /etc/init.d/mqm start SVMQX106 using queue name = SVMQX106 - port = 1420 Starting MQ Series Queue Manager SVMQX106 Starting MQ Series Listener for SVMQX106 on port 1420 Starting MQ Server Connection on SVMQX106

N.B. After starting a queue manager, you should always check the status (/etc/init.d/mqm status) to make sure the queue manager, listener, etc. are running If the status does not show RUNNING, view the script log file (/opt/apps/scripts/prod/mqm/qmgr.<queue manager name>). Typically, it will list a pid or two that are left over from a previous execution. Kill the listed pid or pids (kill 9), run the stop and then retry the start. You make have to repeat this process a couple of times. In order to save money on license fees, multiple queue manages are sometimes defined on non-production servers. If a server is rebooted, the start script is automatically executed. Occasionally, starting multiple queue managers in rapid succession causes issues with the listeners. If you get a call on a non-production server and discover the server was just rebooted (use uptime), stop all the queue managers, check the status to make sure they are all stopped and then start all the queue managers one at a time.

Windows MQ Start/Stop Script


On a Windows server, log into the server on use MQ Explorer start and stop queue managers. Typically, starting MQ or a queue manager after a server reboot is not required. Our standard is for MQ to automatically start and for any queue manager and associated listener on the server to automatically start. To manually stop or start a queue manager and its associated listener, use MQ Explorer on that server. To manually stop or start MQ, Start Settings Control Panel - Administrative Tools Services. The service name is IBM MQ Series.

Trouble Shooting
Below are recommended steps to follow. These are the steps I follow based on experience. Check the status of the queue manager via MQ Explorer on your desktop If you can connect to the queue manager, it is running and the listener is working. Check the queues o If the call concern a specific queue or queues, check the last get and put times (highlight queue name, right click and select status). If the last put time is not close to the current time or the time the caller thinks the message was created, the message creation process is likely the culprit. If the last get time is not close to the current time or the the time the caller thinks it was read, the message getting process is likely the culprit. If the getting process in WLI, check the MQ EG. o Sort (descending) on current queue depth and compare the current depth to the maximum queue depth. If they are equal, increase the max. queue depth. Check the status of the channels o A status shows either RUNNING or INACTIVE is normal. o A status of RETRY or RETRYING means this queue manager cannot connect to the other queue manager. Possible causes are: A network issue or the server is down cant ping the server and cant telnet to the server MQ on the other server is down can ping the server or can telnet to the server but cant connect using MQ Explorer check the status and, if not running, restart The listener on the other server is not started ... can ping the server or can telnet to the server but cant connect using MQ Explorer check the status and, if not running, restart Note If the call comes in during typically block times (e.g., late Saturday to early Sunday), check if the other server is involved in a scheduled outage. Check MQ return codes most common ones are: 2019 is a bad handle this is almost always a programming issue and is typically resolved by restarting the application. It can sometimes be caused by a network issue. Restart the application after the network issue is resolved. 2085 is an unknown object almost always caused by the programmer using the wrong or misspelled queue manager name or queue name. If you get an error not covered above, you can: o Look it up in the errors and codes manual

o Open a command Window on your desktop. At the prompt, type mqrc xxxx where xxxx is the 4-digit error code and then press the enter key. o Search the web for MQ xxxx where xxxx is the 4-digit error code. Check disk usage Running out of disk space is almost always fatal for MQ. df k -- Check everything but pay particular attention to /var/mqm, /opt/mqm Check the MQ error file
cd /var/mqm/errors cat AMQERR01.LOG or tail -1000 AMQERR01.LOG

look for entries near the end of the file with a date/time stamp near the time of the trouble ls lrt *.FDC If there are any files with a date/time stamp close to the error, look at the first 35 or so lines (view or head -40). This will give you information about the error. Note if you open a trouble ticket with IBM, be sure to include the AMQERR01.file and *.FDC files near the time of the trouble Check the queue manager error file
cd /var/mqm/qmgrs/<queue manager>/errors cat AMQERR01.LOG or tail -1000 AMQERR01.LOG

look for entries near the end of the file with a date/time stamp near the time of the trouble Note there are a lot of information messages that appear in this log so you will have to look for unusual messages. Only experience will tell you what unusually is. Note - Note if you open a trouble ticket with IBM, be sure to include the AMQERR01.file for this directory as well.

Вам также может понравиться