Operating System - HP-UX
1823788 Members
4369 Online
109665 Solutions
New Discussion юеВ

anyone have IBM MQ running under MC/SG?

 
John Kittel
Trusted Contributor

anyone have IBM MQ running under MC/SG?

Has anyone out there got IBM MQ running under ServiceGuard?

Would you mind posting your package configuration and control files? or at least the relevant parts of them.

We have an active-active configuration supplied to us by a contractor, which works fine, but now I'm trying to add MQ as a service to one of the existing packages. This is my first outing with both ServiceGuard and MQ and I'm having a devil of a time. I've already searched the forums. I already have the MQ support pack for ServiceGuard integration. I believe I understand the ServiceGuard issues adequately, but the MQ start, stop, and monitor scripts are rather difficult.

Thanks,
John
3 REPLIES 3
Jasja Verbeek
Occasional Advisor

Re: anyone have IBM MQ running under MC/SG?

Hi John,

We use mq in a monitor script to. But I found that the integration pack didn't work correctly.

With some cut & paste actions I made this monitor script:

#!/bin/ksh
# Start of Service: always start application.

su - mqm -c "/MQHA/bin/hamqm_start_su Queuename"

# Start of loop that check if application is up.

while true
do

su - mqm -c "echo 'ping qmgr'| runmqsc Queuename > /dev/null 2>&1"
pingresult=$?

if [ $pingresult -eq 0 ]
then # ping succeeded

result=0

else # ping failed

srchstr=" $QX0001G[ ]*$"
cnt=`ps -ef | grep strmqm | grep "$srchstr" | grep -v grep | awk '{print $2}' | wc -l`
if [ $cnt -gt 0 ]
then
# It appears that QM is still starting up, tolerate
echo "hamqm_applmon: Queue Manager QX0001G is starting"
result=0
else
# There is no sign of QM start process
echo "hamqm_applmon: Queue Manager QX0001G is not responsive"
result=$pingresult
fi

fi

if [ $result -gt 0 ]
then

# check voor maintancefile
if [ ! -f /etc/cmcluster/packagename/mqm.maint ]
then
echo " MQ manager isn't running!"
exit 1
else
echo "maintenance mode"
sleep 10
fi
else
sleep 10
fi
done
---------------------------


This assumes that if the queuemanager doesn't react to a ping, its doesn't work anymore and everything should be restarted.


I also had to adjust the scripts IBM made to create HA MQ's. it bassicly just makes links from /var/mqm etc. to /HAMQ/andthesomething.

Good luck with it.

Jasja.










John Kittel
Trusted Contributor

Re: anyone have IBM MQ running under MC/SG?

Thanks Jasja. That script is similar to the script mqm.sh in the support pack, which is what I've been trying use. I'm guessing you probably used mqm.sh to cut from, to paste together your script.

Did you do as the support pack suggested and make two services, one for the queue manager, and one for the listener?

I could still use some more help...

- John
Jasja Verbeek
Occasional Advisor

Re: anyone have IBM MQ running under MC/SG?

Hi John,

Sorry for the delay but here it is:


in the config file:

SERVICE_NAME mqm_mon
SERVICE_FAIL_FAST_ENABLED NO
SERVICE_HALT_TIMEOUT 300

That's simple enough.

In the control file:

SERVICE_NAME[1]=mqm_mon
SERVICE_CMD[1] =/etc/cmcluster/packagename/mqm.mon
SERVICE_RESTART[1]="-R"

But also in the halt commands:

something like :
su - mqm -c "/MQHA/bin/hamqm_stop_su queuename"

and more things you want stopped before unmounting the filesystems.

No start commands anymore. The service does that. A service doesn't stop anything, it just dies and gets restarted.

good luck ,

Jasja