0% found this document useful (0 votes)
138 views54 pages

An Introduction To Websphere MQ Multi-Instance Queue Managers

Uploaded by

Jerry Walter
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
138 views54 pages

An Introduction To Websphere MQ Multi-Instance Queue Managers

Uploaded by

Jerry Walter
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 54

IBM Software Group

An Introduction to WebSphere MQ MultiInstance Queue Managers


Barry Robbins [email protected] Advisory Software Engineer, IBM

WebSphere Support Technical Exchange

IBM Software Group

Agenda
Overview WebSphere MQ changes UNIX systems Windows systems Explorer updates Traditional HA
WebSphere Support Technical Exchange 2 of 54

IBM Software Group

Agenda
Overview WebSphere MQ changes UNIX systems Windows systems Explorer updates Traditional HA
WebSphere Support Technical Exchange 3 of 54

IBM Software Group

Overview
Basic failover support Not intended to replace HA coordinators Data retained on network storage Queue manager can be started on different machines
Active instance Standby instance

WebSphere Support Technical Exchange

4 of 54

IBM Software Group

Basic multi-instance operation


WMQ Client WMQ Client

network IP-A QM1 Active Machine A IP-B QM1 Standby Machine B

QM1 IPA
networked storage

Owns the queue manager data IPA

WebSphere Support Technical Exchange

5 of 54

IBM Software Group

Machine A system failure


Client connections broken

WMQ Client

WMQ Client

network IP-A QM1 Active Machine A IP-B QM1 Standby Machine B

QM1 IPA
networked storage

IPA

WebSphere Support Technical Exchange

6 of 54

IBM Software Group

Standby instance becomes active


WMQ Client WMQ Client
Client connections broken

network IP-B QM1 Active Machine B

QM1
Owns the queue manager data IPA networked storage

WebSphere Support Technical Exchange

7 of 54

IBM Software Group

Clients reconnect recovery complete


WMQ Client WMQ Client
Client connections reconnect

network IP-B QM1 Active Machine B

QM1
Owns the queue manager data IPA networked storage

WebSphere Support Technical Exchange

8 of 54

IBM Software Group

Supported WebSphere MQ platforms


Currently available at 7.0.1.0 for the following:
AIX Linux (Power, X86-32, X86-64, System z) HP (both HP-UX Itanium and PA-RISC) Windows

i5/OS and Solaris planned Not available for z/OS


WebSphere Support Technical Exchange 9 of 54

IBM Software Group

Considerations
Not intended to manage resources beyond MQ System IP address not assumed as part of failover Support for networked storage over modern
network file system protocols NFS V4 Windows CIFS (Common Internet File System) Must ensure that any caching is turned OFF to ensure data integrity
WebSphere Support Technical Exchange 10 of 54

IBM Software Group

Agenda
Overview WebSphere MQ changes UNIX systems Windows systems Explorer updates Traditional HA
WebSphere Support Technical Exchange 11 of 54

IBM Software Group

New Commands
Network storage validation command
amqmfsck (UNIX only)

Commands to modify mqs.ini


addmqinf dspmqinf rmvmqinf

WebSphere Support Technical Exchange

12 of 54

IBM Software Group

Updated Commands
crtmqm
md message data ld transaction log data sax create the queue manager, start the queue manager, set the queue manager to autostart, start it with the x flag (Windows)

strmqm
x starting of multi instance queue manager f rebuild queue manager objects
WebSphere Support Technical Exchange 13 of 54

IBM Software Group

Updated Commands (continued)


endmqm
x stop the standby instance s switch to failover instance r Start trying to reconnect reconnectable clients

WebSphere Support Technical Exchange

14 of 54

IBM Software Group

Updated Commands (continued)


amqmdain (Windows)
alter /x <set | unset> - modify the start type of a multi-instance queue manager end /s /r /x same as endmqm Registry operation is restricted for multi-instance queue managers.

WebSphere Support Technical Exchange

15 of 54

IBM Software Group

Updated Commands (continued)


dspmq
n display output in English o standby display standby state x display instance information

Updates to runmqsc
DISPLAY QMSTATUS ALL

WebSphere Support Technical Exchange

16 of 54

IBM Software Group

Agenda
Overview WebSphere MQ changes UNIX systems Windows systems Explorer updates Traditional HA
WebSphere Support Technical Exchange 17 of 54

IBM Software Group

UNIX walkthrough
Ensure that matching user and group ids for mqm
exist on both systems

Test the network storage using amqmfsck


amqmfsck /shared/qmdata Checks basic POSIX file locking behaviour amqmfsck w /shared/qmdata Use on two machines at once to ensure that the locks are handed
off correctly when a process ends.

amqmfsck c /shared/qmdata Use on two machines at once to attempt concurrent writes.

WebSphere Support Technical Exchange

18 of 54

IBM Software Group

UNIX walkthrough(continued)
Create the queue manager on machine A
crtmqm md /shared/qmdata ld /shared/qmlog QM1

Define the queue manager on machine B (or edit mqs.ini)


addmqinf v Name=QM1 v Directory=QM1 v Prefix=/var/mqm v DataPath=/shared/qmdata/QM1

note that the above can be carried out on additional systems

WebSphere Support Technical Exchange

19 of 54

IBM Software Group

UNIX walkthrough(continued)
Start the active instance of the queue manager on
machine A
strmqm x QM1 WebSphere MQ queue manager QM1 started.

Start the standby instance of the queue manager on


machine B
strmqm x QM1 WebSphere MQ queue manager QM1 started as a standby instance.

Only one active and one standby instance


operational at a time
WebSphere Support Technical Exchange 20 of 54

IBM Software Group

Observing a multi-instance queue manager


On machine A:
dspmq x o standby o status QMNAME(QM1) STANDBY(Permitted) STATUS(Running) INSTANCE(machineA) MODE(Active) INSTANCE(machineB) MODE(Standby)

On machine B:
dspmq x o standby o status QMNAME(QM1) STANDBY(Permitted) STATUS(Running as standby) INSTANCE(machineA) MODE(Active) INSTANCE(machineB) MODE(Standby)

If defined on an additional system (machine C, D, etc....):


dspmq x o standby o status QMNAME(QM1) STANDBY(Permitted) STATUS(Running elsewhere) INSTANCE(machineA) MODE(Active) INSTANCE(machineB) MODE(Standby)
WebSphere Support Technical Exchange 21 of 54

IBM Software Group

MQSC
Queue manager status enhanced to show whether
standby instances are permitted
DISPLAY QMSTATUS ALL 1 : DISPLAY QMSTATUS ALL AMQ8705: Display Queue Manager Status Details. QMNAME(QM1) CONNS(27) CHINIT(RUNNING) STATUS(RUNNING) CMDSERV(RUNNING) STANDBY(PERMIT)

WebSphere Support Technical Exchange

22 of 54

IBM Software Group

Agenda
Overview WebSphere MQ changes UNIX systems Windows systems Explorer updates Traditional HA
WebSphere Support Technical Exchange 23 of 54

IBM Software Group

Windows mqm Group


Members of the local mqm group of the primary
(creating) node will have access

Unlike UNIX systems, local groups on different nodes


can not be made to match

Modifying file permissions at failover is too costly


Different from MSCS

Answer create a mini-domain

WebSphere Support Technical Exchange

24 of 54

IBM Software Group

Defining Network Shares


Universal Naming Convention (UNC) share names should be
used to avoid session boundaries

Queue Manager log path cannot be the same as the data path Read/Write access must be granted for :
SYSTEM ID mqm Group Administrators Group

WebSphere Support Technical Exchange

25 of 54

IBM Software Group

Configuration Data
Queue manager configuration data can either be in the
Windows registry or in INI files

crtmqm /md flag indicates that the queue managers


data is not in the default location (registry)

DataPath attribute used to control location of queue

manager configuration data - Windows registry or INI files registry

Standard crtmqm will continue to use the Windows

WebSphere Support Technical Exchange

26 of 54

IBM Software Group

Configuration Data (continued)


WebSphere MQ Release Queue Managers Configuration mqs.ini qm.ini qmstatus.ini V7.0 Registry Registry Registry V7.0.1 Standard Registry Registry Registry Multi-Instance Registry INI File INI File

WebSphere Support Technical Exchange

27 of 54

IBM Software Group

Windows Walkthrough
Configure a pair of Windows servers as domain
controllers

The WMQ service needs to run as a domain user who


is a member of the mqm group

WebSphere Support Technical Exchange

28 of 54

IBM Software Group

Windows Walkthrough (continued)


Create a shared directory for the queue manager
data

The network share must be within the domain Modify both the share and file permissions Create the queue manager using the appropriate
flags, specifying the data and log path. Use UNC format for network locations

WebSphere Support Technical Exchange

29 of 54

IBM Software Group

Windows Walkthrough (continued)


Active Queue Manager Node crtmqm /md \\host\share\data /ld \\host\share\log QM1 addmqinf /s QueueManager /v Name=QM1 /v Directory=QM1 /v Prefix=c:\mqm /v DataPath=\\host\share\data strmqm /x QM1 strmqm /x QM1 Standby Queue Manager Node

WebSphere Support Technical Exchange

30 of 54

IBM Software Group

Agenda
Overview WebSphere MQ changes UNIX systems Windows systems Explorer updates Traditional HA
WebSphere Support Technical Exchange 31 of 54

IBM Software Group

MQ Explorer

only 1 new icon

WebSphere Support Technical Exchange

32 of 54

IBM Software Group

Create Queue Manager wizard (continued)


Default data and log paths can be changed (previously just log path) Checks for valid directory Checks for same path name

WebSphere Support Technical Exchange

33 of 54

IBM Software Group

Create Queue Manager wizard (continued)


Queue manager can be started to permit failover Automatic and Permit standby will use sax option

WebSphere Support Technical Exchange

34 of 54

IBM Software Group

Add Remote Queue Manager wizard


Connect to single or multi instance queue manager using Connect directly Using a Client Channel Definition Table (CCDT) used to be on second page

WebSphere Support Technical Exchange

35 of 54

IBM Software Group

Add Remote Queue Manager wizard (continued)


CCDT details moved to own page Use for single or multi instance Multi instance

same channel name used for each instance auto-reconnect enabled (can be reset) further instances can be added using the Manage Instances dialog

WebSphere Support Technical Exchange

36 of 54

IBM Software Group

Queue Manager content page

WebSphere Support Technical Exchange

37 of 54

IBM Software Group

Manage Instances

WebSphere Support Technical Exchange

38 of 54

IBM Software Group

Manage Instances dialog

Connection order used by MQ Explorer


cannot remove connected instance details

WebSphere Support Technical Exchange

39 of 54

IBM Software Group

Manage Instances connection details

Single page wizard for adding new connection details

WebSphere Support Technical Exchange

40 of 54

IBM Software Group

Start/Stop Queue Manager dialogs

W indows/Linux start dialog slightly different New control command flags -x, -s, -r

WebSphere Support Technical Exchange

41 of 54

IBM Software Group

Agenda
Overview WebSphere MQ changes UNIX systems Windows systems Explorer updates Traditional HA
WebSphere Support Technical Exchange 42 of 54

IBM Software Group

7.0.1 and advanced HA products


Microsoft Cluster Services (MSCS)
No effect

IBM PowerHA for AIX, Veritas Cluster Server and


HP Serviceguard, etc Impacts/alters the usefulness of the HA SupportPac (MC91)

WebSphere Support Technical Exchange

43 of 54

IBM Software Group

MC91 SupportPac
Scripts for IBM PowerHA for AIX, Veritas Cluster
Server and HP Serviceguard
The scripts are easily adaptable for other HA cluster products

Scripts provided include:


hacrtmqm Create queue manager hadltmqm Delete queue manager halinkmqm Link queue manager hamqm_start Start queue manager hamqm_stop Stop queue manager hamigmqm Migrate from V5.3 to V6
WebSphere Support Technical Exchange 44 of 54

IBM Software Group

Why withdraw MC91?


MC91 was provided as-is MQ 7.0.1 can separate node-specific and shared data
without environment variables and shell scripts New DataPath attribute controlled by crtmqm -md Much of what MC91 does is now redundant

Each version of MQ means a new version of MC91


Gives customers an extra job when upgrading MQ

Integrated product support preferable


WebSphere Support Technical Exchange 45 of 54

IBM Software Group

Creating a QM in an HA cluster with MQ 7.0.1


Create filesystems on the shared disk, for example
/MQHA/QM1/data for the queue manager data /MQHA/QM1/log for the queue manager logs

On one of the nodes:


Mount the filesystems Create the queue manager
crtmqm md /MQHA/QM1/data ld /MQHA/QM1/log QM1

WebSphere Support Technical Exchange

46 of 54

IBM Software Group

Creating a QM in an HA cluster with MQ 7.0.1


Print out the configuration information for use on the
other nodes
dspmqinf o command QM1

On the other nodes:


Mount the filesystems Add the queue managers configuration information
addmqinf s QueueManager v Name=QM1 v Prefix=/var/mqm v DataPath=/MQHA/QM1/data/QM1 v Directory=QM1

WebSphere Support Technical Exchange

47 of 54

IBM Software Group

Filesystem organisation
Files located on the shared disk
/MQHA/QM1/log/QM1/amqhlctl.lfh /active/S0000000.LOG /MQHA/QM1/data/QM1/qm.ini /qmstatus.ini /qmanager /queues/... /...

Files on the local disk


/var/mqm/sockets/QM1/@ipcc /@app /...
WebSphere Support Technical Exchange 48 of 54

IBM Software Group

Equivalents to MC91 facilities


MC91 hacrtmqm to create queue manager on shared disk and point symbolic links back to nodes / var/mqm halinkmqm hadltmqm Using MQ 7.0.1 New crtmqm md option

New addmqinf command New rmvmqinf command to remove queue manager from a node, dltmqm to delete the queue manager Use the MC91 hamqm_start Use the MC91 hamqm_stop Part of MC91 hamqm_start Use the MC91 hamqm_applmon, or a script more tailored to your needs

hamqm_start hamqm_stop rc.local script hamqm_applmon

WebSphere Support Technical Exchange

49 of 54

IBM Software Group

What does MC91 still bring?


Queue manager start and stop scripts are more
resilient than vanilla strmqm/endmqm For example, endmqm could get stuck in extreme cases

Monitoring script for health-checking of queue


manager by HA cluster Uses runmqsc PING QMGR A new alternative is dspmq n <qmname> | grep RUNNING
WebSphere Support Technical Exchange 50 of 54

IBM Software Group

Summary
Overview WebSphere MQ changes UNIX systems Windows systems Explorer updates Traditional HA
WebSphere Support Technical Exchange 51 of 54

IBM Software Group

Useful Links
MC91
http://www.ibm.com/support/docview.wss?uid=swg24011869

Webcast : WebSphere MQ V7.0 Client Enhancements


http://www.ibm.com/support/docview.wss?uid=swg27016801

WebSphere Support Technical Exchange

52 of 54

IBM Software Group

Additional WebSphere Product Resources

Discover the latest trends in WebSphere Technology and implementation, participate in technically-focused briefings, webcasts and podcasts at: http://www.ibm.com/developerworks/websphere/community/ Learn about other upcoming webcasts, conferences and events: http://www.ibm.com/software/websphere/events_1.html Join the Global WebSphere User Group Community: http://www.websphere.org Access key product show-me demos and tutorials by visiting IBM Education Assistant: http://www.ibm.com/software/info/education/assistant View a webcast replay with step-by-step instructions for using the Service Request (SR) tool for submitting problems electronically: http://www.ibm.com/software/websphere/support/d2w.html Sign up to receive weekly technical My Notifications emails: http://www.ibm.com/software/support/einfo.html

WebSphere Support Technical Exchange

53 of 54

IBM Software Group

Questions and Answers

WebSphere Support Technical Exchange

54 of 54

You might also like