0% found this document useful (0 votes)
163 views9 pages

MQ 9th Batch Oct 2022

MQ 6 to MQ 7 included enhancements like multi-instance capability for high availability, introduction of pub-sub, and channel authentication records. MQ 7 to MQ 8 did not include major enhancements beyond some security patches. MQ 8 to MQ 9 did not include major enhancements but did include business-related enhancements like continuous delivery and long-term support options.

Uploaded by

j. koteswarao
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
163 views9 pages

MQ 9th Batch Oct 2022

MQ 6 to MQ 7 included enhancements like multi-instance capability for high availability, introduction of pub-sub, and channel authentication records. MQ 7 to MQ 8 did not include major enhancements beyond some security patches. MQ 8 to MQ 9 did not include major enhancements but did include business-related enhancements like continuous delivery and long-term support options.

Uploaded by

j. koteswarao
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 9

MQ 6 to MQ 7 --> enhancements

1) Multiinstance concept (High Avaiability)


2) Pub-Sub has been introduced
3) Channel authentication records

MQ 7 to MQ 8 --> no major enchancement except some security patches

MQ 8 to MQ 9 --> no major enchancements but there are business related enchancement


1) CD vs LTS
CD --> contineous delivery
LTS --> Long Term Support -- 3 yers or 5 years

================================================================================
Taking the SSH to the linux server:
-----------------------------------

Unix commands:
---------------
1) switch of the firewall service
systemctl status firewalld --> to check the status of the firwalld
systemctl stop firewalld --> to stop the firewalld services
systemctl disable firewalld --> to disable the firewalld services

2) ifconfig --> to get the ipaddress of the server

Software Links:
1. VMWare Workstation pro 15:
https://drive.google.com/drive/folders/1dq6jEihgp2Q3rzZyKEOGzSwuMVtYd6_p?
usp=sharing

2. Linux ISO image:


https://drive.google.com/file/d/15rPHdrZUfgTnYuDrJjZTPIhe1noWODYc/view?usp=sharing

3. MobaXterm can be downloaded from google


https://mobaxterm.mobatek.net/download.html

4. Unix basic commands


https://maker.pro/linux/tutorial/basic-linux-commands-for-beginners
http://mally.stanford.edu/~sr/computing/basic-unix.html

==============================================================================
Unix file systems:
-------------------
/ --> the hard disk
/var --> default working directory in linux
/opt --> default installation directory in linux

/var/mqm --> default working directory for MQ in the linux


/opt/mqm --> default installation directory for MQ in the linux
================================================================================
MQ CLI (Command Line Interface)
--------------------------------
1) MQ Operating system level commands --> Execute outside of the queue manager (at
the OS level):
-----------------------------------------------------------------------------------
--------------
1. dspmqver --> displays the installed MQ Version in your server
2. dspmq --> lists all the queue managers in the server
3. crtmqm MOHAN --> to create MOHAN queue manager
4. strmqm MOHAN --> to start MOHAN queue manager
5. runmqsc MOHAN --> to enter inside MOHAN queue manager
6. endmqm BANGALORE --> to shutdown BANGALORE queue manager
7. dltmqm BANGALORE --> to delete BANGALORE queue manager
8. Put a message in a qlocal
cd /opt/mqm/samp/bin
./amqsput QL1 ANIL
9. Get the messages from a qlocal
cd /opt/mqm/samp/bin
./amqsget QL1 ANIL
10. Browse the messages in a qlocal
cd /opt/mqm/samp/bin
./amqsbcg QL1 ANIL

11. mqrc 2053 --> MQRC_Q_FULL


12. mqrc 2030 --> MQRC_MSG_TOO_BIG_FOR_Q
13. mqrc 2051 --> MQRC_PUT_INHIBITED
14. mqrc 2016 --> MQRC_GET_INHIBITED
15. mqrc 2085 --> MQRC_UNKNOWN_OBJECT_NAME
16. mqrc 2059 --> MQRC_Q_MGR_NOT_AVAILABLE
17. mqrc 2101 --> MQRC_OBJECT_DAMAGED

18. rcrmqobj -m JAKEER -t queue HYDERABAD --> to recover damaged object (JAKEER
queue manager is in linear loggin fashion)

2) MQSC commands (MQ Script level commands) --> Execute inside a queue manager:
--------------------------------------------------------------------------------
1. END --> to come out from the queue manager
2. DISPLAY QMGR --> to display the properties of the queue manager
3. DISPLAY QLOCAL(*) --> to list all the qlocals in the queue manager
4. DEFINE QLOCAL(QL1) --> to create a new qlocal with name QL1
5. DISPLAY QLOCAL(QL1) --> to display the properties of QL1
6. ALTER QLOCAL(QL1) MAXDEPTH(10) --> to set MAXDEPTH of QL1 to 10
Default MAXDEPTH --> 5000
Maximum MAXDEPTH --> 999999999

7. ALTER QLOCAL(QL1) DEFPSIST(YES) --> to set DEFPSIST to YES


8. ALTER QLOCAL(QL1) MAXMSGL(50) --> to set MAXMSGL to 50 bytes
Default MAXMSGL --> 4194304 (4 MB)
Maximum MAXMSGL --> 104857600 (100 MB)
10. ALTER QLOCAL(QL1) PUT(DISABLED) --> to Disable PUT property of QL1
11. ALTER QLOCAL(QL1) GET(DISABLED) --> to Disable GET property of QL1
===================================================================================
====
Point to point setup:
-----------------------
Sending Application side (QM1 (192.168.1.1), QR1, TQ1, CHL1):
----------------------------------------------
1. Create a Sending queue manager (QM1)
crtmqm QM1
strmqm QM1
runmqsc QM1

2. Create Remote Queue (QR1)


DEFINE QREMOTE(QR1) RNAME(QL2) RQMNAME(QM2) XMITQ(TQ1)

3. Create a Transmission Queue (TQ1)


DEFINE QLOCAL(TQ1)
ALTER QLOCAL(TQ1) USAGE(XMITQ)

4. Create sender channel points to Receving Queue manager (CHL1)


DEFINE CHANNEL(CHL1) CHLTYPE(SDR) CONNAME('192.168.5.134(1420)') XMITQ(TQ1)
--> In real time
DEFINE CHANNEL(CHL1) CHLTYPE(SDR) CONNAME('localhost(1420)') XMITQ(TQ1) -->
only for our lab purpose

Receiving Application side (QM2 (192.168.1.2), QL2, CHL1 , LSTR2) :


----------------------------------------------------
1. Create a receving Queue manager (QM2)
crtmqm QM2
strmqm QM2
runmqsc QM2

2. Create a receving queue (QLOCAL, QL2)


DEFINE QLOCAL(QL2)

3. Create a receiver channel (CHL1)


DEFINE CHANNEL(CHL1) CHLTYPE(RCVR)

4. Create a listener at a port (LSTR2, 1420)


DEFINE LISTENER(LSTR2) TRPTYPE(TCP) PORT(1420)
START LISTENER(LSTR2)
DISPLAY LSSTATUS(LSTR2)
-----------------------------------------------------------------------------------
-------
Final step:

1. Start the sender channel in Sending queue manager QM1


Syntax : START CHANNEL(CHL1)

2. Now check the status of the sender channel


Syntax: DISPLAY CHS(CHL1)

If the status of the sender channel is in “RUNNING” state, it confirms that the
point to point setup is success. Other wise Point to Point setup is not success
----------------------------------------------------------------------------------
Validation:

PUT and GET messages in point to point setup

1. Message is put in the remote queue of sending queue manager (in QM1)
Syntax : cd /opt/mqm/samp/bin
./amqsput QR1 QM1

2. The message is get in the local queue of receiving queue manager (in QM2)
Syntax: cd /opt/mqm/samp/bin
./amqsget QL2 QM2
Here the message has been transported from QM1 and reached to QM2 over the
network via MQ channels
===================================================================================
============
Point to point setup only b/w two separate servers:
-----------------------------------------------------
Pre-requisites:
------------------
1. Set host names for the both the servers with root user. Execute below command on
both the servers
sudo hostnamectl set-hostname mohan1.training.com&&sudo reboot

sudo hostnamectl set-hostname mohan2.training.com&&sudo reboot

2. Swith off the firewall in both the servers (With root user)
systemctl status firewalld
systemctl stop firewalld
systemctl disable firewalld

3. Make the host entries in both the servers (with root user)
vi /etc/hosts
192.168.114.134 mohan1.training.com
192.168.114.128 mohan2.training.com

and now save the file

mohan1.training.com (Sending server)


----------------------------------------
Sedning Queue manager (QM1)
----------------------
Create QM1
crtmqm QM1
strmqm QM1
runmqsc QM1

1. Create remote queue (QR1)


DEF QR(QR1) RQMNAME(QM2) RNAME(QL2) XMITQ(TQ1)

2. Create a Transmission Queue (TQ1)


DEF QL(TQ1)
ALTER QL(TQ1) USAGE(XMITQ)

3. Create a sender channel (CHL1)


DEF CHL(CHL1) CHLTYPE(SDR) CONNAME('mohan2.training.com(1439)') XMITQ(TQ1)

mohan2.training.com (Receving server)


--------------------------------------
Receving Queue mangaer (QM2)
--------------------------
Create QM2
crtmqm QM2
strmqm QM2
runmqsc QM2

1. Create a receiver queue (local queue, QL2)


DEF QL(QL2)

2. Create a receiver channel (CHL1)


DEF CHL(CHL1) CHLTYPE(RCVR)
3. Create and start the listener (LSTR2, 1439)
DEF LSTR(LSTR2) TRPTYPE(TCP) PORT(1439)
START LSTR(LSTR2)
DIS LSSTATUS(LSTR2)
-----------------------------------------------------------------------------------
-------
Final step:

1. Start the sender channel in Sending queue manager QM1


Syntax : START CHANNEL(CHL1)

2. Now check the status of the sender channel


Syntax: DISPLAY CHS(CHL1)

If the status of the sender channel is in “RUNNING” state, it confirms that the
point to point setup is success. Other wise Point to Point setup is not success
----------------------------------------------------------------------------------
Validation:

PUT and GET messages in point to point setup

1. Message is put in the remote queue of sending queue manager (in QM1)
Syntax : cd /opt/mqm/samp/bin
./amqsput QR1 QM1

2. The message is get in the local queue of receiving queue manager (in QM2)
Syntax: cd /opt/mqm/samp/bin
./amqsget QL2 QM2

Here the message has been transported from QM1 and reached to QM2 over the
network via MQ channels
===================================================================================
============
Making DNS entry in my laptop to take the SSH the linux severs with hostnames
--------------------------------------------------------------------------
1. In your laptop open notepad in the admin mode
2. Open the below file
C:\Windows\System32\drivers\etc\hosts
===========================================================================
Channel Triggering:
----------------------
STOP CHL(CHL1) STATUS(INACTIVE) --> to manually inactivate the chnnel

Trigtype FIRST:
---------------
ALTER QL(TQ1) TRIGGER TRIGTYPE(FIRST) TRIGDATA(CHL1) INITQ(SYSTEM.CHANNEL.INITQ)

Trigtype DEPTH:
-----------------
ALTER QL(TQ1) TRIGGER TRIGTYPE(DEPTH) TRIGDPTH(10) TRIGDATA(CHL1)
INITQ(SYSTEM.CHANNEL.INITQ)

Altering DISCINT property of the channel


----------------------------------------
ALTER CHL(CHL1) CHLTYPE(SDR) DISCINT(20)
STOP CHL(CHL1)
START CHL(CHL1)
===================================================================================
=========
Dead letter queue:
-----------------
Assigning a dead letter queue to QM2 queue manager:
take SSH to mohan2.training.com
runmqsc QM2
ALTER QMGR DEADQ(DQ2)
DEF QL(DQ2)

Troubleshoot dead letter queue messages:


-----------------------------------------
1. Identify the reason code why messages came to the dead letter queue
i) Browse the messages from the dead letter queue
cd /opt/mqm/samp/bin
./amqsbcg DQ2 QM2

ii) using programming calculator identify the reason


2053 --> MQRC_Q_FULL

2. Take the appropriate technical action


ALTER QLOCAL(QL2) MAXDEPTH(50)

3. Run the dead letter handler based on rules table to route the messages from
dead queue to actual queue
runmqdlq DQ2 QM2
REASON(2053) ACTION(RETRY) RETRY(3)
REASON(2085) ACTION(RETRY) RETRY(3)
REASON(*) ACTION(RETRY) RETRY(3)

and press CTRL+d in your keyboard


===================================================================================
==============
Queue manage configurations:
-------------------------------
If you want to see MOHAN's queue manager's configuration then
cat /var/mqm/qmgrs/MOHAN/qm.ini

MQ configurations:
------------------
If you want to see all queue managers configuration then
cat /var/mqm/mqs.ini
===================================================================================
===========
Error logs:
------------
path: /var/mqm/qmgrs/QM1/errors --> if you want to see the errors of QM1
qmgrs/MOHAN/qm

MQ Software level errors:


------------------------------
Path: /var/mqm/errors

Check point file path:


-------------------------
/var/mqm/qmgrs/QM1/amqalchk.fil

crtmqm -lc CHANDRA --> CHANDRA queue manager is created in circular fashion (Defalt
behaviour while creating a queue manager)
crtmqm -ll JAKEER --> JAKEER queue manager is created in linera fashion (Not a
default one)

Transaction log path of JAKEER queue manager:


---------------------------------------------
cd /var/mqm/log/JAKEER/active

By default: 3 primary + 2 secondary ==> 5 transaction log files (default)


Minimum : 2 primary + 1 secondaory ==> 3 transaction log files (Minimum)
Total number of transaction log files in unix ==> 512

Minimum 2 primary + Maximum 510 secondary ==> 512


Maximum 511 primary + Mininum 1 secondary ==> 512

In real time creating a queue manager:


---------------------------------------
linear logging fashion
primary 200
secondary 100
log file pages 1000

crtmqm -ll -lp 200 -ls 100 -lf 1000 DELL

300 files ==> 1000 pages ==> 300*1000 ==> 3,00,000 pages (4 KB) ==> 12,00,000 KB
==> 1 GB
===================================================================================
================================
CURRLOG (S0000127.LOG) ==> currently the transactions are recording in this log
file
MEDIALOG (S0000085.LOG) ==> The media recory object logs
RECLOG (S0000062.LOG) ==> Those are recovered will be in the logs
===================================================================================
=================================
Backup:
--------
dmpmqcfg -m DELL -a > /var/tmp/dellqmgrbackupon14thNov2022.txt

Restore:
---------
crtmqm -ll -lp 200 -ls 100 -lf 1000 DELL
strmqm DELL
runmqsc DELL < /var/tmp/dellqmgrbackupon14thNov2022.txt
===================================================================================
===========================
SSL (Secure Socket Layer) in point to point setup:
-----------------------------------------------------
mohan1.training.com and in mohan2.training.com
1) Install MQSeriesGSKit-9.1.0-0.x86_64.rpm package
rpm -ivh MQSeriesGSKit-9.1.0-0.x86_64.rpm

2) Unset MQ from primary installation


/opt/mqm/bin/setmqinst -x -p /opt/mqm

3) Set MQ to primary installation


/opt/mqm/bin/setmqinst -i -p /opt/mqm
[root@mohan2 MQServer]# rpm -qa |grep -i mq
MQSeriesSDK-9.1.0-0.x86_64
MQSeriesServer-9.1.0-0.x86_64
MQSeriesRuntime-9.1.0-0.x86_64
MQSeriesSamples-9.1.0-0.x86_64
MQSeriesJRE-9.1.0-0.x86_64
MQSeriesJava-9.1.0-0.x86_64
MQSeriesGSKit-9.1.0-0.x86_64
-------------------------------------------------------------------------------
mohan1.training.com:
-----------------------
QM1: - /var/mqm/qmgrs/QM1/ssl
--------------------------------
Creating key store in cms
-------------------------
runmqakm -keydb -create -db qm1key.kdb -pw qm1@123 -type cms -stash

To list the certs in keystore


-----------------------------------
runmqakm -cert -list -db /var/mqm/qmgrs/QM1/ssl/qm1key.kdb

Creating selfsigned certificate


-------------------------------
runmqakm -cert -create -label ibmwebspheremqqm1 -db qm1key.kdb -dn "CN=QM1,OU=IBM"
-expire 365 -size 1024 -format ascii

Extracting a public certificate


--------------------------------
runmqakm -cert -extract -label ibmwebspheremqqm1 -db qm1key.kdb -target qm1pub.arm

QM2: - /var/mqm/qmgrs/QM2/ssl
------
Creating key store in cms
---------------------------
runmqakm -keydb -create -db qm2key.kdb -pw qm2@123 -type cms -stash

Creating self signed certficate


------------------------------
runmqakm -cert -create -label ibmwebspheremqqm2 -db qm2key.kdb -dn "CN=QM2,OU=IBM"
-expire 365 -size 1024 -format ascii

Extracting a public certifcate


-------------------------------
runmqakm -cert -extract -label ibmwebspheremqqm2 -db qm2key.kdb -target qm2pub.arm

=======================================================
Exchaing the public certificates:
----------------------------
Adding qm1pub.arm in qm2key.kdb key repos
-----------------------------------------
runmqakm -cert -add -label qm1pub -file /var/mqm/qmgrs/QM2/ssl/qm1pub.arm -db
/var/mqm/qmgrs/QM2/ssl/qm2key.kdb

Adding qm2pub.arm in qm1key.kdb key repos


-----------------------------------------
runmqakm -cert -add -label qm2pub -file /var/mqm/qmgrs/QM1/ssl/qm2pub.arm -db
/var/mqm/qmgrs/QM1/ssl/qm1key.kdb
After doing the above steps, do the below
------------------------------------------------------------
In QM1
-----------
1. ALTER QMGR SSLKEYR('/var/mqm/qmgrs/QM1/ssl/qm1key')
2. ALTER CHL(CHL1) CHLTYPE(SDR) SSLCIPH(TLS_RSA_WITH_AES_128_CBC_SHA256)

In QM2
---------
1. ALTER QMGR SSLKEYR('/var/mqm/qmgrs/QM2/ssl/qm2key')
2. ALTER CHL(CHL1) CHLTYPE(RCVR) SSLCIPH(TLS_RSA_WITH_AES_128_CBC_SHA256)

Now restart the sender channel


-----------------------------------------------------------------------------------
----------------------------------

You might also like