|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How do I properly shutdown a listener on AIX |
« View previous topic :: View next topic » |
Author |
Message
|
kriersd |
Posted: Fri Jan 31, 2003 11:35 am Post subject: How do I properly shutdown a listener on AIX |
|
|
 Master
Joined: 22 Jul 2002 Posts: 209 Location: IA, USA
|
Ok, MQ GURU's...
Below is a snipit of my MQWF_Shutdown KSH script. Can someone tell me if I am doing something wrong here. I am running into a strange problem.
When I run the stop script (see snipit below) everything looks like it shutdown properly. Now when I run the start script (Not shown) to bring everything back up sometimes I'll get an error pop up about 30 seconds after the start of my listeners stating that it couldn't bind to the port.
I can always resolve the issue by running the stop script (see snipit below) again and then rerunning the start script again. Now the funny thing is, the listener stays up after I rerun the stop script and then run the start script.
Code: |
############################
# End the command server
############################
endmqcsv $QMANAGER
############################
endmqm $QMANAGER
i=0
while ps -ef |grep -v grep | grep qm | grep -q $QMANAGER; do
echo "Waiting for queue manager $QMANAGER to stop"
sleep 60
(( i = i + 1 ))
if [ i -ge 10 ]; then
echo "$QMANAGER not shutting down cleanly; Forcing shutdown"
/usr/local/bin/unixpage.ksh -i MQWorkflow "$QMANAGER not shutting down on $HOST"
endmqm -i $QMANAGER
exit 1
fi
done
########################################################################
# endmqlsr -m $QMANAGER
########################################################################
endmqlsr -m $QMANAGER
i=0
while ps -ef |grep -v grep |grep "runmqlsr -m $QMANAGER"; do
echo "Waiting for listener on $QMANAGER to stop"
sleep 60
(( i = i + 1 ))
if [ i -ge 6 ]; then
echo "Listener on $QMANAGER did not shut down!"
/usr/local/bin/unixpage.ksh -i MQWorkflow "Listener on $QMANAGER not shutting down on $HOST
"
echo Forcing listeners off of system
list=`ps -ef | grep [m]qlsr | grep $QMANAGER | awk '{ print $2 }'`
for x in $list;do
echo killing process $x
kill -9 $x
done
exit 0
fi
done
|
_________________ Dave Krier
IBM WebSphere MQ Workflow V3.4 Solution Designer |
|
Back to top |
|
 |
mrlinux |
Posted: Fri Jan 31, 2003 11:52 am Post subject: |
|
|
 Grand Master
Joined: 14 Feb 2002 Posts: 1261 Location: Detroit,MI USA
|
Well If the order you show your script is the execuction order, you should shut down the listener first. _________________ Jeff
IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries |
|
Back to top |
|
 |
jsware |
Posted: Tue Feb 04, 2003 3:19 am Post subject: |
|
|
 Chevalier
Joined: 17 May 2001 Posts: 455
|
You can't shut down the listener when the queue manager is running. |
|
Back to top |
|
 |
pgorak |
Posted: Tue Feb 04, 2003 4:37 am Post subject: |
|
|
 Disciple
Joined: 15 Jul 2002 Posts: 158 Location: Cracow, Poland
|
Quote: |
You can't shut down the listener when the queue manager is running |
That's rigth. David, why don't you use endmqm -w in your script, so that you wouldn't have to wait in the loop?
As to the listener - after the listener process is ended uncleanly (e.g. by killing it) you'll have to wait a while (don't know precisely how long) for the socket to be released, since it will be in FIN_WAIT state. If you run against this problem again, try to check the status of your sockets with netstat -a
Piotr |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|