Saturday, February 10, 2018

Cold Restart of Websphere MQ Qmgr


Determine how the queue manager logs were deleted, and take the necessary steps to be certain that it does not reoccur.

After encountering this problem you have two options:

I. Use MS03 SupportPac to save you WebSphere® MQ object definitions and rebuild the queue manager (delete and redefine the queue manager).

II. Recreate queue manager's logs using a 'cold start' procedure as shown below:

The following steps are required to cold start MQ on Linux: 

1. Log in as someone in the 'mqm' group. 

2. Record the logging parameters of the failing queue manager by checking '/var/mqm/qmgrs/OLDQMGR/qm.ini'. These parameters include the type, number, and size of the log files.

If the corrupted QMGR logs looks like below:

   LogPrimaryFiles=2           -lp
   LogSecondaryFiles=1        -ls
   LogFilePages=16384          -lf
   LogType=LINEAR             -ll

3. Create a queue manager called 'TEMP' with identical logging parameters. For example, 'crtmqm -lc -lp 2 -ls 1 -ld /tmp/log -lf 16384 TEMP' will create a new queue manager with the default size and number of circular logs in directory /tmp/log.

This might take little time. Note: DON'T START the dummy qmgr once it is done.

4. Ensure the new TEMP logs are created 'ls -l /tmp/log'.

5. Back up /var/mqm/log/OLDQMGR and then remove the logs from /var/mqm/log/OLDQMGR/active/

6. Type 'cp /tmp/log/TEMP/active/* /var/mqm/log/OLDQMGR/active/.'.

7. Copy the 'amqhlctl.lfh' checkpoint file from the new to the old queue manager.

8. Type 'dltmqm TEMP' to remove the new queue manager.

9. Type 'strmqm OLDQMGR' to restart your original queue manager.

 Since the logs been replaced, We lost all information to commit or backout messages but all persistent messages are still in the queues (you don't lose persistent messages).


Steps required to cold restart MQ qmgr:

Cold restart is required to replace corrupted logs of a qmgr . 

Step 1:


Delete all current queue manager logs from /var/mqm/log.
mqm@instance-1:~/log/CLOUD2$ pwd
/var/mqm/log/CLOUD2
mqm@instance-1:~/log/CLOUD2$ rm -rf *
mqm@instance-1:~/log/CLOUD2$ ls -ltr
total 0

mqm@instance-1:~/log/CLOUD2$

Step 2: 

Create a dummy queue manager with same properties as actual qmgr and don't start the qmgr after creating it .

crtmqm -ll CLOUD3

Step 3:

Move amqhlctl.lfh and directory(active) to old qmgr.

  mqm@instance-1:~/log/CLOUD3$ mv amqhlctl.lfh ../CLOUD2/
mqm@instance-1:~/log/CLOUD3$ mv * ../CLOUD2/
mqm@instance-1:~/log/CLOUD3$ ls -ltr
total 0
mqm@instance-1:~/log/CLOUD2$ ls -ltr
total 12
drwxrws--- 2 mqm mqm 4096 May  8 17:17 active
-rw-rw---- 1 mqm mqm 6256 May  8 17:17 amqhlctl.lfh
mqm@instance-1:~/log/CLOUD2$ 

Step 4:

Restart qmgr.

strmqm CLOUD2
IBM MQ queue manager 'CLOUD2' starting.
The queue manager is associated with installation 'Installation1'.
11 log records accessed on queue manager 'CLOUD2' during the log replay phase.
Log replay for queue manager 'CLOUD2' complete.
Transaction manager state recovered for queue manager 'CLOUD2'.
IBM MQ queue manager 'CLOUD2' started using V9.0.0.0.

Step 5:

Delete dummy qmgr.

dltmqm CLOUD3
AMQ7064: Log path not valid or inaccessible.

As we have replaced logs all information to commit or backout messages but all persistent messages are will be in queues only .



1 comment:

  1. Middleware Techno Guide...: Cold Restart Of Websphere Mq Qmgr >>>>> Download Now

    >>>>> Download Full

    Middleware Techno Guide...: Cold Restart Of Websphere Mq Qmgr >>>>> Download LINK

    >>>>> Download Now

    Middleware Techno Guide...: Cold Restart Of Websphere Mq Qmgr >>>>> Download Full

    >>>>> Download LINK 5U

    ReplyDelete