|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
  |
|
Listener is running but can not connect |
View previous topic :: View next topic |
Author |
Message
|
kdorre |
Posted: Tue Jun 22, 2004 12:21 am Post subject: Listener is running but can not connect |
|
|
Novice
Joined: 17 Jul 2002 Posts: 15 Location: New Zealand
|
All
Thanks in advance for any help.
I have a strange situation where I have recently upgraded MQ 5.2 from service pack 3 to service pack 8, and now the listener, command server and trigger monitor seem to be dis-associated with the queue manager when they are started via a start script.
The following describes my environment.
We have a 6 server Linux cluster running RH 6.2 and MQ 5.2 csd03. (Yes I know its all out date, however I need to keep it running until a new system is ready to replace it) The queue manager, listener etc. are started via a script running in init.d. When the system was running on service pack 3 all services started OK. I upgraded to service pack 8 and everything started but connecting to the listener, command server etc. was not possible. None of the other queue managers in the cluster could connect. Using telnet to the listening port gets “..connection denied”
When the listener is then killed and started manually connection to the queue manager were accepted and everything seems to work OK. Weird!
I decided to role back to the original service level of 3 and everything worked again. I decided to implement the service packs incrementally (You shouldn’t have to do this I know) and found that service pack 4 was OK however 5, 6, 7 and 8 resulted in the listener, command server etc not starting from the start up script.
Has anyone had any experience in this area?
And tips?
Very very frustrating.
Once again thanks for your help.
Keith _________________ life, liberty and the persuit of happiness |
|
Back to top |
|
 |
gunter |
Posted: Sun Jun 27, 2004 12:47 am Post subject: |
|
|
Partisan
Joined: 21 Jan 2004 Posts: 307 Location: Germany, Frankfurt
|
Keith,
If it works after manual start and not works after start in init.d, it is a problem in the running environment. Compare the environment variables, uid and gid. Try to start the listener manually from your startupscript.
Don't start the listener or the commandserver as root, use mqm.
Check the mq and the system error log files.
Possibly you get better help if you post your startupscript here.
Gunter _________________ Gunter Jeschawitz
IBM Certified System Administrator - Websphere MQ, 5.3 |
|
Back to top |
|
 |
kdorre |
Posted: Sun Jul 04, 2004 4:31 pm Post subject: |
|
|
Novice
Joined: 17 Jul 2002 Posts: 15 Location: New Zealand
|
Gunter
Thanks for your info. I looked at the relevant environment variables etc, and nothing changes as the service packs are applied.
The start script is the same from CSD04 to CSD05 and this is where we have the problem.
I think that the problem is something a little more deeper. I think we can survive until the servers are replaced.
here is the script
Regards,
Keith
#!/bin/bash
#
# Initialization / shutdown scripts for MQSeries #
# #
# chkconfig: 2345 50 50
# description: Activates/Deactivates MQ
PATH=/usr/mqm/bin:$PATH
QUEUEMGR=`dspmq|awk '{ print$1 }'|cut -c 8-|sed -e 's/)//'`
case "$1" in
'start')
# Start the Queue Manager
echo "Starting Queue Manager $QUEUEMGR"
/bin/su - mqm -c "strmqm $QUEUEMGR"
# Start MQ Listener
QMGR1STAT=`dspmq | awk "/QMNAME\($QUEUEMGR\)/{print \$2}"`
until [ "$QMGR1STAT"="STATUS(Running)" ]
do
echo "Waiting on QM running condition..."
sleep 2
done
/bin/su - mqm -c "runmqlsr -t tcp -p 1414 -m $QUEUEMGR & >/dev/null
2>&1"
# Start Command Server
echo "Starting Command server: $QUEUEMGR"
/bin/su - mqm -c "strmqcsv $QUEUEMGR >/dev/null &"
# Start Trigger Monitor
echo "Starting Listener: $QUEUEMGR"
/bin/su - mqm -c "runmqtrm -m $QUEUEMGR >/dev/null &"
;;
'stop')
# Stop the Queue Manager
echo "Stopping Queue Manager $QUEUEMGR"
/bin/su - mqm -c "endmqm -i $QUEUEMGR"
QM=`echo $QUEUEMGR | sed -e's/\./!/g'`
num=0
while [ "`tail -7 /var/mqm/qmgrs/$QM/errors/AMQERR01.LOG|grep AMQ8004`" = "" -a $num -le 20 ]
do
echo -n "."
sleep 5
num=$(expr $num + 1)
done
if [ $num -le 20 ] ;
then
echo "$QUEUEMGR stopped successfully"
else
echo "$QUEUEMGR did not shutdown within the required time period"
fi
# Stop the MQ listener
echo "Stopping MQ Listener daemon"
/bin/su - mqm -c "endmqlsr -m $QUEUEMGR"
;;
'restart|force-reload')
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
###################################################### _________________ life, liberty and the persuit of happiness |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Jul 04, 2004 7:57 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
How many queue managers do you have (hardcoded port?)?
Quote: |
/bin/su - mqm -c "runmqlsr -t tcp -p 1414 -m $QUEUEMGR & >/dev/null 2>&1" |
try
Code: |
/bin/su - mqm -c "runmqlsr -m $QUEUEMGR -t tcp -p 1414 &" |
Even though it should not matter our start up scripts look something like this
Code: |
su - mqm start1MQ.sh qmgr port |
where star1MQ.sh is (from memory)
Code: |
#-------- set env variables for trigger monitor ---------
export JAVA_COMPILER=NONE
export ..............
export .............
#---------------- start listener -------------
runmqlsr -m $1 -t tcp -p $2 &
#---------------- start qmgr ---------------
strmqm $1
#---------------- start trigger monitor ----
runmqtrm -m $1 -q INIT_QUEUE &
#---------------- start command server---
strmqcsv $1 |
The shutdown script takes care of matters in reverse order.
The trigger monitor dies when the queue manager shuts down.
This allows us to allocate a port to the listener that is not fixed.
for Machine start up we have a script that calls this one for each queue manager and specifies the listnener port for each queue manager. |
|
Back to top |
|
 |
gunter |
Posted: Tue Jul 06, 2004 7:40 am Post subject: |
|
|
Partisan
Joined: 21 Jan 2004 Posts: 307 Location: Germany, Frankfurt
|
Keith,
the code looks good, exept if you have created more than one queuemanager. I assume, you find the needed information in the error output. Don't pipe 2> to /dev/null if you need feedback from the system.
It's not nessessary to wait for a running queuemanager, if strmqm returns, the queuemanager is running or something is going wrong. You can start the listener even if the queuemanager isn't running.
Gunter _________________ Gunter Jeschawitz
IBM Certified System Administrator - Websphere MQ, 5.3 |
|
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
|
|
|
|