MQ 9th Batch Oct 2022
MQ 9th Batch Oct 2022
================================================================================
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
Software Links:
1. VMWare Workstation pro 15:
https://drive.google.com/drive/folders/1dq6jEihgp2Q3rzZyKEOGzSwuMVtYd6_p?
usp=sharing
==============================================================================
Unix file systems:
-------------------
/ --> the hard disk
/var --> default working directory in linux
/opt --> default installation directory in linux
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
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:
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
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
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:
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)
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)
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
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)
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
QM2: - /var/mqm/qmgrs/QM2/ssl
------
Creating key store in cms
---------------------------
runmqakm -keydb -create -db qm2key.kdb -pw qm2@123 -type cms -stash
=======================================================
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
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)