Self Help to Put MQ under the control of Failover Clustering(MSCS)
ANILKSAHU 270007BXD4 Comments (4) Visits (5545)
This document is a self help that describes how to configure MQ as a resource with failover cluster in Windows 2012. It will give a clear step by step process to be followed starting from the installation of failover clustering to putting MQ under Failover clustering successfully.
This will help customers who want to have a setup not only in windows 2012 but also in windows 2008 machine with a minor changes.
What is Failover Cluster?
A “ failover cluster” is a group of independent computers that work together to increase the availability and scalability of clustered roles (formerly called clustered applications and services). The clustered servers (called nodes) are connected by physical cables and by software. If one or more of the cluster nodes fail, other nodes begin to provide service (a process known as failover). In addition, the clustered nodes are proactively monitored to verify that they are working properly. If they are not working, they are restarted or moved to another node. With the Failover Clustering feature, users experience a minimum of disruptions in service.
Note: In Windows Server 2008 , Windows Server 2008 R2,windows 2012 and Windows server 2012 R2 the MSCS service has been renamed to Windows Server Failover Clustering.
MQ as a resource in Failover clustering
WebSphere MQ can be configured for clustering by making the queue manager the unit of failover to "Failover Clustering" by defining a queue manager as a resource. Fail over cluster can then monitor MQ, and transfer it to another computer in the cluster if there is a problem in the existing primary set up.
Lets now walk through on how to configure MQ as part of Failover Cluster in Windows 2012
Prerequisites for Failover Clustering:
To build a two-node failover cluster in windows 2012 , two physical systems or virtual machines (Vms) are required. You can create clusters with VM nodes using either Microsoft Hyper-V or VMware vSphere. I'll be creating the cluster using two physical servers, but the cluster configuration steps are same regardless of whether the cluster nodes are physical or virtual. However, a key point is that the nodes should be similarly configured to enable the backup node to handle the workloads that might need to be supported in the event of a failover or live migration.
It is important to configure both node (Machine A and B) identically:-
Configuration of “ Failover Clustering”:
1.How to Install Failover Cluster Feature and Tools on both the Nodes?
The installation procedure for Failover Clustering in Windows Server 2012 is very similar to that in Windows Server 2008 and Windows Server 2008 R2 described in the following blog.
The Failover Clustering feature can be installed with either Server Manager or Windows PowerShell cmdlets.I have installed Failover clustring in Windows server 2012 in the following way using Server manager
a) In Server Manager, the Add Roles and Features Wizard is used to add roles and\or features. The Add Roles and Features Wizard are accessed in the Server Manager Menu bar by choosing Add Roles and Features from the list.
b) This starts the Add Roles and Features Wizard. The Installation Type is Role-based or feature-based installation.
c) Make sure the correct server is selected in the Server Selection screen.
d) In the Features screen, select Failover Clustering
e) Then click Add Features and then install.
Note: Once the Failover cluster feature is installed, the Failover Cluster Manager interface is available in the Tools category in the Menu bar. Failover Cluster Manager is also available by right clicking on a node in the cluster in the All Servers view.
2. How to Validate Failover Cluster?
Before creating a cluster, It is strongly recommend to validate the configuration. Validation helps to confirm that the configuration of the servers, network, and storage meets a set of specific requirements for failover clusters.
a)To open the failover cluster snap-in, click Start, click Administrative Tools, and then click Failover Cluster Management.
b)Confirm that Failover Cluster Management is selected and then, in the center pane under Management, click Validate a Configuration.
c)The Summary page appears after the tests run. To view Help topics that will help you interpret the results, click More about cluster validation tests.
d)In the Summary page, click View Report and read the test results.
As necessary, make changes in the configuration and rerun the tests.
3. How to Create new cluster ?
Create a new Cluster. There are some minor changes in the create cluster procedure in Windows Server 2012, but it is very similar to creating a cluster in Windows Server 2008 R2 as described in the following page.
a)To create a cluster, run the Create Cluster wizard.To open the failover cluster snap-in, click Start, click Administrative Tools, and then click Failover Cluster Management.
b)Confirm that Failover Cluster Management is selected and then, in the center pane under Management, click Create a cluster.
c)Follow the instructions in the wizard and specify:
The servers to include in the cluster.
The name of the cluster.
Any IP address information that is not automatically supplied by your DHCP settings.
d)To enable a cluster shared volume(CSV ) on an available disk, expand the Storage node and select the Disks node. Next, select the cluster disk that you want to use as a shared volume and click the Add to Cluster Shared Volumes link in the Failover Cluster Manager's Actions pane
e) Behind the scenes, Failover Cluster Manager configures the cluster disk's storage for Shared Volume, which includes adding a mount point in the system drive. In my example, I enabled CSVs on both Cluster Disk 1 and Cluster Disk 2, which added the following mount points:
At this point, the two-node Server 2012 cluster has been built and CSVs have been enabled.
How to add MQ as a Resource in Failover Clustering?
1. Prerequisites for adding QM to Failover Cluster
a)Create Queue manager .
b) Start Queuemnager
Eg: using strmqm mqsc_test
c) Run 'haregtyp /r' to define the MQ MSCS resource type on both nodes.
d) Make a directory on the shared disk, e.g e:\WebSphere MQ
hamvmqm /m mscs_test /dd "e:\WebSphere MQ" /ld "e:\WebSphere MQ\log"
Once above command is executed,
Log Data will be available at “ e:\WebSphere MQ\log”
Queue manager Data will be available at e:\WebSphere MQ\qmgrs\<QM_NAME>
2. Putting QM under “Failover Clustering”
a) Log in to the cluster node computer hosting the queue manager, or log in to a remote workstation as a user with cluster administration permissions, and connect to the cluster node hosting the queue manager.
b) Start the Failover Cluster Management tool.
c) Right-click Failover Cluster Management > Connect Cluster ... to open a connection to the cluster.
d) Right-click on the cluster and select Configure Role to start the configuration wizard and click Next> .
e) Select the role “Other Server” that we are going to configure for high availability. Click Next>
f) Click Next > .Type the name which we will use during the access to clustered role. Select an appropriate IP address as a client access point. Here in my example Name is MQS and ip- address I have choosen is 9.xxx.xxx.xxx. Click Next>.
g) Select the storage volume where we have shared the queue manager data and logs. That will help the customer for exclusive use of Queue manager . Click Next>
h) Select the IBM MQSeries MSCS resource on the "Select Resource Type" panel. Click Next>, you will get and confirmation in the following way.
i)Then summary will be shown as below. Click Finish.
j) The Role in the Active machine will be shown as below.
k) Select the newly defined service which contains a resource called 'New IBM MQSeries MSCS'. Select properties.
And configure as follows.
i. Under General ,you can edit the name if you want to change. In my case it is mscs_test.
iv) Under Parameters Write the Queue Manager Name.
m) Now select the resource panel “mscs_test” (in my case) and right click.Click “Bring Online”
n) It will go offline on node “Machine A” and then online on node “Machine B” as per our example.
Note:You can check on the “Failover Cluster Manager Wizard” under Node by clicking on Machine B which will the show (eg:“MQS” here) Running.
Docs used to debug problems with MQ Failover Cluster
a)Cluster log file This comes from the cluster server itself by setting environment variable 'Clu
b)MQ Trace with MSCS trace is incorporated into the main MQ trace .so just enable tracing as usual (strmqtrc -t detail -t all).