Author |
Message
|
Henry |
Posted: Mon Aug 16, 2004 1:54 am Post subject: No Trigger Message on initQ |
|
|
Acolyte
Joined: 08 Oct 2003 Posts: 73
|
I have an application which is driven by triggering from MQ. The queue is set to be triggered by FIRST. Initially, the programme is successfully triggered by MQ and trigger msg is put onto the initQ. After a period of time, the msg is getting stuck on the local queue but there is not trigger msg in the initQ. I tried to alter the initQ properties from trigger to no trigger and vice versa. there is still no trigger msg put onto the initQ. After that, I tried to disable the get option on the initQ and reset the trigger property on the local queue. There is still no trigger msg on the initQ.
From this fact, I doubted that the queue can't be put any msg. Then I tried to put any msg onto the queue. there is no problem for this put action. After many different things, the problem is solved. But I don't know what is wrong with it.
May I know what is the problem? How can I solve it? |
|
Back to top |
|
 |
PeterPotkay |
Posted: Mon Aug 16, 2004 4:05 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Quote: |
Initially, the programme is successfully triggered by MQ and trigger msg is put onto the initQ.
|
The QM puts a message to the InitQ, which is read by the TriggerMonitor (TM), THEN your program is triggered. You have the order reversed in the above statement.
Quote: |
After a period of time, the msg is getting stuck on the local queue but there is not trigger msg in the initQ
|
Trigger OnFirst queues only trigger when the queue goes from 0 to 1. If the queue has more than zero messages on it, and more messages arrive, you wil not trigger, since the trigger conditions are not met. (See more below though on Trigger Interval.)
Quote: |
I tried to alter the initQ properties from trigger to no trigger and vice versa. there is still no trigger msg put onto the initQ.
|
An Initq should never be triggered. It is the local application queue that is triggered. Leave the InitQ alone.
Code: |
After that, I tried to disable the get option on the initQ and reset the trigger property on the local queue. There is still no trigger msg on the initQ.
|
If you reset the trigger poperty on the app queue, that would have worked, except that you inhibited the InitQ, which violated one of the rules for triggering, so the QM didn't produce a trigger message.
Quote: |
After many different things, the problem is solved. But I don't know what is wrong with it.
|
You probably finally get enabled the InitQ. This would cause the QM to reevaluate all the trigger conditions for any queues that use this InitQ.
Quote: |
May I know what is the problem? How can I solve it?
|
Do a search on this site for Trigger Interval with my name as the author. This has been discussed many times before.
Then go to the Application Programming Guide and print out the chapter on Triggering and study it. All the above questions and problems are explained in that chapter. If you are using any kind of triggering and you don't know this chapter, you are only setting yourself up for problems. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Aug 16, 2004 9:58 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
[
Quote: |
Code: |
After that, I tried to disable the get option on the initQ and reset the trigger property on the local queue. There is still no trigger msg on the initQ.
|
If you reset the trigger poperty on the app queue, that would have worked, except that you inhibited the InitQ, which violated one of the rules for triggering, so the QM didn't produce a trigger message.
|
If your initq is get(disabled), and you are on Unix, the trigger monitor shuts down. You will have to restart it for triggering to work again on this initq.
As Peter said, Check attributes for the application queue and the trigger intervall on the qmgr. We use 300,000 (=5 min)
Enjoy |
|
Back to top |
|
 |
Henry |
Posted: Tue Aug 17, 2004 6:41 pm Post subject: |
|
|
Acolyte
Joined: 08 Oct 2003 Posts: 73
|
Thanks PeterPotKay and fjb_saper!!
I think my problem is the same as the problem - Triggering not happening.
I had read through the reply from PeterPotKay. However, the problem is not solved. I had checked the triger interval of my queue manager. it is set at 5 mins. For my case, after five mins, there is still no trigger msg on the initQ but the msg is still getting stuck in the local queue i.e. Queue.A. Even I have disabled and then enabled the trigger in the Queue.A property, there is still no trigger msg on the initQ. After that, I had restarted the trigger monitor. The application is still not triggered. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Aug 17, 2004 7:13 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
0) OS , OS version, mqversion (mqver)
a) make sure that a trigger monitor is running with the particular environmental variables set (if triggering java prg) and monitoring your trigger queue. Trigger queue must be get enabled. List value for env vars.
b) toggle apps queue for notrigger then trigger.
c) check that the triggered process is running (ps -ef | grep ...)
d) remember the process needs to service the apps queue until empty.
Let us know the results
Nota: Remember that the queue manager will not pickup the new value without recycling. |
|
Back to top |
|
 |
oz1ccg |
Posted: Tue Aug 17, 2004 10:33 pm Post subject: |
|
|
 Yatiri
Joined: 10 Feb 2002 Posts: 628 Location: Denmark
|
show us the queue definitions (application queue and init queue) and process definition using RUNMQSC (or similar) with the trigger monitor running.
Show us also the start command of the trigger monitor.
When we see these information we have a better chance help you.
You can download a working sample for windows NT or similar.
http://mrmq.dk/triggering.htm
Just my $0.02  _________________ Regards, Jørgen
Home of BlockIP2, the last free MQ Security exit ver. 3.00
Cert. on WMQ, WBIMB, SWIFT. |
|
Back to top |
|
 |
Henry |
Posted: Tue Aug 17, 2004 11:49 pm Post subject: |
|
|
Acolyte
Joined: 08 Oct 2003 Posts: 73
|
0) OS : Solaris 8, MQ Version : MQ v5.3 (CSD06)
a) Triggering monitor is running
env vars
MANPATH=/opt/SUNWspro/man:/usr/man:
_INIT_UTS_RELEASE=5.8
HZ=100
_INIT_UTS_MACHINE=sun4u
PATH=/usr/java1.2/bin:/opt/SUNWspro/bin:/opt/mqm/bin:/opt/mqm/samp/bin:/usr/bin:/usr/ucb:/etc:.
_INIT_UTS_VERSION=Generic_108528-25
_INIT_RUN_NPREV=0
CLASSPATH=/usr/java1.2/lib/mailapi.jar:/export/home/mqm/warning/:/usr/java1.2/lib/com.ibm.mq.jar:/usr/java1.2/lib/mail.j
ar:/usr/java1.2/lib/smtp.jar:/usr/java1.2/lib/activation.jar:/export/home/mqm
_INIT_NET_STRATEGY=none
LOGNAME=mqm
_INIT_UTS_NODENAME=mqsprd01
_INIT_UTS_ISA=sparc
MAIL=/var/mail/mqm
_INIT_PREV_LEVEL=S
SHELL=/bin/ksh
HOME=/export/home/mqm
_INIT_UTS_SYSNAME=SunOS
LD_LIBRARY_PATH=/opt/SUNWspro/lib:
TERM=vt100
PWD=/export/home/mqm
TZ=Hongkong
_INIT_RUN_LEVEL=3
_INIT_UTS_PLATFORM=SUNW,Ultra-4
b) did it
c) the triggered process is running
d) the programme gets one msg each time from the queue
The case is happened occassionally.
After doing step b, there is no trigger msg onto the initQ.
************************************************************
The queue definition of the local queue
DESCR() PROCESS(CIA.PR)
BOQNAME( ) INITQ(CIA.QI)
TRIGDATA( ) CLUSTER( )
CLUSNL( ) QUEUE(SHARE.CIA.MDATA.QL)
CRDATE(2002-10-24) CRTIME(06.39.34)
ALTDATE(2004-08-16) ALTTIME(10.04.03)
GET(ENABLED) PUT(ENABLED)
DEFPRTY(0) DEFPSIST(YES)
MAXDEPTH(640000) MAXMSGL(4194304)
BOTHRESH(0) SHARE
DEFSOPT(SHARED) HARDENBO
MSGDLVSQ(PRIORITY) RETINTVL(999999999)
USAGE(NORMAL) TRIGGER
TRIGTYPE(FIRST) TRIGDPTH(1)
TRIGMPRI(0) QDEPTHHI(80)
QDEPTHLO(20) QDPMAXEV(ENABLED)
QDPHIEV(DISABLED) QDPLOEV(DISABLED)
QSVCINT(999999999) QSVCIEV(NONE)
DISTL(NO) DEFTYPE(PREDEFINED)
TYPE(QLOCAL) SCOPE(QMGR)
DEFBIND(OPEN) IPPROCS(0)
OPPROCS(1) CURDEPTH(0)
The initQ definition
dis ql(cia.qi)
DESCR() PROCESS( )
BOQNAME( ) INITQ( )
TRIGDATA( ) CLUSTER( )
CLUSNL( ) QUEUE(CIA.QI)
CRDATE(2002-10-24) CRTIME(06.39.32)
ALTDATE(2004-07-02) ALTTIME(18.25.53)
GET(ENABLED) PUT(ENABLED)
DEFPRTY(0) DEFPSIST(NO)
MAXDEPTH(5000) MAXMSGL(4194304)
BOTHRESH(0) SHARE
DEFSOPT(SHARED) HARDENBO
MSGDLVSQ(PRIORITY) RETINTVL(999999999)
USAGE(NORMAL) NOTRIGGER
TRIGTYPE(FIRST) TRIGDPTH(1)
TRIGMPRI(0) QDEPTHHI(80)
QDEPTHLO(20) QDPMAXEV(ENABLED)
QDPHIEV(DISABLED) QDPLOEV(DISABLED)
QSVCINT(999999999) QSVCIEV(NONE)
DISTL(NO) DEFTYPE(PREDEFINED)
TYPE(QLOCAL) SCOPE(QMGR)
DEFBIND(OPEN) IPPROCS(2)
OPPROCS(0) CURDEPTH(0)
The process defintion
dis process(cia.pr)
DESCR()
APPLICID(java CiaTrigger) USERDATA( )
ENVRDATA( ) PROCESS(CIA.PR)
ALTDATE(2002-10-24) ALTTIME(06.39.35)
APPLTYPE(UNIX)
************************************************************
The command that start the trigger monitor
runmqtrc -q CIA.QI
Pls let me know if any more information is required.
Thanks!! |
|
Back to top |
|
 |
oz1ccg |
Posted: Wed Aug 18, 2004 2:25 am Post subject: |
|
|
 Yatiri
Joined: 10 Feb 2002 Posts: 628 Location: Denmark
|
No clues yet...
It seems to me taht there are two trigger monitors running ??
( dis ql(cia.qi) : IPPROCS(2) ) have you started two ??
Have anyting gone to DLQ ???
The trigger monitor will normally place the triggermessage there if a failure happend ??
Have you defined the DLQ on the queuemanager ??
just my $0.02  _________________ Regards, Jørgen
Home of BlockIP2, the last free MQ Security exit ver. 3.00
Cert. on WMQ, WBIMB, SWIFT. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Aug 18, 2004 6:54 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
The process needs to release its hold on the queue as soon as it is done processing all the messages:
If the qmgr thinks there is still a process servicing the queue, there is no need to create a trigger message as this process is supposed to "process" the incoming message...
Do not rely only on curdepth. If the message is uncommitted curdepth will still show 1 but the message is not "getable"
Enjoy |
|
Back to top |
|
 |
oz1ccg |
Posted: Wed Aug 18, 2004 10:47 am Post subject: |
|
|
 Yatiri
Joined: 10 Feb 2002 Posts: 628 Location: Denmark
|
The process is not running:
QUEUE(SHARE.CIA.MDATA.QL) IPPROCS(0) OPPROCS(1)
The CiaTrigger program get messages from SHARE.CIA.MDATA.QL, right ??
You have not started it on the init queue, right
Just my $0.02  _________________ Regards, Jørgen
Home of BlockIP2, the last free MQ Security exit ver. 3.00
Cert. on WMQ, WBIMB, SWIFT. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Aug 18, 2004 4:08 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Read up on how you start a trigger monitor
Looks to me you are running a client trigger monitor
(runmqtrc)
If the qmgr is on the same machine run:
Code: |
runmqtrm -m qmgr -q init.queue & |
If you truly meant to run a client trigger monitor what is your environment variable set to to connect ?
Enjoy |
|
Back to top |
|
 |
Henry |
Posted: Wed Aug 18, 2004 5:41 pm Post subject: |
|
|
Acolyte
Joined: 08 Oct 2003 Posts: 73
|
It is right that there are two trigger monitors running.
there is no trigger msg fallen into the DLQ. [color=orange]That's why I can't figure out what is the problem
I had defined the DLQ on the queue manager.[/color]
That's right that the CiaTrigger program is getting msgs from the SHARE.CIA.MDATA.QL. However, I am not understand what you mean "
You have not started it on the init queue". Is it said the CiaTrigger program cannot be triggered by the triggering?
The program isn't running on the same machine. It is running as a client tirgger. The program is written in Java. It is not relied on the env vars except the classpath and path. I m sure that the classpath and the patch are set correctly.
Also, I would like to point out that the case happen somehow but not frequently.
Thanks!! |
|
Back to top |
|
 |
oz1ccg |
Posted: Thu Aug 19, 2004 6:00 am Post subject: |
|
|
 Yatiri
Joined: 10 Feb 2002 Posts: 628 Location: Denmark
|
Why do you have two trigger monitors running ????
Quote: |
Also, I would like to point out that the case happen somehow but not frequently. The program isn't running on the same machine. |
You say the program is running on another machine. This might be the clue, especially when it's not a permanent problem....
The reason could be that the client connetion is not terminated correctly, and therefore continues to have the SHARE.CIA.MDATA.QL open for input.
When you see the problem, try a DIS QL(SHARE.CIA.MDATA.QL) ALL and see the value of IPPROCS( ). If you like a trigger_first to be generated IPPROCS shall be 0. If IPPROCS > 0 you get no trigger!
Just my $0.02  _________________ Regards, Jørgen
Home of BlockIP2, the last free MQ Security exit ver. 3.00
Cert. on WMQ, WBIMB, SWIFT. |
|
Back to top |
|
 |
Henry |
Posted: Fri Aug 20, 2004 12:40 am Post subject: |
|
|
Acolyte
Joined: 08 Oct 2003 Posts: 73
|
The purpose to use two trigger monitors is mainly for Load Balancing or as a backup. What I mean for another machine is different machine from the MQ Server. In other words, the machine is a client which is not on the same server as the MQ Manager. However, the trigger monitor is running on the same machine with the triggered program.
When the problem happened, the IPPROCS is 0. That's why I don't know what is the cause. |
|
Back to top |
|
 |
oz1ccg |
Posted: Fri Aug 20, 2004 7:25 am Post subject: |
|
|
 Yatiri
Joined: 10 Feb 2002 Posts: 628 Location: Denmark
|
Personally I'm using shell scripts to be invoked instead of executing the program directly. This is also giving me the opertunity to see what happens (echo something to a logfile).
Anyway, what happens where there are messages in the queue and the trigger have not been fired, and you changes TRIGGER->NOTRIGGER and back to TRIGGER ??
Are you getting a trigger message ??
I have to ask once more (to be shure ) , are the trigger monitors running on the same machine as the queue manager ?? If your trigger monitor is using a mq-client connection, and the connection gets broken, the trigger monitor might not know and your queuemanager might know and the CIA.QI might not be opend for input. ....
Another thing to examine: Is the CIA.QI queue open for input ?
Another thing about triggering is that you can have the trigger event before the message is really available, this can cause your program to start, try getting and close before the message is released....
I spend about a month some years back tracing this phenomen, me and my colleagues had some discustions about how this was working/should work etc. But it worked as designed (and documented).
So how does your program handle the NO_MESSAGE_AVAILABLE condition, is it reporting something or just shutting down quietly ?
Just my $0.02  _________________ Regards, Jørgen
Home of BlockIP2, the last free MQ Security exit ver. 3.00
Cert. on WMQ, WBIMB, SWIFT. |
|
Back to top |
|
 |
|