21 Nov 19:07
Re: Help with v6 services
T.Rob,
This came up recently via service as well. Here is the solution provided
to another customer.
<><>
The setup applies
equally to a SERVTYPE of SERVER.
.
The way that strings can be defined to runmqsc does not allow the full
range of arguments to be passed to runmqdlq, e.g. the blank strings
used to define the qmgr's DLQ, or the default qmgr. Also, the service
manager process cannot call runmqdlq and redirect stdin for the app to
take its input from a file. For these reasons, I recommend that the
runmqdlq service is started by defining a script in STARTCMD, and for
that script to call runmqdlq with the required arguments.
.
For example:
.
I want to use the qmgr's defined DLQ, and to load the rules from a
file. I define the service like this:
.
DEFINE SERVICE(DLQH) + CONTROL(QMGR) + DESCR('DLQ Handler Service') +
SERVTYPE(COMMAND) + STARTCMD('/opt/mqm/bin/go.dlq') +
STDOUT('/var/mqm/errors/dlq.out') +
STDERR('/var/mqm/errors/dlq.err') REPLACE
.
The file /opt/mqm/bin/go.dlq looks like this:
.
#! /bin/ksh
runmqdlq ' ' NG2 < opt/mqm/bin/dlq.rules
.
and opt/mqm/bin/dlq.rules:
.
WAIT(YES)
REASON(*) ACTION(FWD) FWDQ(FWDQ)
------------------------------------------------------------------------
SERVICE(SYSTEM.DEAD.LETTER.HANDLER)
CONTROL(QMGR)
SERVTYPE(COMMAND)
STARTCMD(/u/mqm/strdlqH.sh)
STARTARG(QM_ECLIPSE.DEAD.QUEUE QM_ECLIPSE)
STOPCMD( )
STOPARG( )
STDOUT(/var/mqm/errors/QM_ECLIPSE_dlq.out)
STDERR(/var/mqm/errors/QM_ECLIPSE_dlq.err)
DESCR(System DLQ Handler)
My script is:
#! /bin/ksh
/opt/mqm/bin/runmqdlq £1 £2 </u/mqm/files/ctp.dlq.prm
<><>
Cheers
Morag
Morag Hughson
WebSphere MQ Development
Internet: hughson@...
Todd R Wyatt <t.rob.wyatt@...>
Sent by: MQSeries List <MQSERIES@...>
21/11/2006 15:20
Please respond to
MQSeries List <MQSERIES@...>
To
MQSERIES@...
cc
Subject
Help with v6 services
I am having some difficulty defining a service for the DLQ handler. When
I run this service:
DEFINE SERVICE(RUNMQDLQ) +
CONTROL(QMGR) +
SERVTYPE(SERVER) +
STARTCMD('/usr/bin/runmqdlq') +
STARTARG('+QMNAME+.DEAD.QUEUE +QMNAME+ </var/mqm/rulestable') +
STDOUT('/var/mqm/runmqdlq.log') +
STDERR('/var/mqm/runmqdlq.log') +
STOPARG('kill -9 +MQ_SERVER_PID+') +
REPLACE
I get this error:
2006-11-21 10.04.02 AMQ8708: Dead-letter queue handler started to
process INPUTQ(VENUS.DEAD.QUEUE).
syntax error on line 1
...2006-11-21 10.06.39 AMQ8758: 1 errors detected in input to
runmqdlq.
2006-11-21 10.06.39 AMQ8709: Dead-letter queue handler ending.
Yet when I copy the paramters out of the service definition and run them
from the command line, everything works fine:
nohup /usr/bin/runmqdlq VENUS.DEAD.QUEUE VENUS </var/mqm/rulestable
>/var/mqm/runmqdlq.log 2>&1 &
2006-11-21 10.04.02 AMQ8708: Dead-letter queue handler started to
process INPUTQ(VENUS.DEAD.QUEUE).
<no additional input as DLQ is waiting on messages to arrive>
Any ideas why this is not working? Anyone have a known working service
definition for runmqdlq I can look at?
Thanks -- T.Rob
T.Robert Wyatt, Consulting IT Specialist
IBM Software Services for Websphere
email: t.rob.wyatt@...
704-719-2107 Access Line
To unsubscribe, write to LISTSERV@... and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html
To unsubscribe, write to LISTSERV@... and,
in the message body (not the subject), write: SIGNOFF MQSERIES
RSS Feed