TIP for IBM MQ HA Setup [ Active-Standby]

In IBM MQ Active-Standby setup is also called as Multi instance MQ setup

Refer below link to see how setup Multi-Instance MQ setup


For IBM HA Set-up we will have min 2 MQ servers where MQ is installed on the server and MQ Data is shared between the server using one of the GPFS ,NFS file systems

Once the setup is ready on one server MQ will be running as RUNNING and on the other server MQ status will be “Running as standby “

on this setup only we should use -x to start the QMGR . on the Active-Passive setup we should not use -x option while starting the QMGR

Switching between active and standby queue managers is controlled by the locks on the following three files:

Master : Held in EXCLUSIVE mode by the MQ Execution Controller (EC) of the active instance.

Active : Held in SHARED mode by all QM processes (excluding those which are just internal applications), plus fastpath applications.

Standby : Held in EXCLUSIVE mode by the EC of a standby instance.

Normally qmstatus.ini is updated by the qmgr automatically, we don’t need to change, as you can see, there’s still file lock issues after editing qmstatus.ini file.

Let say by mistake if the QMGR is started using strmqm QM without -x then standby will not be able to start as running as standby . because on qmstatus.ini file allowStandby will be automatically updated with No .if we change to Yes and start it will start as and show as Running as standby but it will not full fill the failover if primary goes down due to the abnormal lock on master active and standby files in QMGR data

To check the lock on these files use below commands on Linux

lsof <your qmgr data dir>/master
lsof <your qmgr data dir>/standby
lsof <your qmgr data dir>/active

During such scenario you need to stop both the QMGR’s and remove these master ,standby and active files and start QM using strmqm -x MQ

once started successfully display the status using dspmq -x

this will normalise the MQ and you can see where it is Running and Running as Standby

if STANDBY(Not permitted) in the dspmq -x output means look at your start command you might be started without -x options

Hope the TIP helps 🙂

Related Posts

Leave a Reply

Your email address will not be published.