Author |
Message
|
Rahamath |
Posted: Tue Aug 15, 2017 4:10 am Post subject: Trigger Service |
|
|
Newbie
Joined: 14 Aug 2017 Posts: 3
|
Dear Team,
Can you please help me below issue
I was enabled trigger on a local queue which is going to execute a batch file in windows.
It is working fine with the command "runmqtrm".
While I was trying to create a service for the trigger monitor, trigger is not working.
Messages are getting stucked in initiation queue.
I'm able to see the service is in running state, still process in not getting invoked. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Aug 15, 2017 4:15 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
What 'service"?
What user is the service being run as?
What is the error/return code you get when the service when the trigger is not working?
Is the service using the mq profile? _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
gbaddeley |
Posted: Tue Aug 15, 2017 4:19 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
Is runmqtrm continuously reading the initiation queue? (ipprocs = 1)
Are you capturing the standard output and error output of runmqtrm to files? This will show if runmqtrm is unable to run the command.
What is the definition of your SERVICE object? _________________ Glenn |
|
Back to top |
|
 |
Rahamath |
Posted: Tue Aug 15, 2017 9:18 pm Post subject: |
|
|
Newbie
Joined: 14 Aug 2017 Posts: 3
|
Thank You.....
We are using below command for creating Service
DEFINE SERVICE(samps) SERVTYPE(SERVER) CONTROL(MANUAL) STARTCMD('.bat file') DESCR('server service') STARTARG(' LQ TEST1< rul.rul') STDOUT('log.txt') STDERR('err.txt')
But the service going stopped state with in 10 seconds. |
|
Back to top |
|
 |
exerk |
Posted: Tue Aug 15, 2017 11:45 pm Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Is your command really STARTCMD('.bat file') ? Should it not be something like STARTCMD('C:\Temp\trigger.bat') ? _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Aug 16, 2017 4:17 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You have nicely given yourself
Quote: |
]STDOUT('log.txt') STDERR('err.txt') |
I hope they show more information... Even a lack of information could be valuable. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Aug 16, 2017 4:50 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
exerk wrote: |
Is your command really STARTCMD('.bat file') ? Should it not be something like STARTCMD('C:\Temp\trigger.bat') ? |
Probably more like
Code: |
+MQINSTALLPATH+\bin64\runmqtrm |
 _________________ MQ & Broker admin |
|
Back to top |
|
 |
exerk |
Posted: Wed Aug 16, 2017 4:53 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
fjb_saper wrote: |
Probably more like
Code: |
+MQINSTALLPATH+\bin64\runmqtrm |
 |
If he/she is using the service to start the trigger monitor on the triggered queue, and is not doing it external to the queue manager, yes... _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
gbaddeley |
Posted: Wed Aug 16, 2017 5:24 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
Quote: |
While I was trying to create a service for the trigger monitor, trigger is not working |
The service needs to start the trigger monitor program (runmqtrm) when the qmgr comes up, not start your application.
The trigger monitor will run continuously, processing all incoming trigger messages on its trigger initiation queue. Its logs show all the messages.
Each trigger message specifies the app and command arguments that the trigger monitor will start, based on the attributes of the triggered queue.
The service should look something like this:
Code: |
define service('MY.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:\MqData\trigmon-stdout.log')
stderr('C:\MqData\trigmon-stderr.log') |
_________________ Glenn |
|
Back to top |
|
 |
|