Author |
Message
|
rahuldhanpal |
Posted: Fri Jul 08, 2011 4:28 am Post subject: trigger monitor |
|
|
Voyager
Joined: 24 Jan 2009 Posts: 84 Location: Kenosha WI
|
Guys,
i am trying to run a script using the trigger monitor.. here are the details
Platform details: MQ V7/MB V7 on RHEL V5.5
the script which gets executed when trigger monitor runs will try to stop a message flow on broker whenever a message lands in the queue which is configured for triggering.
the steps performed
1. dis ql(STDNTUPD_GBO_STARS_ERROR) all
1 : dis ql(STDNTUPD_GBO_STARS_ERROR) all
AMQ8409: Display Queue details.
QUEUE(STDNTUPD_GBO_STARS_ERROR) TYPE(QLOCAL)
ACCTQ(QMGR) ALTDATE(2011-07-07)
ALTTIME(09.20.36) BOQNAME( )
BOTHRESH(0) CLUSNL( )
CLUSTER( ) CLWLPRTY(0)
CLWLRANK(0) CLWLUSEQ(QMGR)
CRDATE(2011-07-05) CRTIME(10.04.03)
CURDEPTH(1) DEFBIND(OPEN)
DEFPRTY(0) DEFPSIST(YES)
DEFPRESP(SYNC) DEFREADA(NO)
DEFSOPT(SHARED) DEFTYPE(PREDEFINED)
DESCR( ) DISTL(NO)
GET(ENABLED) HARDENBO
INITQ(SYSTEM.DEFAULT.INITIATION.QUEUE)
IPPROCS(0) MAXDEPTH(1200000)
MAXMSGL(4194304) MONQ(QMGR)
MSGDLVSQ(PRIORITY) TRIGGER
NPMCLASS(NORMAL) OPPROCS(0)
PROCESS(TEST) PUT(ENABLED)
PROPCTL(COMPAT) QDEPTHHI(80)
QDEPTHLO(20) QDPHIEV(DISABLED)
QDPLOEV(DISABLED) QDPMAXEV(ENABLED)
QSVCIEV(NONE) QSVCINT(999999999)
RETINTVL(999999999) SCOPE(QMGR)
SHARE STATQ(QMGR)
TRIGDATA( ) TRIGDPTH(1)
TRIGMPRI(0) TRIGTYPE(EVERY)
USAGE(NORMAL)
2. dis process(TEST) all
3 : dis process(TEST) all
AMQ8407: Display Process details.
PROCESS(TEST) APPLTYPE(UNIX)
APPLICID(/home/wbrkadm/scripts/starsadapter.sh)
ENVRDATA( ) USERDATA( )
DESCR( ) ALTDATE(2011-07-07)
ALTTIME(09.24.05)
And the script starsadapter contains the following
mqsistopmsgflow BROKER -e EG -m FlowName
3. nohup runmqtrm -m QMGR -q SYSTEM.DEFAULT.INITIATION.QUEUE&
all the above are executed as the user 'wbrkadm' who is a member of group mqm and mqbrkrs
now i get the following exception when the triggering gets executed to stop the flow
__________________________________________________
07/08/2011 08:11:32 AM : Waiting for a trigger message
/home/wbrkadm/scripts/starsadapter.sh 'TMC 2STDNTUPD_GBO_STARS_ERROR TEST /home/wbrkadm/scripts/starsadapter.sh QMGR '
Stop the STARS adapter flow
mqsireportflowmonitoring: error while loading shared libraries: libImbCmdLib.so: cannot open shared object file: No such file or directory
07/08/2011 08:11:32 AM : Error '32512' starting triggered application (errno 0)
seems to be some library loading problem .. i tried including the mqsiprofile which also fails...
am i missing anything ?? any pointers highly appreciated !!!
Thank You
RD |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Jul 08, 2011 6:53 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You may need to set the LIBPATH or LD_LIBRARY_PATH environment variable in your script. Check the broker's Id home directory for the .profile file and verify if that variable is set to any value. You may have to copy this and export it in your script.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
rahuldhanpal |
Posted: Fri Jul 08, 2011 7:14 am Post subject: |
|
|
Voyager
Joined: 24 Jan 2009 Posts: 84 Location: Kenosha WI
|
hi,
thanks for the response
yes LD_LIBRARY_PATH is set to a value which has some of the library paths related to broker,mq and db2 as shown below ..
/opt/oracle1/product/11.2.0/client_1/lib32:/opt/oracle1/product/11.2.0/client_1/lib:/opt/ibm/mqsi/7.0/jre16/lib/amd64:/opt/ibm/mqsi/7.0/jre16/lib/amd64/classic:/opt/mqm/java/lib64:/opt/ibm/mqsi/7.0/xml4c/lib:/opt/mqm/lib64:/opt/ibm/mqsi/7.0/lib:/opt/ibm/mqsi/7.0/bin:/opt/ibm/mqsi/7.0/ODBC/V6.0/lib:/opt/ibm/mqsi/7.0/xlxpc/lib:/home/db2inst1/sqllib/lib64:/home/db2inst1/sqllib/lib32
do i have to export this again in the script or atleast only related to broker ?? |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Jul 08, 2011 8:16 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
YES you do. _________________ MQ & Broker admin |
|
Back to top |
|
 |
skoobee |
Posted: Sun Jul 10, 2011 10:33 pm Post subject: |
|
|
Acolyte
Joined: 26 Nov 2010 Posts: 52
|
You have to set LD_LIBRARY_PATH in your script because runmqtrm is a setuid/setgid app. When a process is started by such an app, UNIX resets the LD_LIBRARY_PATH to the standard /lib:/usr/lib in the environment of the new process, so you need to change it to your required value. The reason for this is to prevent apps taking over the function of standard libs as a different user. |
|
Back to top |
|
 |
rahuldhanpal |
Posted: Mon Jul 11, 2011 3:50 am Post subject: |
|
|
Voyager
Joined: 24 Jan 2009 Posts: 84 Location: Kenosha WI
|
it works now guys ...just sourced the mqsiprofile in the script from the message broker product install path..
thanks for all the pointers guys ..
RD |
|
Back to top |
|
 |
|