Author |
Message
|
mqxplorer |
Posted: Wed Jul 06, 2011 12:52 pm Post subject: MQ Triggering Issue |
|
|
 Master
Joined: 22 Jun 2009 Posts: 206
|
Hi,
I am trying to implement triggering for a queue which is an error queue of the error handler subflow. This flow handles a high volume of messages and the message order is important. This flow starts with an MQInput and invokes a web service. As the message transformation is very minimal, the chances of getting exceptions can be mostly due to the web service unavailability. As the flow handles high volume of messages, we would like to have the MQ triggering for the error queue so that, if the error queue mesage count changes from 0 to 1, a script that has the mqsistopmsgflow command will be executed and the flow will be stopped so that no more further invocation of the web service will be performed.
I have used the below command to start the trigger monitor...
Quote: |
nohup runmqtrm -m BRKDEV_QM -q SYSTEM.DEFAULT.INITIATION.QUEUE & |
When a message arrrives in the error queue, below error is thrown...
Quote: |
BIP1046E: Unable to connect with the queue manager (Could not connect to queue manager 'BRKDQMGR' (MQ reason code 2495)).
The utility encountered a problem while attempting to connect to the queue manager to put a message to the broker's request queue.
Ensure that the correct connection parameters have been supplied to the utility. Also ensure that the queue manager is running and that the current user is able to access the queues beginning SYSTEM.BROKER. If this error text includes an MQ reason code, look up the meaning behind the error in the Application Programming Reference guide and proceed as appropriate.
07/06/2011 03:06:14 PM : End of application trigger. |
I have searched the forum with the BIP code but could not find any solution.....
Could someone suggest where I am going wrong...
Thanks
mqxplorer |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Jul 06, 2011 3:33 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Try searching for the reason code in MQ. Fix that first.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqxplorer |
Posted: Thu Jul 07, 2011 5:47 am Post subject: |
|
|
 Master
Joined: 22 Jun 2009 Posts: 206
|
Hi Saper,
I tried searching for the reason code but could not find anything related to triggering. It says 2495 0x000009bf MQRC_MODULE_NOT_FOUND Actually, the scrpit starts executing and it shows us the echo line..
Quote: |
Stop the adapter flow |
and then the error starts...
The scripts which is specified in the applicID of the process definition has just an echo statement and the comamnd to stop the flow.
mqsistopmsgflow BRKDEV -e EG1 -m AdapterFlow
Is it something to do with the mqsistopmsgflow command execution...?
Thanks
mqxplorer |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jul 07, 2011 5:52 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqxplorer wrote: |
Is it something to do with the mqsistopmsgflow command execution...? |
It could be, if the triggered script isn't sourcing the mqsiprofile correctly before executing the command. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqxplorer |
Posted: Thu Jul 07, 2011 10:26 am Post subject: |
|
|
 Master
Joined: 22 Jun 2009 Posts: 206
|
Vitor,
I have executed the script manually ./Sample.sh in the command line and it executes perfctly and stops the flow. It gives the error only when script is executed using triggering mecahnism. I guess, If the script isn't sourcing the mqsiprofile correctly before executing the command, it would not work for the command line script execution also.. Is that wrong?
Thanks
mqxplorer |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jul 07, 2011 10:34 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqxplorer wrote: |
I guess, If the script isn't sourcing the mqsiprofile correctly before executing the command, it would not work for the command line script execution also.. Is that wrong? |
Provided that when you run the script manually you're running it from a standard command prompt not the one that WMB creates as part of the install then it all sounds reasonable.
But that error does sound like an path/environment error more than it sounds like anything else. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jul 07, 2011 12:43 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
mqxplorer wrote: |
Vitor,
I have executed the script manually ./Sample.sh in the command line and it executes perfctly and stops the flow. It gives the error only when script is executed using triggering mecahnism. I guess, If the script isn't sourcing the mqsiprofile correctly before executing the command, it would not work for the command line script execution also.. Is that wrong?
Thanks
mqxplorer |
But did you run it as the user running the trigger monitor, with the same environment?
Piece of advice force the environment by sourcing mqsiprofile in your script.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jul 07, 2011 1:01 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
fjb_saper wrote: |
But did you run it as the user running the trigger monitor, with the same environment? |
Good catch!
Does your user id source the profile automatically where the trigger monitor's does not? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqxplorer |
Posted: Fri Jul 08, 2011 12:19 pm Post subject: |
|
|
 Master
Joined: 22 Jun 2009 Posts: 206
|
Vitor and Saper,
Thanks for your inputs... I cahnged my script by adding the line
Quote: |
. /opt/ibm/mqsi/7.0/bin/mqsiprofile |
and it worked....
Thanks a lot.
Thanks
mqxplorer |
|
Back to top |
|
 |
|