Author |
Message
|
saikrishna |
Posted: Thu Nov 05, 2015 11:17 pm Post subject: Triggering concept |
|
|
Novice
Joined: 29 Jul 2015 Posts: 21
|
Hi All
Am doing POC on triggering an application (simple .bat file which contains echo statement)
I have created initQ,LocalQ,Processdefination, and service for starting triggermonitor.
My problem is
triggering wokrs fine if I am starting triggermonitor via command
but triggering was not working if I am starting monitor as service which I configured in services |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Nov 05, 2015 11:52 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
So what exactly is 'not working'? We really need more data in order to help you.
Any errors in the QMGR error log?
Anything reported in the System Event Log?
Please show us the config for the Trigger monitor service. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
saikrishna |
Posted: Fri Nov 06, 2015 12:28 am Post subject: |
|
|
Novice
Joined: 29 Jul 2015 Posts: 21
|
I wanna trigger an application (.bat file)
Application is triggering when am turning on trigger monitor in command console but,
Application is not triggering when am turning on trigger monitor as an service
no logs were updated
RUNMQTRM -m TRIGGER.QMGR -q INITIATION.QUEUE
smdavies99 wrote: |
So what exactly is 'not working'? We really need more data in order to help you.
Any errors in the QMGR error log?
Anything reported in the System Event Log?
Please show us the config for the Trigger monitor service. |
|
|
Back to top |
|
 |
saikrishna |
Posted: Fri Nov 06, 2015 1:04 am Post subject: |
|
|
Novice
Joined: 29 Jul 2015 Posts: 21
|
PFB triggering application when I ran trigger monitor via command
C:\Users\406128>runmqtrm -m reci -q initiation.queue
5724-H72 (C) Copyright IBM Corp. 1994, 2011. ALL RIGHTS RESERVED.
11/6/2015 14:31:04: WebSphere MQ trigger monitor started.
__________________________________________________
11/6/2015 14:31:04: Waiting for a trigger message
"D:\hi.bat "TMC 2application.queue process.name
C:\Users\406128>echo hi
hi
C:\Users\406128>start chrome https://www.google.co.in/
C:\Users\406128>pause
Press any key to continue . . .
11/6/2015 14:31:10: End of application trigger.
__________________________________________________
11/6/2015 14:31:10: Waiting for a trigger message
"D:\hi.bat "TMC 2application.queue process.name
C:\Users\406128>echo hi
hi
C:\Users\406128>start chrome https://www.google.co.in/
C:\Users\406128>pause
Press any key to continue . . .
11/6/2015 14:31:14: End of application trigger.
__________________________________________________
11/6/2015 14:31:14: Waiting for a trigger message
but I cant trigger application when am starting it via service
[/img] |
|
Back to top |
|
 |
Inisah |
Posted: Fri Nov 06, 2015 1:55 am Post subject: |
|
|
Apprentice
Joined: 21 Mar 2014 Posts: 44
|
Can you please paste the servicedefinition here so that we can take a look |
|
Back to top |
|
 |
smdavies99 |
Posted: Fri Nov 06, 2015 2:14 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Inisah wrote: |
Can you please paste the servicedefinition here so that we can take a look |
Which I asked for earlier but does not seem to be forthcoming
Also putting a
PAUSE
in a trigger .bat files is a waster of time because it runs in a detatched mode.
I really hope that your
"start chrome ''' "
Is just for testing because where do you expect the window to pop up?
Triggering does take a bit of work to get your mind around.
Rather than starting chrome why not put a message to another queue using the amqsput utility. Then you will have a timestaped log of when the trigger fired. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
saikrishna |
Posted: Fri Nov 06, 2015 3:24 am Post subject: |
|
|
Novice
Joined: 29 Jul 2015 Posts: 21
|
service name:TriggerMonitor
Start cmd:C:\Program Files\IBM\WebSphere MQ\bin\runmqtrm
start args:-m reci -q initiation.queue
Inisah wrote: |
Can you please paste the servicedefinition here so that we can take a look |
|
|
Back to top |
|
 |
saikrishna |
Posted: Fri Nov 06, 2015 3:26 am Post subject: |
|
|
Novice
Joined: 29 Jul 2015 Posts: 21
|
Just for popping of window only I gave start chrome
My doubt is
Triggering was happening if I start trigger monitor via cmd.
but triggering was not happening when I start trigger via service defination
even i can see input count initQ
smdavies99 wrote: |
Inisah wrote: |
Can you please paste the servicedefinition here so that we can take a look |
Which I asked for earlier but does not seem to be forthcoming
Also putting a
PAUSE
in a trigger .bat files is a waster of time because it runs in a detatched mode.
I really hope that your
"start chrome ''' "
Is just for testing because where do you expect the window to pop up?
Triggering does take a bit of work to get your mind around.
Rather than starting chrome why not put a message to another queue using the amqsput utility. Then you will have a timestaped log of when the trigger fired. |
|
|
Back to top |
|
 |
smdavies99 |
Posted: Fri Nov 06, 2015 5:02 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
So... to repeat what I said at the beginnig
Are there any errors in the Windows Event Log?
Are there any error logged in the Queue Manager logs?
It is far bettter to define these things via a script rather then just using the GUI (MQExplorer)
you need the following MQ Objects to be defined
1) An local queue configured as an Init Q
2) A Process definition
3) A Service definition
4) A local queue where the message that will initiate the trigger is put.
It is the SERVICE object that starts/stops the trigger monitor.
The PROCESS Definition defines the .exe or .bat or .cmd that is run as part of the trigger
The init Q used the PROCESS part to point to the PROCESS Object. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
gbaddeley |
Posted: Sun Nov 08, 2015 10:19 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
saikrishna wrote: |
service name:TriggerMonitor
Start cmd:C:\Program Files\IBM\WebSphere MQ\bin\runmqtrm
start args:-m reci -q initiation.queue
Inisah wrote: |
Can you please paste the servicedefinition here so that we can take a look |
|
Are you defining something like:
Code: |
define service('TRIGMON.SERVICE') replace +
control(qmgr) servtype(server) descr('Trigger Monitor') +
startcmd('+MQ_INSTALL_PATH+bin\runmqtrm.exe') +
startarg('-m +QMNAME+ -q SYSTEM.DEFAULT.INITIATION.QUEUE') +
stopcmd('+MQ_INSTALL_PATH+bin\amqsstop.exe') +
stoparg('-m +QMNAME+ -p +MQ_SERVER_PID+') +
stdout('C:\trigmonlogs\stdout.log') +
stderr('C:\trigmonlogs\stderr.log')
start service('TRIGMON.SERVICE') |
_________________ Glenn |
|
Back to top |
|
 |
smdavies99 |
Posted: Sun Nov 08, 2015 10:35 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
gbaddeley wrote: |
saikrishna wrote: |
service name:TriggerMonitor
Start cmd:C:\Program Files\IBM\WebSphere MQ\bin\runmqtrm
start args:-m reci -q initiation.queue
Inisah wrote: |
Can you please paste the servicedefinition here so that we can take a look |
|
Are you defining something like:
Code: |
define service('TRIGMON.SERVICE') replace +
control(qmgr) servtype(server) descr('Trigger Monitor') +
startcmd('+MQ_INSTALL_PATH+bin\runmqtrm.exe') +
startarg('-m +QMNAME+ -q SYSTEM.DEFAULT.INITIATION.QUEUE') +
stopcmd('+MQ_INSTALL_PATH+bin\amqsstop.exe') +
stoparg('-m +QMNAME+ -p +MQ_SERVER_PID+') +
stdout('C:\trigmonlogs\stdout.log') +
stderr('C:\trigmonlogs\stderr.log')
start service('TRIGMON.SERVICE') |
|
Using a SYSTEM object for an application? Tut-tut.
{see my previous post} _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
gbaddeley |
Posted: Mon Nov 09, 2015 3:06 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
smdavies99 wrote: |
Using a SYSTEM object for an application? Tut-tut.
{see my previous post} |
Arguably a trigger monitor should use a dedicated initiation queue. In the many many MQ shops that I have seen, the system queue seems to be in common usage if there is only one trigger monitor, and it is not for CICS.
A trigger monitor should only be set up if there is a requirement, and it should be locked down as much as practical. _________________ Glenn |
|
Back to top |
|
 |
|