Author |
Message
|
kriersd |
Posted: Fri Nov 08, 2002 7:02 am Post subject: shared memory and semaphores "Don't get removed at shut |
|
|
 Master
Joined: 22 Jul 2002 Posts: 209 Location: IA, USA
|
Hello,
Has anyone else ran into the problem where MQSeries does not remove all the "shared memory resources and semaphores " at shutdown. I notice this because when I try to start up the QM and Listener after a previous shutdown I get an error binding to the port.
"Listner can't bind to port 14000"
Once I shutdown the QM and remove all resources and semaphores using the "ipcrm" command. Everything comes up fine.
Anyone know how to fix this? :( _________________ Dave Krier
IBM WebSphere MQ Workflow V3.4 Solution Designer |
|
Back to top |
|
 |
jsware |
Posted: Fri Nov 08, 2002 2:26 pm Post subject: |
|
|
 Chevalier
Joined: 17 May 2001 Posts: 455
|
If you are using a listener rather than inetd, you'll find the listener still running after you shut down the qmgr.
Try doing an endmqlsr after the endmqm has completed to remove the listener process.
You're ipcrm command is probably terminating/crashing the listener. However, even after the qmgr has ended, I have found shared mem/semaphores left around and ipcrm is the only way to go. I recommend writing a script that does something like (pseduo code):
for mode in w i p
endmqm -$mode $qm
while 1 or more processes are still running
sleep for 5 seconds
if > 60 seconds then exit while loop and continue next mode
loop
next
if any processes left then
for each process in the order listed in the admin guide
kill -9 process
next
endif
now do the ipcrm to clean up any rubbish left behind.
The MQHA support pack gives a good way of killing off a queue manager
progressively more agressively.
HTH
John. |
|
Back to top |
|
 |
kp |
Posted: Sat Nov 09, 2002 2:20 am Post subject: |
|
|
Novice
Joined: 16 Oct 2002 Posts: 15 Location: Belgium
|
|
Back to top |
|
 |
kriersd |
Posted: Mon Nov 11, 2002 10:06 am Post subject: |
|
|
 Master
Joined: 22 Jul 2002 Posts: 209 Location: IA, USA
|
John
Thanks for the reply. I will look for the MQHA. I did try to bring down everything MQ related such as listeners, and triggers. When I "ps -ef | grep mq" I don't see anything running, yet I still see a few "shared memory resources and semaphores " when running ipcs | grep mqm
Is this normal?
Dave _________________ Dave Krier
IBM WebSphere MQ Workflow V3.4 Solution Designer |
|
Back to top |
|
 |
jsware |
Posted: Thu Nov 14, 2002 12:47 am Post subject: |
|
|
 Chevalier
Joined: 17 May 2001 Posts: 455
|
I've found it a "normal" occurrence (if you can call it that) for semaphores and shared memory to be left around. You can just tidy them up using ipcrm etc.
Regards
John
PS It's support pack MC63: MQSeries for AIX - Implementing with HACMP
There's also one for WMQI, IC61: Configuring WebSphere MQ Integrator for AIX with HACMP |
|
Back to top |
|
 |
dgolding |
Posted: Thu Nov 14, 2002 2:03 am Post subject: |
|
|
 Yatiri
Joined: 16 May 2001 Posts: 668 Location: Switzerland
|
At 5.2 and above, the (undocumented) program "amqiclen" is supposed to do this, but I've never got it to work
Here's a little script to do it:
*HEALTH WARNING* Don't run if you have a running queue manager on your box, it will corrupt it *END OF WARNING *
#!/bin/sh
# zapmq - clear out IPCS stuff for ALL queue managers
#
temp=/tmp/zapmq.$$
ipcs|grep mqm|awk '{print "ipcrm -"$1" "$2}'>$temp
. $temp
rm $temp |
|
Back to top |
|
 |
|