I assume that when you get an RC 16 trying to start a process on a machine
that a "STAF <machine> PING PING" request fails as well with RC 16 So,
you could use a <stafcmd> to submit a "STAF <machine> PING PING" request
before the <process> element and check if the RC is 16 (or just check if
RC != 0) and don't run the <process> if this occurs. Instead just log an
error message or whatever else you want to do. For example:
<stafcmd>
<location>cmdMachine</location>
<service>'PING'</service>
<request>'PING'</service>
</stafcmd>
<if expr="RC == 0">
<sequence>
<process>
<location>cmdMachine</location>
<command mode='"shell"'>command['cmdToExecute']</command>
<parms>commandParameters</parms>
<stderr mode="'stdout'"/>
<returnstdout/>
</process>
</sequence>
<else>
<log message="1">
'STAF PING to %s failed with RC=%s, Result=%s, so did not run
process' % \
(cmdMachine, RC, STAFResult)
</log>
</else>
</if>
Also, see the STAF FAQ, sections "3.1.3 Explain RC 16 when attempting to
send a STAF request to a remote machine" and "3.1.4 Why can't my STAF
machines communicate?", at
http://staf.sourceforge.net/current/STAFFAQ.htm#d0e930 for more
information on resolving problem where STAF machines cannot communicate.
--------------------------------------------------------------
Sharon Lucas
IBM Austin, luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313
From: Umesh <m_s_um...@yahoo.com>
To: staf-users@lists.sourceforge.net,
Date: 07/16/2012 05:07 PM
Subject: [staf-users] 'process' statement fails intermittently
Hi,
I keep getting the following issue quite often. I have tried increasing
'CONNECTTIMEOUT' on both local and remote machines and also increased
'Connection Attempts' on local machine to 5, but somehow I am not able to
get
this issue resolved.
Line 793: Error in element type "process".
The process failed to start, RC: 16, STAFResult:
STAFConnectionProviderConnect:
Error performing test read on connected endpoint: recv() RC=111: 22,
Endpoint:
ssl://1.2.3.4 (IP is an example here)
Code snippet is as below. Basically, trying to run a command on remote
machine.
<process>
<location>'%s' % cmdMachine</location>
<command mode='"shell"'>'%s' % command['cmdToExecute']</command>
<parms>'%s' % commandParameters </parms>
<stderr mode="'stdout'"/>
<returnstdout/>
</process>
Is there anyway wrap this code so that 'process' statement gets executed
only if
the remote machine is ready.
Thanks,
Umesh
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users