Thanks david,

For detail info you requst list as follows,
STAF Version 3.3.4
STAX Version 3.3.7
But, i can't find out the root reason even if go through these info, could
you give me some help?
Ask again, can i terminate the thread for the certain job ?

Thanks in advance,
-Wiston.


1, [ad...@b2b_plat_13618 ~]$ staf local stax list job 110  threads
Response
--------
Thread ID Parent TID State
--------- ---------- -------
1         <None>     Blocked
2         1          Blocked
4         2          Running


2, STAF local STAX QUERY JOB 110 THREAD <threadID>


[ad...@b2b_plat_13618 ~]$ staf local stax query job 110  thread 1
Response
--------
{
  Thread ID      : 1
  Parent TID     : <None>
  Start Date-Time: 20090813-19:42:20
  Call Stack     : [
    function: stopJobsByRunIdAndIP (Line: 288, File:
/home/admin/rails/AutotestFrame/config/stax.xml, Machine: local://local)
    sequence: 2/2 (Line: 294, File:
/home/admin/rails/AutotestFrame/config/stax.xml, Machine: local://local)
  ]
  Condition Stack: [
    HardHoldThread: Source=ParallelIterate, Priority=50
    TerminateBlock: Source=Block, Priority=200
    HoldThread: Source=ParallelIterate, Priority=1000
  ]
}



[ad...@b2b_plat_13618 ~]$ staf local stax query job 110  thread 2
Response
--------
{
  Thread ID      : 2
  Parent TID     : 1
  Start Date-Time: 20090813-19:42:20
  Call Stack     : [
    sequence: 1/2 (Line: 297, File:
/home/admin/rails/AutotestFrame/config/stax.xml, Machine: local://local)
    function: terminateJobs (Line: 391, File:
/home/admin/rails/AutotestFrame/config/stax.xml, Machine: local://local)
    if: len(runningJobIdList) != 0  (Line: 396, File:
/home/admin/rails/AutotestFrame/config/stax.xml, Machine: local://local)
    iterate: 2/9 112 runningJobIdList (Line: 397, File:
/home/admin/rails/AutotestFrame/config/stax.xml, Machine: local://local)
    parallel: 1  (Line: 398, File:
/home/admin/rails/AutotestFrame/config/stax.xml, Machine: local://local)
  ]
  Condition Stack: [
    HardHoldThread: Source=Parallel, Priority=50
    TerminateThread: Source=Thread, Priority=100
    HoldThread: Source=Parallel, Priority=1000
  ]
}

[ad...@b2b_plat_13618 ~]$ staf local stax query job 110  thread 4
Response
--------
{
  Thread ID      : 4
  Parent TID     : 2
  Start Date-Time: 20090813-19:42:21
  Call Stack     : [
    stafcmd: 'terminateJobs' (Line: 399, File:
/home/admin/rails/AutotestFrame/config/stax.xml, Machine: local://local)
  ]
  Condition Stack: [
    TerminateThread: Source=Thread, Priority=100
  ]
}

3,
ad...@b2b_plat_13618 STAFJVM1]$ vi JVMLog.1
*sys-package-mgr*: processing new jar,
'/usr/local/staf/services/stax/STAX.jar'
*sys-package-mgr*: processing new jar,
'/usr/local/staf/data/STAF/lang/java/shared_jython/2.1-staf-v3.3/jython.jar'
*sys-package-mgr*: processing new jar,
'/home/admin/jdk1.6.0_12/jre/lib/resources.jar'
*sys-package-mgr*: processing new jar,
'/home/admin/jdk1.6.0_12/jre/lib/rt.jar'
*sys-package-mgr*: processing new jar,
'/home/admin/jdk1.6.0_12/jre/lib/jsse.jar'
*sys-package-mgr*: processing new jar,
'/home/admin/jdk1.6.0_12/jre/lib/jce.jar'
*sys-package-mgr*: processing new jar,
'/home/admin/jdk1.6.0_12/jre/lib/charsets.jar'
*sys-package-mgr*: processing new jar,
'/home/admin/jdk1.6.0_12/jre/lib/ext/sunjce_provider.jar'
*sys-package-mgr*: processing new jar,
'/home/admin/jdk1.6.0_12/jre/lib/ext/localedata.jar'
*sys-package-mgr*: processing new jar,
'/home/admin/jdk1.6.0_12/jre/lib/ext/sunpkcs11.jar'
*sys-package-mgr*: processing new jar,
'/home/admin/jdk1.6.0_12/jre/lib/ext/dnsns.jar'
Registered Extensions for STAX Version 3.3.7:
Exception in thread "Thread-3" java.lang.NullPointerException
        at
com.ibm.staf.service.stax.STAXSTAFCommandAction.handleCondition(STAXSTAFCommandAction.java:411)
        at
com.ibm.staf.service.stax.STAXThread.execute(STAXThread.java:1416)
        at
com.ibm.staf.service.stax.STAXThreadQueue$QueueThread.run(STAXThreadQueue.java:54)
Exception in thread "Thread-7" java.lang.NullPointerException
        at
com.ibm.staf.service.stax.STAXSTAFCommandAction.handleCondition(STAXSTAFCommandAction.java:411)
        at
com.ibm.staf.service.stax.STAXThread.execute(STAXThread.java:1416)
        at
com.ibm.staf.service.stax.STAXThreadQueue$QueueThread.run(STAXThreadQueue.java:54)
Exception in thread "Thread-4" java.lang.NullPointerException
        at
com.ibm.staf.service.stax.STAXSTAFCommandAction.handleCondition(STAXSTAFCommandAction.java:411)
        at
com.ibm.staf.service.stax.STAXThread.execute(STAXThread.java:1416)
        at
com.ibm.staf.service.stax.STAXThreadQueue$QueueThread.run(STAXThreadQueue.java:54)
Exception in thread "Thread-5" java.lang.NullPointerException
        at
com.ibm.staf.service.stax.STAXSTAFCommandAction.handleCondition(STAXSTAFCommandAction.java:411)
        at
com.ibm.staf.service.stax.STAXThread.execute(STAXThread.java:1416)
        at
com.ibm.staf.service.stax.STAXThreadQueue$QueueThread.run(STAXThreadQueue.java:54)
******************************************************************************
*** 20090813-08:55:44 - Start of Log for JVMName: STAFJVM1
*** JVM Executable: java
*** JVM Options   : -Xms128m -Xmx512m
*** JVM Version   : java version "1.6.0_12"
Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
Java HotSpot(TM) Server VM (build 11.2-b01, mixed mode)
*** JVM PID       : 30897
******************************************************************************
Registered Extensions for STAX Version 3.3.7:
Exception in thread "Thread-3" java.lang.NullPointerException
        at
com.ibm.staf.service.stax.STAXSTAFCommandAction.handleCondition(STAXSTAFCommandAction.java:411)
        at
com.ibm.staf.service.stax.STAXThread.execute(STAXThread.java:1416)
        at
com.ibm.staf.service.stax.STAXThreadQueue$QueueThread.run(STAXThreadQueue.java:54)
Exception in thread "Thread-6" java.lang.NullPointerException
        at
com.ibm.staf.service.stax.STAXSTAFCommandAction.handleCondition(STAXSTAFCommandAction.java:411)
        at
com.ibm.staf.service.stax.STAXThread.execute(STAXThread.java:1416)
        at
com.ibm.staf.service.stax.STAXThreadQueue$QueueThread.run(STAXThreadQueue.java:54)
Exception in thread "Thread-4" java.lang.NullPointerException
        at
com.ibm.staf.service.stax.STAXSTAFCommandAction.handleCondition(STAXSTAFCommandAction.java:411)
        at
com.ibm.staf.service.stax.STAXThread.execute(STAXThread.java:1416)
        at
com.ibm.staf.service.stax.STAXThreadQueue$QueueThread.run(STAXThreadQueue.java:54)
Exception in thread "Thread-5" java.lang.NullPointerException
        at
com.ibm.staf.service.stax.STAXSTAFCommandAction.handleCondition(STAXSTAFCommandAction.java:411)
        at
com.ibm.staf.service.stax.STAXThread.execute(STAXThread.java:1416)
        at
com.ibm.staf.service.stax.STAXThreadQueue$QueueThread.run(STAXThreadQueue.java:54)







2009/8/17 David Bender <bda...@us.ibm.com>

>
> What versions of STAF and STAX are you using?
>
> What is the output of the following:
>
> STAF local STAX LIST JOB 110 THREADS
>
> Then, for each thread ID returned in the previous request, what is the
> output of:
>
> STAF local STAX QUERY JOB 110 THREAD <threadID>
>
> Are there any errors in the STAX JVM log?  This will be in
> {STAF/DataDir}/lang/java/jvm/STAFJVM1/JVMLog.1 (unless you specified a
> different JVM name when registering the STAX service).
>
> Thanks,
> David
>
> ------------------------------
>   *David 
> Bender*<http://w3.ibm.com/bluepages/simpleSearch.wss?searchBy=Name&searchFor=David+Bender>
> STAF/STAX Development
> IBM Software Group, WPLC
>   11501 Burnet Rd.
> Bldg. 903-5B002
> Austin, TX 78758-3400
>   Phone (T/L): 1-512-286-5315 (363-5315)
> ITN: 23635315
> Email: *bda...@us.ibm.com* <bda...@us.ibm.com>
>
>
> ------------------------------
>
>
>
>   *Li Wiston <wiston.l...@gmail.com>*
>
> 08/16/2009 10:57 PM
>    To
>  staf-users@lists.sourceforge.net
>  cc
>   Subject
> Re: [staf-users] The Urgent Issues: Can't terminate the STAX Job
>
>
>
>
>
>
>
>
>
> Hi, all
>
> In the recently days, I can't terminate the STAX Job in manual,
>
> pls see the info below, and help anyone could give us some soluation?
>
> Thanks in advance
> -Wiston.
>
>
> [ad...@b2b_plat_13618 AutotestFrame]$ staf local stax list jobs
> Response
> --------
> Job ID Job Name                      Start Date-Time   Function
> ------ ----------------------------- ----------------- --------------------
> 110    terminate_all_2128            20090813-19:42:20 stopJobsByRunIdAndIP
> 208    distribute_10.20.134.130_2197 20090817-11:09:18 Main
>
>
>
>
> [ad...@b2b_plat_13618 AutotestFrame]$ staf local stax terminate job 110
> Response
> --------
>
>
> [ad...@b2b_plat_13618 AutotestFrame]$ staf local stax list jobs
> Response
> --------
> Job ID Job Name                      Start Date-Time   Function
> ------ ----------------------------- ----------------- --------------------
> 110    terminate_all_2128            20090813-19:42:20 stopJobsByRunIdAndIP
> 208    distribute_10.20.134.130_2197 20090817-11:09:18 Main
>
>
>
>
>
>
>
> 2009/8/11 Bob Salmi <*bsa...@visi.com* <bsa...@visi.com>>
> i believe I have solved my own question.
>
> pulling the rc data from the marshalled data via the context got me
> the return code I was looking for
>
> Bob
>
> On Aug 10, 2009, at 6:28 PM, Bob Salmi wrote:
>
> > I'm having a problem seeing my processes return codes in pystaf.
> >
> > in short I am running a simple shell script on a remote machine and
> > getiing back the return code.
> > I can see the proper return code in the formatted result output, but
> > that is not the same return code from result.rc
> >
> >
> > here's and example:
> >
> > I have 2 remote shell script pass and fail
> >
> > pass returns 0
> > fail returns 33
> >
> > I also run a command "not_found" which should return file not found
> > error 127
> >
> > the following code sees result.rc as 0 in both cases.
> >
> > code and output below:
> >
> > You can see the proper return codes 0,33 and 127 in the fromatted
> > result but result.rc consistently returns 0.
> >
> > So what am I missing ?
> >
> > Thanks,
> >
> > Bob
> >
> >
> > #!/usr/bin/env python
> > from PySTAF import *
> > import sys
> >
> > def print_res(result):
> >     if isMarshalledData(result.result):
> >         mc=unmarshall(result.result)
> >         processMap=mc.getRootObject()
> >         print"format object:%s" % (formatObject(processMap,mc))
> >         print"stdout data:%s" % (processMap['fileList'][0]['data'])
> >         print"stderr data:%s" % (processMap['fileList'][1]['data'])
> >         out=(processMap['fileList'][0]['data'])
> >     else:
> >         print "unmarshalled output %s"%result.result
> >
> >
> > try:
> >     handle = STAFHandle("MyTest")
> > except STAFException, e:
> >      print "Error registering with STAF, RC: %d" % e.rc
> >      sys.exit(e.rc)
> >
> > print "\n\n****** TEST 1 *******\n"
> > result = handle.submit("10.211.55.4", "PROCESS", "START SHELL
> > COMMAND /
> > home/bsalmi/pass  WAIT RETURNSTDOUT RETURNSTDERR" )
> > print "result =%d" % result.rcprint_res(result)
> >
> > print "\n\n****** TEST 2 *******\n"result2 =
> > handle.submit("10.211.55.4", "PROCESS", "START SHELL COMMAND /home/
> > bsalmi/fail  WAIT RETURNSTDOUT RETURNSTDERR" )print "result2 =%d" %
> > result2.rc
> > print_res(result2)
> > print "\n\n****** TEST 3 *******\n"result3 =
> > handle.submit("10.211.55.4", "PROCESS", "START SHELL COMMAND /home/
> > bsalmi/not_there  WAIT RETURNSTDOUT RETURNSTDERR" )
> > print "result3 =%d" % result3.rc
> > print_res(result3)
> >
> > rc=handle.unregister()
> >
> > Here's the output.......
> >
> > bob-salmis-computer-3:samples bsalmi$ ./example2.py
> >
> >
> > ****** TEST 1 *******
> >
> > result =0
> > format object:{
> >   Return Code: 0
> >   Key        : <None>
> >   Files      : [
> >     {
> >       Return Code: 0
> >       Data       : ran pass
> >
> >     }
> >     {
> >       Return Code: 0
> >       Data       :
> >     }
> >   ]
> > }
> > stdout data:ran pass
> >
> > stderr data:
> >
> >
> > ****** TEST 2 *******
> >
> > result2 =0
> > format object:{
> >   Return Code: 33
> >   Key        : <None>
> >   Files      : [
> >     {
> >       Return Code: 0
> >       Data       : ran fail
> >
> >     }
> >     {
> >       Return Code: 0
> >       Data       :
> >     }
> >   ]
> > }
> > stdout data:ran fail
> >
> > stderr data:
> >
> >
> > ****** TEST 3 *******
> >
> > result3 =0
> > format object:{
> >   Return Code: 127
> >   Key        : <None>
> >   Files      : [
> >     {
> >       Return Code: 0
> >       Data       :
> >     }
> >     {
> >       Return Code: 0
> >       Data       : sh: /home/bsalmi/not_there: No such file or
> > directory
> >
> >     }
> >   ]
> > }
> > stdout data:
> > stderr data:sh: /home/bsalmi/not_there: No such file or directory
> >
> >
> >
> >
> >
> >
> >
> ------------------------------------------------------------------------------
> > Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> > 30-Day
> > trial. Simplify your report design, integration and deployment - and
> > focus on
> > what you do best, core application coding. Discover what's new with
> > Crystal Reports now.  
> > *http://p.sf.net/sfu/bobj-july*<http://p.sf.net/sfu/bobj-july>
> > _______________________________________________
> > staf-users mailing list
> > *staf-us...@lists.sourceforge.net* <staf-users@lists.sourceforge.net>
> > *https://lists.sourceforge.net/lists/listinfo/staf-users*<https://lists.sourceforge.net/lists/listinfo/staf-users>
> >
>
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  
> *http://p.sf.net/sfu/bobj-july*<http://p.sf.net/sfu/bobj-july>
> _______________________________________________
> staf-users mailing list*
> **staf-us...@lists.sourceforge.net* <staf-users@lists.sourceforge.net>*
> **https://lists.sourceforge.net/lists/listinfo/staf-users*<https://lists.sourceforge.net/lists/listinfo/staf-users>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
>
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.
> http://p.sf.net/sfu/bobj-july_______________________________________________
> staf-users mailing list
> staf-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/staf-users
>
>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to