Author |
Message
|
PeterPotkay |
Posted: Tue Jan 15, 2013 5:20 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
ravi_sri24 wrote: |
it's not working as expected when I have configured Trigger Monitor as a service, I can see message coming into Initiation queue but it's not invoking calc.exe.
but when I run the trigger monitor through command prompt it's working. |
You see the messages coming INTO the Init Q, but you didn't say they were going out. So the Init Q is filling up? _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Jan 15, 2013 11:58 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
ravi_sri24 wrote: |
it's not working as expected when I have configured Trigger Monitor as a service, I can see message coming into Initiation queue but it's not invoking calc.exe.
but when I run the trigger monitor through command prompt it's working. |
Working as designed.
What ever let you believe that you could run a foreground application requiring interaction like calc.exe as a triggered program?
ALL YOUR TRIGGERED PROGRAMS NEED TO BE ABLE TO RUN AS BACKGROUND PROCESSES.
Again, working as designed. Move on.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
ravi_sri24 |
Posted: Wed Jan 16, 2013 5:10 am Post subject: |
|
|
Voyager
Joined: 11 May 2006 Posts: 83
|
Hi,
Can any one of you please help me on running the trigger monitor in background process as it was not working as expected when I have configured through Services.
If possible can any one try on your local machine by simply calling calculator.
My current MQ Version is :7.0.1.5 |
|
Back to top |
|
 |
Vitor |
Posted: Wed Jan 16, 2013 5:40 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
ravi_sri24 wrote: |
If possible can any one try on your local machine by simply calling calculator. |
Did you read this? If so why are you apparently ignoring it?
fjb_saper wrote: |
What ever let you believe that you could run a foreground application requiring interaction like calc.exe as a triggered program?
ALL YOUR TRIGGERED PROGRAMS NEED TO BE ABLE TO RUN AS BACKGROUND PROCESSES. |
_________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
ravi_sri24 |
Posted: Wed Jan 16, 2013 6:37 am Post subject: |
|
|
Voyager
Joined: 11 May 2006 Posts: 83
|
Vitor wrote: |
ravi_sri24 wrote: |
If possible can any one try on your local machine by simply calling calculator. |
Did you read this? If so why are you apparently ignoring it?
fjb_saper wrote: |
What ever let you believe that you could run a foreground application requiring interaction like calc.exe as a triggered program?
ALL YOUR TRIGGERED PROGRAMS NEED TO BE ABLE TO RUN AS BACKGROUND PROCESSES. |
|
Hi Vitor,
it's not the issue with triggered program, it's the issue with trigger monitor(runmqtrm)
because as soon as message comes into local queue, queue manager taking the information and sending it to Initiation after that trigger monitor should read the message from initiation queue and invoke the calc.exe but it's not
but when I ran the trigger monitor through command prompt it's working and invoking calc.exe
I hope it's clear now what exactly issue I am having. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Jan 16, 2013 6:50 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
ravi_sri24 wrote: |
I hope it's clear now what exactly issue I am having. |
Yes. The issue that you're having is that you think that a trigger monitor running as a background process will invoke calc.exe.
It won't. Because calc.exe does not work when started as a background process. Even if it starts (and it might do under more modern versions of Windoze) you won't see anything because it's a foreground process running in a different screen context to the one you're using.
I hope it's now clear what you've been told repeatedly. Trigger something that doesn't involve the screen (like a bat file which writes to the disk) and see what happens. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
ravi_sri24 |
Posted: Wed Jan 16, 2013 8:24 am Post subject: |
|
|
Voyager
Joined: 11 May 2006 Posts: 83
|
Vitor wrote: |
ravi_sri24 wrote: |
I hope it's clear now what exactly issue I am having. |
Yes. The issue that you're having is that you think that a trigger monitor running as a background process will invoke calc.exe.
It won't. Because calc.exe does not work when started as a background process. Even if it starts (and it might do under more modern versions of Windoze) you won't see anything because it's a foreground process running in a different screen context to the one you're using.
I hope it's now clear what you've been told repeatedly. Trigger something that doesn't involve the screen (like a bat file which writes to the disk) and see what happens. |
Thanks Vitor for your response.
I have written a java program to read the message from queue and generate a file. after that I put command in batch file and trying to trigger the java program when message placed onto queue but still that is also not working
I can see message coming into initiation queue with appropriate details but it's not invoking the application. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Jan 16, 2013 8:50 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
ravi_sri24 wrote: |
I have written a java program to read the message from queue and generate a file. after that I put command in batch file and trying to trigger the java program when message placed onto queue but still that is also not working |
Far too many moving parts - how do you know you're not getting a Java error because the triggered service has an incorrect (or no) classpath.
Remember the entire point of this, and why it works from a command prompt is that the command prompt is running as your logged on user with all that implies. The triggered service is not. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
ravi_sri24 |
Posted: Thu Jan 17, 2013 1:12 am Post subject: |
|
|
Voyager
Joined: 11 May 2006 Posts: 83
|
Vitor wrote: |
ravi_sri24 wrote: |
I have written a java program to read the message from queue and generate a file. after that I put command in batch file and trying to trigger the java program when message placed onto queue but still that is also not working |
Far too many moving parts - how do you know you're not getting a Java error because the triggered service has an incorrect (or no) classpath.
Remember the entire point of this, and why it works from a command prompt is that the command prompt is running as your logged on user with all that implies. The triggered service is not. |
thanks Vitor,
before configuring trigger monitor for Java program I have already tested and it was picking the messages from queue and processing.
so do I need to configure the trigger service from using my-id, if so how it's possible.
as per my understanding trigger monitor is controled by qmgr.
Can any one of you please test in your local machines and send me your thoughts, triggering configuration will not take more than 10 mins. |
|
Back to top |
|
 |
exerk |
Posted: Thu Jan 17, 2013 2:23 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
ravi_sri24 wrote: |
before configuring trigger monitor for Java program I have already tested and it was picking the messages from queue and processing. |
So you've proved the application works.
ravi_sri24 wrote: |
so do I need to configure the trigger service from using my-id, if so how it's possible. |
You need to configure the environment that your application runs in when triggered - now think of what that statement implies.
ravi_sri24 wrote: |
as per my understanding trigger monitor is controled by qmgr. |
If you have set up your particular trigger monitor that way, yes.
ravi_sri24 wrote: |
Can any one of you please test in your local machines and send me your thoughts, triggering configuration will not take more than 10 mins. |
No. One, I do not have the time, and two, I cannot recreate your environment which is the only way to validate a test. _________________ 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 |
|
 |
Vitor |
Posted: Thu Jan 17, 2013 7:09 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
ravi_sri24 wrote: |
before configuring trigger monitor for Java program I have already tested and it was picking the messages from queue and processing. |
So it works for you like calc.exe does. Yay.
ravi_sri24 wrote: |
so do I need to configure the trigger service from using my-id, if so how it's possible. |
No.
ravi_sri24 wrote: |
as per my understanding trigger monitor is controled by qmgr. |
No, it's controlled by a message arriving on the relevant queue. It's started by whatever you want (and typically an service id like the queue manager's as you correctly say).
ravi_sri24 wrote: |
Can any one of you please test in your local machines and send me your thoughts, triggering configuration will not take more than 10 mins. |
You're asking us to test if triggering works? It does. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Jan 17, 2013 7:18 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You shouldn't run the trigger monitor directly as a qmgr service.
That runs it as the mq service user. That's way too much access to a queue manager for a trigger monitor.
You should not allow the trigger monitor to directly launch the triggered application. it does not give you enough room to configure the environment the application runs in.
You should configure a queue manager service that runs a script.
That script should run the trigger monitor as an application level user, not as the queue manager service user. This is accomplished on unix using the command 'su' and on windows using the command 'contact admin'.
The Process definition that the trigger monitor reads should be configured to run a script.
That script should launch the actual triggered application, again likely using su or contact admin to run the triggered application as the *correct* user, rather than as the user running the queue manager or the user running the trigger monitor. It will also be able to configure the environment that the application runs in so that it has all of the necessary configuration to be successful.
On windows, if you persist in your current path, you can alter the properties of the Windows Service that is running MQ Series itself to allow it to interact with the desktop. This is a poor idea in general, but you might find that it then allows the trigger monitor to open in a visible window and allows the triggered program to open in a visible window.
Oh, and if your Java program somehow requires *human* input and *a visible UI*, you have still failed to understand the problem with trying to launch calc.exe. |
|
Back to top |
|
 |
roshan.171188 |
Posted: Sun Jan 20, 2013 6:58 pm Post subject: hello |
|
|
Apprentice
Joined: 07 Jun 2012 Posts: 35
|
|
Back to top |
|
 |
exerk |
Posted: Mon Jan 21, 2013 12:44 am Post subject: Re: hello |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Did you not read the post immediately previous to yours? Most notably the first line of the that post? _________________ 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 |
|
 |
bruce2359 |
Posted: Mon Jan 21, 2013 5:46 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
mqjeff wrote: |
You shouldn't run the trigger monitor directly as a qmgr service.
That runs it as the mq service user. That's way too much access to a queue manager for a trigger monitor.
|
For clarity, an app running as mqm has all authority. A trigger monitor should only have sufficient authority to start apps that it is required to start.
A trigger monitor that needs to start a payroll app, for example, should only have authority sufficient to start payroll apps - and NOT mqm authority. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
|