Author |
Message
|
sebastia |
Posted: Thu Jan 01, 2009 5:09 am Post subject: client triggering doesn't work |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
Have a nice New Year you all !
I have to configure a demo of triggering on a MQ Client.
My 3 objects are simple :
DEFINE QLOCAL(INIT_Q) REPLACE
DEFINE PROCESS (CTP) APPLTYPE (WINDOWSNT) +
APPLICID ('c:\temp\mycode.exe') REPLACE
DEFINE QLOCAL (DATA_Q) INITQ ('INIT_Q') +
PROCESS ('CTP') TRIGGER TRIGTYPE (FIRST) REPLACE
They are defined to a qmgr QM1 on a Windows XP (v6.0.2.5),
IP=1.2.3.4, port=1415
On the "client" machine, that is a VMWARE image on same physical PC,
I have
MQSERVER=TRIG.SVRCONN/TCP/1.2.3.4(1415)
Problem :
when I start on the client machine the Trigger Monitor
RUNMQTMC -m QM1 -q INIT _Q
I get the message
"Queue manager not available to the WebSphere MQ trigger monitor"
This is "AMQ8605" in Messages book.
Thsi indicates there is no access to QM1 ... so I try
AMQSPUTC DATA_Q QM1 < my_msg.txt
*** and it works perfectly ***
Channel TRIG.SVRCONN had some 2035 problems, fixed.
The worst thing is that there is NOTHING logged in AMQERR01.LOG
(except when 2035 ...) on either side of TRIG.SVRCONN ...
Any ideas at this point ?
( I did some test more, but I would like to detail them later)
Thanks. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jan 01, 2009 5:31 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
The user running the trigger monitor needs connect access to qmgr/channel.
The user running the trigger monitor needs put access to the qmgr's DLQ.
The user running the trigger monitor needs get access to the initq. (I'd include inq, in fact I'd use +allmqi)
The user running the trigger monitor will be the user running the process (unless otherwise specified (like root using su), remember no interactive authentication allowed) so you need adequate access there to the qmgr/channel/dataqueue etc...
Start the trigger monitor in interactive mode and check the output.
Or runit in background and redirect the output (sysout+syserr) to a file.
This should allow you to get way more insight into what is wrong with your setup.
Make sure that the process is started as a background process. If the process is started as a foreground process and hangs it looks like the trigger monitor is not working. That is not true, it is simply waiting for your process to finish before it processes the next trigger message.
Search the forum, there are a few environment variables you might want to set in the shell running the trigger monitor.
Finally last but not least, check out the support packs I believe there was something about running the trigger monitor as service on the Windows platform... (might be V6.0 and up though).
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Jan 01, 2009 6:07 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
There is a supportPac, MA7K, that provides a Windows client trigger monitor service. There's nothing in the code that I know of that would be v6 specific...
All of FJ's comments about users are correct, if you haven't set an MCAUSER on the SVRCONN... if you did, then they all apply to the MCAUSER and not to the user running the trigger monitor.
The error you're getting suggests to me that the MQSERVER variable is not set in the shell running the trigger monitor. Can you tell from the qmgr if there is any instance of the SVRCONN running? |
|
Back to top |
|
 |
sebastia |
Posted: Thu Jan 01, 2009 6:38 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
As I am not interested in "2035" problems,
the TRIG.SVRCONN channel has MCAUSER(MUSR_MQADMIN)
So, I'd say all mr Saper's "user" problems are gone.
The trigger monitor was already in interactive mode.
(all) The messages are :
+++
echo MQSERVER = {%MQSERVER%}
MQSERVER = {TRIG.SVRCONN/TCP/1.2.3.4((1415)}
runmqtmc -m QM1 -q INIT_Q
5724-H72 (C) Copyright IBM Corp. 1994, 2004. ALL RIGHTS RESERVED.
WebSphere MQ trigger monitor started.
Queue manager not available to the WebSphere MQ trigger monitor
WebSphere MQ trigger monitor ended.
+++
Process at BackGround - if I am not wrong, this is achieved (at windows)
using "START mycode.exe", isn't it (I mean "START" before the "exe) ?
This option was tested, - did not work-,
but I'd like to repeat it after a complete "restart" ...
If I run the trigger monitor as a service
(Support pack MA7K)
what advantages shall I get ?
Better tracing (into System Event Log maybe) ?
mr mqjeff - no, there is no instance of TRIG.SVRCONN active,
I mean, it is not "running".
As nothing gets to the "server" machine, I suspect about a firewall ...
The reason for this post is to know a bit more about what resources are involved when I run "runmqtmc" : as AMQSPUTC works, there has to be something more that the listener and SVRCONN channel, isn't it ?
Thanks. |
|
Back to top |
|
 |
sebastia |
Posted: Thu Jan 01, 2009 6:47 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
mr Saper - I have found your PPT
called
"Triggering the right Java Environment"
but I see no Envir Var that can help me ...
( and I am not in Java envir, of course )
export JAVA_COMPILER=NONE
Needed to avoid java program hanging when triggered
export AMQ_NO_SIGWAIT_SIGTRAP=1
Needed to avoid java program hanging when triggered (Pre CSD06 ??)
export AMQ_SIGCHLD_SIGACTION=YES
Needed to avoid having trigger messages with reason code 265 in the DLQ. |
|
Back to top |
|
 |
sebastia |
Posted: Thu Jan 01, 2009 7:29 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
Well, thanks to this forum (again) I fixed it !
a) when Copy-And-Pasting the code, I found a mistake ...
b) and I also found the AMQERR01.LOG file : it was in c:\MQ\
even c:\Program Files\IBM\WebSphere MQ\ also existed ..
That log file provided the clue for point (a) ...
And the problem was ...
MQSERVER = {TRIG.SVRCONN/TCP/1.2.3.4((1415)}
... there are 2 (two) parethesis between the IP and the port,
so the connection failed, and reported it to
c:\mq\errors\AMQERR01.LOG
Thanks for your patience and support ! Sebastian. |
|
Back to top |
|
 |
sebastia |
Posted: Thu Jan 01, 2009 8:03 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
In fact, all the "demo" reason starts with a single line
of the "clients" manual (version 6 = chapter 12) :
Triggering in the client environment
Messages sent by WebSphere MQ applications
running on WebSphere MQ clients
contribute to triggering
in exactly the same way as any other messages,
and they can be used to trigger programs on the server.
==========================================
WHY IT SAYS "ON THE SERVER" (only) ?
They can be used to trigger programs
a) on the server
b) on the client
==========================================
Do you agree or I am still having problems with english ? |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jan 01, 2009 12:51 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Good for you.
This is one of the reasons it is prudent once you have set the MQServer variable to have it echoed back to you; echo $MQServer or echo %MQServer% (windows) Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Jan 01, 2009 2:52 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You have a fair point about the documentation. It is probably not correct entirely as written. If you want, the Info Center has "feedback" links at the bottom of most pages. You can click that to send a note to the documentation team and ask them to clarify that part. |
|
Back to top |
|
 |
sebastia |
Posted: Fri Jan 02, 2009 2:46 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
|
Back to top |
|
 |
mqjeff |
Posted: Fri Jan 02, 2009 6:26 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
The feedback link for the same page in the v7 info center, rather than the v6 info center, works.... And the v7 page has the same issue.
And the feedback page has additional mechanisms for submitting feedback, including an email address which I will not repeat here. |
|
Back to top |
|
 |
sebastia |
Posted: Fri Jan 02, 2009 6:39 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
|
Back to top |
|
 |
sebastia |
Posted: Tue Jan 13, 2009 2:57 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
and here is the response from IBM :
+++
A response to your RCF (number 2421) has been submitted:
Writer's Response:
Hello,
thank you for taking the time to raise this comment. I've now made the
changes to the V6 and V7 docs, and the changes will be online with the next
doc refresh.
Kind regards,
+++
( ) |
|
Back to top |
|
 |
|