Author |
Message
|
sshaker |
Posted: Thu Mar 06, 2003 1:18 pm Post subject: defunct |
|
|
 Disciple
Joined: 20 Sep 2002 Posts: 185
|
Hi
I am on AIX and one of my activities is supposed to invoke a java program thru UPES. I am getting 'defunct' processes because of the java program and the trigger monitor is coughing error message.. error starting trigger application..
can someone point to the root cause... i am able to run the java program in isolation ... as a standalone program and it is doing fine..
and also the java program is run thru a script and for each hit a script process and a java process is created and the java class is supposed to come out if messages are not there after two minutes.. but it is not coming out.. instead creating new java processes..
can somebody through some light on this...
regards
shaker _________________ shaker |
|
Back to top |
|
 |
jmac |
Posted: Thu Mar 06, 2003 2:15 pm Post subject: Re: defunct |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
sshaker wrote: |
Hi
II am getting 'defunct' processes because of the java program and the trigger monitor is coughing error message.. error starting trigger application.. |
Please define defunct processes. _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
vennela |
Posted: Thu Mar 06, 2003 2:19 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
How are you triggering the script.
Are you triggering it in the background?
"error starting trigger application"
Do you have the PATH set
Do you have the right environment (for example CLASSPATH) set so that the script is successful in calling the java app and doing other things as it is supposed to?
Also do you do a destructive GET or do the app backout the message if something goes wrong.
Maybe the messages are being backed out and the java application is not finishing off because there are messages on the Queue.
-------
Venny |
|
Back to top |
|
 |
sshaker |
Posted: Thu Mar 06, 2003 2:42 pm Post subject: |
|
|
 Disciple
Joined: 20 Sep 2002 Posts: 185
|
hi
thnx for the reply..
the defunct functions are displayed by ps -ef command ... as below:
fmc 34834 1 0 0:00 <defunct>
triggering: the program is triggered in the background..
classpath, path etc. are set properly and it is working when i run it in command line
mqget is a destructive mqget with a wait interval of 2 min
any more thoughts ..
regards
shaker _________________ shaker |
|
Back to top |
|
 |
jmac |
Posted: Thu Mar 06, 2003 2:45 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
sshaker wrote: |
the defunct functions are displayed by ps -ef command ... as below:
fmc 34834 1 0 0:00 <defunct>
|
What you are telling me is about the AIX processes. What is the state of the Process Instance in MQWF? _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
vennela |
Posted: Thu Mar 06, 2003 2:47 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
The script would be executed from fmc's home directory (I am assuming you are running the trigger monitor under fmc user).
Can you run the script from the home directory of fmc.
Can you post the PROCESS (defined for triggering) definitions.
I still doubt if the script can be located unless you have specified the absolute path.
-------
Vennela |
|
Back to top |
|
 |
sshaker |
Posted: Thu Mar 06, 2003 8:50 pm Post subject: |
|
|
 Disciple
Joined: 20 Sep 2002 Posts: 185
|
hi
i am trying to test the triggering by putting a test message in queue.. i am yet to see the process being started ..
i am able to start the PROCESS object as the same is invoking the java program too.. but it is creating an AIX process for each hit.. and never coming out.. and the message is not retrieved by the java program..
if i run the java program using java command then it is retrieving the message..
regards
shaker _________________ shaker |
|
Back to top |
|
 |
vennela |
Posted: Fri Mar 07, 2003 7:25 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
These 3 steps should be sufficient to set the triggering
DEF QL(QUEUE1) TRIGGER TRIGTYPE(FIRST) INITQ(SYSTEM.DEFAULT.INITIATION.QUEUE) PROCESS(PROC.FOR.QUEUE1)
DEFINE PROCESS(PROC.FOR.QUEUE1) APPLICID('/usr/bin/trigscripts/asdf.sh')
runmqtrm -m FMCQM -q SYSTEM.DEFAULT.INITIATION.QUEUE
Your script would be having the line
java MQGet QUEUE1 FMCQM
To debug run the trigger monitor in another window in foreground and see the error messages.
You may later run both trigger monitor and the script in the background
Quote: |
i am able to start the PROCESS object as the same is invoking the java program too.. but it is creating an AIX process for each hit.. and never coming out.. and the message is not retrieved by the java program..
|
I did not understand this. We are getting confused with three processes(workflow process, mq process and unix process). |
|
Back to top |
|
 |
clindsey |
Posted: Fri Mar 07, 2003 8:31 am Post subject: |
|
|
Knight
Joined: 12 Jul 2002 Posts: 586 Location: Dallas, Tx
|
sshaker,
If I understand your setup correctly, you are starting a trigger monitor to launch your java application which processes messages on the upes queue and you can lauch this script from a command line but the trigger monitor throws an error when it launches the script.
Also, I would assume you are using runmqtrm as the trigger monitor, correct? runmqtrm is a 'setuid' program that runs as user 'mqm'. Try logging in as user mqm and see if you can run the script. You will probably hit the same error if you run as mqm.
Any chance you are running MQ 5.3? If yes, there is a conflict currently with the JIT compiler in the JVM that causes the application to hang. This is specific to AIX. A good circumvention for this is to use the sample trigger monitor, /usr/lpp/mqm/samp/bin/amqstrg. You will need to add this directory to the path or create a link to /usr/bin. The parms are name of the initq and optionally the qmgr name, e.g. amqstrg myinitq FMCQM.
Hope this helps,
Charlie |
|
Back to top |
|
 |
vennela |
Posted: Fri Mar 07, 2003 9:04 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
clindsey wrote: |
Also, I would assume you are using runmqtrm as the trigger monitor, correct? runmqtrm is a 'setuid' program that runs as user 'mqm'. Try logging in as user mqm and see if you can run the script. You will probably hit the same error if you run as mqm. |
Charlie:
Do you mean to say that if we run the trigger monitor under fmc using runmqtrm it would run under mqm and the script would be triggered under mqm's user-id.
I have run the trigger monitor(runmqtrm) under fmc and the script was invoked under fmc.
This is HP-UX though. Maybe I didn't really get what you said.
-------
Venny |
|
Back to top |
|
 |
clindsey |
Posted: Fri Mar 07, 2003 1:32 pm Post subject: |
|
|
Knight
Joined: 12 Jul 2002 Posts: 586 Location: Dallas, Tx
|
venella,
Yes this is also true on HP. Runmqtrm is a 'setuid' program but amqstrg is not. Here is a little test you can run to see the effect of running as setuid.
Create a simple script, whoami.sh
#! /bin/ksh
USER=$(whoami)
print "This script is running as user $USER"
/opt/mqm/samp/bin/amqsget TESTTRIG java
exit 0
or just add the lines to print the user to a trigger script you already have.
For this example, you have to set up triggering for queue TESTTRIG, and
define a process with applicid('/home/fmc/whoami.sh'). Also, assume the init q is defined as SYSTEM.DEFAULT.INITIATION.QUEUE.
Now start runmqtrm as a user in the mqm group but not the mqm user, with 'runmqtrm -q SYSTEM.DEFAULT.INITIATION.QUEUE -m java' and put
a message on TESTTRIG on qmrg java with amqsput. On the screen running runmqtrm you will see that the user is "mqm". If you do the same test with amqstrg as the monitor, the user printed will be the id you are logged on with
Charlie |
|
Back to top |
|
 |
vennela |
Posted: Fri Mar 07, 2003 3:51 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Charlie:
Thanks for the clarification. It's showing 'mqm'.
Actually I did a similar test before posting my previous reply. But instead of whoami I have used id and uid was fmc.
After seeing your message I double checked what id was returning. It showed userid(uid) ad fmc but effective user id (euid) as mqm. That I think will explain why I floundered on that one.
Thanks
-------
Venny |
|
Back to top |
|
 |
sshaker |
Posted: Fri Mar 07, 2003 9:01 pm Post subject: |
|
|
 Disciple
Joined: 20 Sep 2002 Posts: 185
|
thnx charlie..
i will try with this trigger monitor and come back..
we had some problem with 5.2 MQ.. and just moved to 5.3.. are there any specific issues with 5.3 on aix..with wf 3.3.2.40....
regards
shaker _________________ shaker |
|
Back to top |
|
 |
clindsey |
Posted: Sat Mar 08, 2003 2:21 pm Post subject: |
|
|
Knight
Joined: 12 Jul 2002 Posts: 586 Location: Dallas, Tx
|
Officially 3.3.2 is not supported with WMQ5.3. You can look at other threads on this topic in this forum.
5.3 uses a new shared memory model and now supports extended memory. This is generally needed with java applications, so I would suggest setting EXTSHM=ON in the script that launches the jvm. If you have LDR_CNTRL or MAXDATA set in the script, take these out. They were needed in some cases with 5.2 but are now longer needed and they can cause problems for 5.3. And at least for now, you will need to use amqstrg for the trigger monitor.
Charlie |
|
Back to top |
|
 |
sshaker |
Posted: Sat Mar 08, 2003 8:27 pm Post subject: |
|
|
 Disciple
Joined: 20 Sep 2002 Posts: 185
|
we had a detailed interaction with IBM support and after their assurance we migrated to mq5.3 and wf33240... i am planning to use amqstrg for trigger monitoring.. is the initiation queue FMCTRIGGER creating any problem?
regards
shaker _________________ shaker |
|
Back to top |
|
 |
|