MQ Training

Embed Size (px)

Citation preview

  • 7/30/2019 MQ Training

    1/10

  • 7/30/2019 MQ Training

    2/10

    Connecting to a queue manager using MQ Explorer

    1. Launch MQ Explorer2. Right click Queue Managers3. Click Show/Hide Queue Managers

    Note: Do not click New as that will create a queue manager on your PC/laptop

    4. click Add5. Enter the queue manager name

    6. Click Next7. 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 Finish9. 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 deleteand 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.

  • 7/30/2019 MQ Training

    3/10

    Adding a new local queue using MQ Explorer

    1. Launch MQ Explorer2. Right click on the queue manager name and select Connect3. Highlight Queues, select New then select Local Queue

    4. Enter the queue name ALL CAPS

    NoteEnter the queue name with care. If it is entered incorrectly, the queue

    must be deleted and re-added

    5. Click Next6. Enter the description and change the value of the Persistence property to

    Persistent

  • 7/30/2019 MQ Training

    4/10

    7. Optionally, click on the Extended tab and change the value of the Max.queueDepth 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, clickthe radio button Shared in cluster and enter the name of the cluster.

    9. Click OK

  • 7/30/2019 MQ Training

    5/10

    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 number2. Shows the status of all the queue managers on the server3. Starts a queue manager4. 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 theassociated port number

    /etc/init.d/mqm status Displays the status of all queue manages on theserver, the listener, etc.

    /etc/init.d/mqm start Start all queue manages on the server andassociated 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 rootbash-3.00$ sesu -Please enter your password:Sun Microsystems Inc. SunOS 5.10 Generic January 2005You have new mail.

    If an option is not enteredroot@epsun390# /etc/init.d/mqmusage: mqm start|stop|status

    List option displays the queue managers on the server and the associated port numberroot@epsun390# /etc/init.d/mqm list

    list Queue Managers defined in the QM listqueue name = SVMQS106 - port = 1414queue name = SVMQT106 - port = 1415queue name = SVMQI106 - port = 1416queue name = SVMQY106 - port = 1417queue name = SVMQU106 - port = 1418queue name = SVMQV106 - port = 1419

  • 7/30/2019 MQ Training

    6/10

    queue name = SVMQX106 - port = 1420

    Status option displays (1) the MQ version number, the status of all queue managerson 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 MQVersion: 6.0.2.1CMVC level: p600-201-070307BuildType: IKAP - (Production)

    status of MQ manager(s) ...QMNAME(SVMQS106) STATUS(Running)QMNAME(SVMQT106) STATUS(Running)QMNAME(SVMQI106) STATUS(Running)QMNAME(SVMQY106) STATUS(Running)QMNAME(SVMQU106) STATUS(Running)

    QMNAME(SVMQV106) STATUS(Running)QMNAME(SVMQX106) STATUS(Running)

    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 . . : Runningqueue name = SVMQT106 - port = 1415

    status of MQ svrconn channel for SVMQT106 ...WebSphere MQ Command Server Status . . : Running

    SVMQT106: WebSphere MQ Command Server Status . . : Runningqueue name = SVMQI106 - port = 1416

    status of MQ svrconn channel for SVMQI106 ...WebSphere MQ Command Server Status . . : Running

    SVMQI106: WebSphere MQ Command Server Status . . : Running

    queue name = SVMQY106 - port = 1417

    status of MQ svrconn channel for SVMQY106 ...WebSphere MQ Command Server Status . . : Running

    SVMQY106: WebSphere MQ Command Server Status . . : Runningqueue name = SVMQU106 - port = 1418

    status of MQ svrconn channel for SVMQU106 ...WebSphere MQ Command Server Status . . : Running

    SVMQU106: WebSphere MQ Command Server Status . . : Runningqueue name = SVMQV106 - port = 1419

    status of MQ svrconn channel for SVMQV106 ...WebSphere MQ Command Server Status . . : Running

    SVMQV106: WebSphere MQ Command Server Status . . : Runningqueue name = SVMQX106 - port = 1420

    status of MQ svrconn channel for SVMQX106 ...WebSphere MQ Command Server Status . . : Running

    SVMQX106: WebSphere MQ Command Server Status . . : Running

    status of the listerner (you should see at least one entry for each QMgr) ...mqm 7805 9855 0 Sep 16 ? 0:02 runmqlsr -m SVMQY106 -t TCP -p 1417mqm 5655 9855 0 Mar 13 ? 39:28 runmqlsr -m SVMQI106 -t TCP -p 1416mqm 12709 9855 0 Feb 02 ? 0:16 runmqlsr -m SVMQT106 -t TCP -p 1415mqm 13185 9855 0 Feb 02 ? 0:53 runmqlsr -m SVMQS106 -t TCP -p 1414mqm 20794 9855 0 Apr 28 ? 0:07 runmqlsr -m SVMQU106 -t TCP -p 1418mqm 377 9855 0 09:57:11 pts/12 0:00 runmqlsr -m SVMQX106 -t TCP -p 1420mqm 7158 9855 0 Sep 25 ? 0:03 runmqlsr -m SVMQV106 -t TCP -p 1419

    done with status ...

  • 7/30/2019 MQ Training

    7/10

    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 stronglyrecommended that you explicitly include the queue manager name afterthe stop.

    root@epsun390# /etc/init.d/mqm stop SVMQX106Stopping MQ Series Queue Manager SVMQX106Stopping 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. Itis stronglyrecommended that you explicitly include the queue manager name after

    the start.root@epsun390# /etc/init.d/mqm start SVMQX106using queue name = SVMQX106 - port = 1420Starting MQ Series Queue Manager SVMQX106Starting MQ Series Listener for SVMQX106 on port 1420Starting 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.). 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 sometimesdefined on non-production servers. If a server is rebooted, the start script isautomatically 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 thequeue managers one at a time.

  • 7/30/2019 MQ Training

    8/10

    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, StartSettingsControl Panel - Administrative ToolsServices. The service name is IBM MQ Series.

  • 7/30/2019 MQ Training

    9/10

    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 isworking.

    Check the queues

    o If the call concern a specific queue or queues, check the last get andput times (highlight queue name, right click and select status).

    If the last put time is not close to the current time or the timethe 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 processis 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 themax. queue depth.

    Check the status of the channelso 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 NoteIf 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:2019is a bad handlethis 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.

    2085is an unknown objectalmost always caused by the programmerusing 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

  • 7/30/2019 MQ Training

    10/10

    o Open a command Window on your desktop. At the prompt, typemqrc 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 usageRunning 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 filecd /var/mqm/errors

    cat AMQERR01.LOG ortail -1000 AMQERR01.LOG look for entries nearthe end of the file with a date/time stamp near the time of the trouble

    lslrt *.FDC

    If there are any files with a date/time stamp close to the error, look at the first35 or so lines (view orhead -40). This will give you information about the

    error.Noteif you open a trouble ticket with IBM, be sure to include theAMQERR01.file and *.FDC files near the time of the trouble

    Check the queue manager error filecd /var/mqm/qmgrs//errors

    cat AMQERR01.LOG ortail -1000 AMQERR01.LOG look for entries nearthe end of the file with a date/time stamp near the time of the trouble

    Notethere are a lot of information messages that appear in this log so youwill have to look for unusual messages. Only experience will tell you what

    unusually is.

    Note - Noteif you open a trouble ticket with IBM, be sure to include theAMQERR01.file for this directory as well.