As the broker depends on a queue manager, this queue manager needs to be under MSCS control. In this step, we will configure WebSphere MQ to run with MSCS.
• Before starting, check that the user “wmbadmin” is in the “MQM” user group.
• We will now create a Queue Manager on the first node only. Open the WebSphere MQ Explorer. Right click on the Queue Managers and select “New > Queue Manager”.
Figure 5.19 – Creating an MQ queue manager – Step 1
• Type “BRK01_QM” for the “Queue manager name”. Do not make it the default queue manager. Click “Next”.
Figure 5.20 – Creating an MQ queue manager – Step 2
• In the next screen, accept the default local “Log path” and click “Next”. We will move this data to the shared disk later.
• Check the option to start the queue manager and click “Next”.
Figure 5.22 – Creating an MQ queue manager – Step 4
• Check the option to create a listener for TCP/IP. Note the “Listen on port number” which is 1414 as default.
• In the following screen, to complete the queue manager creation, click “Finish”.
Figure 5.24 – Creating an MQ queue manager – Step 6
• Check that BRK01_QM is listed under “Queue Managers” and is running.
• Right click on BRK01_QM which is listed under “Queue Managers” and select “Stop”.
Figure 5.26 – Stopping the queue manager – Step 1
• Select “Controlled” and click “OK”.
Figure 5.27 – Stopping the queue manager – Step 2
Figure 5.28 – Checking the queue manager’s status
• Right click on BRK01_QM and select “Properties”.
Figure 5.29 – Queue manager properties
Figure 5.30 – Changing queue manager’s startup type
• Change the “Startup” to “Manual” and click “OK”.
It’s now time to play with queue manager data and do some new MSCS configurations for WebSphere MQ.
• Check that the:
o Queue manager files are locally created under:
Figure 5.31 – Queue manager files
o Log files are locally created under:
C:\Program Files\IBM\WebSphere MQ\log\BRK01_QM\
Figure 5.32 – Queue manager log files
• Open the Windows Registry Editor and go to:
o HKEY_LOCAL_MACHINE\SOFTWARE\IBM\MQSeries\CurrentVer sion\Configuration\QueueManager\BRK01_QM\
Hint: To open the Registry editor go to “Start Menu > Run…”, type “regedit” and click “OK”.
• Check that the data for the name “Prefix” is your local path.
Figure 5.33 – Checking the registry
• In the Windows Registry Editor go to:
o HKEY_LOCAL_MACHINE\SOFTWARE\IBM\MQSeries\CurrentVer sion\Configuration\QueueManager\BRK01_QM\Log\
• Check that the data for the name “LogPath” is your local log path.
Figure 5.34 – Checking the registry
• You will need to create a directory in the shared disk. Open a Windows Command Prompt and run:
• In the Windows Command Prompt, run the following command to move your queue manager (BRK01_QM) data and logs onto shared “Disk E:”:
o hamvmqm /m BRK01_QM /dd E:\MQDATA /ld E:\MQDATA
Figure 5.35 – Move MQ data to the shared disk
• Check that the:
o Queue manager files are now located in:
E:\MQDATA\Qmgrs\BRK01_QM
o Log files are now located in:
E:\MQDATA\BRK01_QM
Figure 5.36 – Checking moved files
• Open the Windows Registry Editor and go to:
o HKEY_LOCAL_MACHINE\SOFTWARE\IBM\MQSeries\CurrentVer sion\Configuration\QueueManager\BRK01_QM\
Figure 5.37 – Checking the registry
• In the Windows Registry Editor go to:
o HKEY_LOCAL_MACHINE\SOFTWARE\IBM\MQSeries\CurrentVer sion\Configuration\QueueManager\BRK01_QM\Log\
• Check that the data for the name “LogPath” is now “E:\MQDATA\BRK01_QM”.
Figure 5.38 – Checking the registry
• As we moved the queue manager data and logs to a shared disk. We need to check that the queue manager is still running. Open a “WebSphere MQ Explorer”. Right click on “BRK01_QM” under “Queue Managers”” and select “Start”.
Figure 5.39 – Checking the queue manager
• Check that the queue manager BRK01_QM is started successfully.
Figure 5.39 – Queue manager running
• Right click on “BRK01_QM” under “Queue Managers”” and select “Stop”. In the following dialog, click “OK” to end the queue manager.
• Now, we have to define first the WebSphere MQ MSCS resource for the cluster. On both nodes, open a Windows Command Prompt and run:
o haregtype /r
Figure 5.40 – Defining MQ MSCS resource type
• Reboot both nodes to avoid the problem: "Event id 5079: An error occurred attempting to read properties for the 'IBM MQSeries MSCS' resource", or a reported error 126 (0000007e)”.
• Open the Windows Cluster Administrator again, expand your cluster tree and under “Cluster Configuration” find “Resource Types”. Check that “IBM MQSeries MSCS” is added.
Figure 5.41 – Defining MQ MSCS resource type
• We need to add our queue manager to our MSCS group as a resource. Right click on “WMB Group” and select “New > Resource”.
Figure 5.42 – Adding the queue manager as a resource
• Type “WMB BRK01_QM” for the “Name” of the resource. Select “IBM MQSeries MSCS” as the “Resource Type” and “WMB Group” as the “Group”. Check the “Run this resource in a separate Resource Monitor” option. Click “Next”.
Figure 5.43 – Adding the queue manager as a resource
• In the Possible Owners window, add all nodes in the cluster as the owners. Click “Next”.
• Add “Disk E:” and “WMB IP Address” to the “Resource dependencies” and click “Next”. With this configuration, the queue manager will not be online until the IP Address and the shared disk holding MQ data are online.
Figure 5.44 – Adding dependencies
• Type “BRK01_QM1” into the “QueueManagerName” field and click “Finish”.
Figure 5.45 – Configuring the queue manager
• Check that the “WMB BRK01_QM1 resource is added successfully and is offline.
Figure 5.46 – Resource is added and is offline
• Open Windows Services and find “IBM MQSeries”. Right click and select “Properties”. Change the startup type to “Manual” and click “OK”.
Figure 5.47 – Changing startup type for the MQSeries service
• In the Cluster Administrator right click “WMB BRK01_QM” resource under “WMB Group” and select “Bring Online”.
Warnings:
• If the resource fails while bringing it online, restart both nodes and try again.
• If you encounter any authorization errors while starting the resource, run following command on both nodes to set the queue manager admin authority:
o C:\Program Files\IBM\WebSphere MQ\bin\amqmsrvn –user your.domain.com\wmbadmin –password password
Figure 5.48 – All resources are online
Its now time to test the cluster software configuration for the high availability of WebSphere MQ!
• Right click on the “WMB Group” and select “Move Group”. With this action we are simulating a failure in the first node.
• Check that all resources are online on the second node. MSCS detected the failure and moved all resources to the second and brought them online.
Figure 5.49 – All resources are online on the second node
• Right click on the “WMB Group” and select “Move Group”.
• Check that all resources are online on the first node again.
Figure 5.50 – All resources are online on the first node again