The problem is probably caused by the remote machine not being able to 
send its STAF/Process/End message to the STAX machine's hostname (possibly 
due to a DNS configuration problem).  See the STAF FAQ, question "4.1.2 
Why is STAX still showing a process as running, even though it has 
completed?", at http://staf.sourceforge.net/current/STAFFAQ.htm more 
information on how to resolve this issue. 

 And follow any of the following threads posted on the STAF forums.
- http://sourceforge.net/forum/message.php?msg_id=4774490
- http://sourceforge.net/forum/message.php?msg_id=4708041

When using a <process> element, STAX starts the process asynchronously 
(using the NOTIFY ONEND option), so when the process completes on the 
remote machine, the remote machine submits a QUEUE request to the QUEUE 
service on the STAX machine to send it the STAF/Process/End process 
completion message. Note that the remote machine submits this request to 
the hostname of the STAX service that was provided via the initial process 
start request. If this QUEUE request fails, then the STAX service doesn't 
know that the process has completed. So, it would appear that the remote 
process machine cannot submit STAF requests to the STAX service machine 
via it's hostname (and note on Windows, if it can't find it's TCP/IP 
hostname via DNS, it defaults to it's NetBIOS name). This usually 
indicates a TCP/IP DNS configuration problem. Running the "STAF 
<STAXmachineHostname> MISC WHOAMI" from the remote process machine can 
help you debug this to see the hostname that STAF uses to send the process 
completion message to the STAX service machine.  
 
Note: To get more information, you can turn on STAF tracing for the QUEUE 
service and for tracepoints ServiceRequest, ServiceComplete, and 
RemoteRequests on the remote process machine and redirect the STAF trace 
output to a file of your choice as follows:  
 
STAF <remoteProcessMachine> TRACE ENABLE SERVICE QUEUE  
STAF <remoteProcessMachine> TRACE ENABLE TRACEPOINTS "ServiceRequest 
ServiceComplete RemoteRequests"  
STAF <remoteProcessMachine> TRACE SET DESTINATION TO FILE 
/tmp/staftrace.out  
 
and then rerun the STAX job that includes a <process> element for this 
remote process machine. The STAF trace output in file /tmp/staftrace.out 
will show what the remote process machine was given for the STAX service 
machine and why the QUEUE request to send the process completion message 
is failing.   

--------------------------------------------------------------
Sharon Lucas
IBM Austin,   [EMAIL PROTECTED]
(512) 838-8347 or Tieline 678-8347




"Devvan Stokes" <[EMAIL PROTECTED]> 
Sent by: [EMAIL PROTECTED]
09/10/2008 05:07 PM

To
<staf-users@lists.sourceforge.net>
cc

Subject
[staf-users] termingating a running STAX job






I'm starting up a simple STAX job and monitoring it from STAXMon.  I've 
defined a process that runs on a remote machine, and have chosen process 
over stafcmd because I want to wait for the remote process to end.  I can 
visually confirm that the remote process runs, and ends (it drops off of 
the Windows Task List), and yet the timer for the job, in STAXMon, keeps 
running.  This remote process is ending naturally - I'm not using a 
stopusing element.

I would like for this process to terminate when the remote process ends, 
so that I can check its return value, log a message based on that, and 
also copy a remote file to the local filesystem (ending the job). 

I have the process element inside of the sequence element because I intend 
to have multiple processes called within the function. [code is below]

Is there anything obvious that I'm doing wrong? 

Thank you.

<stax>
<defaultcall function="Main"/>
<function name="Main">
  <sequence>
    <script>
      set some variables here
    </script>
    <process name=some name here>
      <location> remote machine address </location>
      <command mode="'default'">
        start the remote process
      </command>
      <parms>
        pass in some parameters
      </parms>
      <stdout>file name here</stdout>
      <returnfile>name of remote  file to return</returnfile>
    </process>
    <if expr="RC != 0">
      <log level="'error'">
        'Process failed with RC=%s, Result=%s' % (RC, STAFResult)
      </log>
    </if>
    <else>
      <log level="'info'">
        Do some logging here
      </log>
    </else>
  </sequence>
</function>
</stax> 
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's 
challenge
Build the coolest Linux based applications with Moblin SDK & win great 
prizes
Grand prize is a trip for two to an Open Source event anywhere in the 
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to