No the staf service request returns immediately with the socket error
(see previous posts).  I realize there are no actual socket/tcp
options for read timeouts; however within the socket implementation
you have provided you have implemented a timeout when performing a
read that returns the error code 22.

The particulars of the requests I am issuing should never take long;
ie I don't need to implement any waits; I'm simply resolving a
variable or performing a non-recursive file listing.

It sounds as if the timeout on a recv() is what I'm looking for.
Thanks for your help Sharon, much appreciated.

Raymond

On Thu, Jun 11, 2009 at 09:13, Sharon Lucas<luc...@us.ibm.com> wrote:
>
> Are you experiencing a STAF service request hanging?
>
> You can't set a timeout on socket read operations.  In the next version of
> STAF (planned to be released as the end of June), we added timeouts on
> sockets, e.g. on a recv(), but we could only do this at the beginning of
> submitting a STAF request, not while waiting for a result as some STAF
> service requests can wait indefinitely for a response such as:
>
> STAF machine QUEUE GET WAIT
> STAF machine PROCESS START COMMAND yourCommand WAIT
>
> Note that there is some tuning you can do that applies to when STAF attempts
> to connect to a remote system as described in the STAF User's Guide in the
> following sections (but this won't help you if the problem you're
> experiencing occurs after connecting to a machine):
>
> 4.7 Operational parameters
>
> CONNECTATTEMPTS specifies the maximum number of times to attempt to connect
> to a remote system. The default is 2. Note that a trace warning message is
> generated for each failed attempt if the Warning trace point is enabled. You
> may also change this setting dynamically using the MISC service's SET
> command.
>
> CONNECTRETRYDELAY specifies the maximum time in milliseconds to wait after a
> failed connection attempt to a remote system before trying to connect again
> (if the maximum number of times to attempt to connect to a remote system has
> not been reached yet). The default is 1000 (i.e., 1 second). You may also
> change this setting dynamically using the MISC service's SET command.
>
> 4.3.2 STAFTCP Connection Provider
>
> The STAFTCP connection provider supports the following OPTIONs:
>
> CONNECTTIMEOUT=<Number> specifies the maximum time in milliseconds to wait
> for a connection attempt to a remote system to succeed. The default is 5000
> (5 seconds). You may need to increase this value if you are consistently
> receiving return code 16 when trying to communicate with distant STAF
> systems. Note that the total time to wait for a connection to a remote
> system to succeed is (CONNECTTIMEOUT * CONNECTATTEMPTS) + (CONNECTRETRYDELAY
> * (CONNECTATTEMPTS - 1)). If using the defaults, the maximum total time to
> wait for a connection to a remote system to succeed is (5000 * 2) + (1000 *
> 1), which equals 11 seconds. The CONNECTATTEMPTS and CONNECTRETRYDELAY
> values are operational parameters that can be set in the STAF configuration
> file.
>
> --------------------------------------------------------------
> Sharon Lucas
> IBM Austin,   luc...@us.ibm.com
> (512) 286-7313 or Tieline 363-7313
>
>
>
> Raymond Kroeker <raykroe...@gmail.com>
>
> 06/11/2009 08:37 AM
>
> Please respond to
> raykroe...@gmail.com
> To
> Sharon Lucas/Austin/i...@ibmus
> cc
> staf-users@lists.sourceforge.net
> Subject
> Re: [staf-users] Fwd: Staf IO Exception
>
>
>
>
> Is it possible to tune the sockets to be more flexible, ie set a
> timeout on read operations?
>
> Raymond
>
> On Tue, Jun 9, 2009 at 14:07, Sharon Lucas<luc...@us.ibm.com> wrote:
>>
>> When you get an RC 22 using the tcp interface, this usually means that
>> there
>> an error occurred transmitting data across the network (or STAFProc on the
>> remote machine shut down during the request).  You might be experiencing
>> some problems in your network.
>>
>> # staf local help error 22
>> Response
>> --------
>> Description: Communication error
>> Details    : This indicates an error transmitting data across the network,
>> or to
>>  the local STAF process.  For example, you would receive this error if
>> STAFProc.
>> exe was terminated in the middle of a service request, or if a bridge went
>> down
>> in the middle of a remote service request.  This can also indicate that
>> the
>> requ
>> ested endpoint is not valid (e.g. it has an invalid network interface and
>> port c
>> ombination such as a non-secure tcp interface with the port for a secure
>> ssl
>> int
>> erface).
>>
>> STAF creates a server socket for an interface when STAFProc is started and
>> creates a client socket for each STAF service request that is submitted
>> (which is connected until the request completes and the result is sent
>> back).  To get more information on low level socket stuff, you wouldn't
>> use
>> STAF tracing.  Instead you can use network debugging/monitor tools (e.g.
>> network sniffer) that are available for your operating system.  Google for
>> more information.
>>
>> --------------------------------------------------------------
>> Sharon Lucas
>> IBM Austin,   luc...@us.ibm.com
>> (512) 286-7313 or Tieline 363-7313
>>
>>
>>
>> Raymond Kroeker <raykroe...@gmail.com>
>>
>> 06/09/2009 09:14 AM
>>
>> Please respond to
>> raykroe...@gmail.com
>> To
>> staf-users@lists.sourceforge.net
>> cc
>> Subject
>> [staf-users] Fwd:  Staf IO Exception
>>
>>
>>
>>
>> ---------- Forwarded message ----------
>> From: Raymond Kroeker <raykroe...@gmail.com>
>> Date: Tue, Jun 9, 2009 at 07:14
>> Subject: Re: [staf-users] Staf IO Exception
>> To: Sharon Lucas <luc...@us.ibm.com>
>>
>>
>> I removed the ssl interface and am hitting a similar issue:
>>
>> STAFConnectionReadUInt: Error reading from socket: recv() RC=104: 22
>>
>> I haven't looked into the native code; so a question I have is:
>>
>> What is the life-cycle of a socket?  When is it created?  How long
>> does it stay connected?  Does STAF include application layer protocols
>> to keep it alive?
>>
>> Also I cannot find documentation on how to turn up the verbosity of
>> the loging of the low level socket code.  If this is possible it might
>> help identify this issue.
>>
>> -----------------------------------------------------
>> Raymond Kroeker
>>
>> On Mon, Jun 8, 2009 at 10:06, Raymond Kroeker<raykroe...@gmail.com> wrote:
>>> I am running STAF 3.3.2 on both systems; and have tcp/ssl configured
>>> on both as well.
>>>
>>> I have attached the output of the version/interface commands as well
>>> as the install properties for both systems.  I would really appreciate
>>> a build with the fix and will attempt the workaround as well to
>>> identify whether this clears up the issue.
>>>
>>> I appreciate your help, thanks again Sharon.
>>>
>>> ---------------------------------------------------
>>> Raymond Kroeker
>>>
>>> On Mon, Jun 8, 2009 at 09:17, Sharon Lucas<luc...@us.ibm.com> wrote:
>>>>
>>>> What version of STAF is on your Ubuntu 8.04 Server box and what version
>>>> of
>>>> STAF is on your Windows 2003 Server box?
>>>>
>>>>     STAF machine MISC VERSION
>>>>
>>>> Also, what interfaces (aka connection providers) do you have configured
>>>> on
>>>> these two machines?
>>>>
>>>>     STAF machine MISC LIST INTERFACES
>>>>
>>>> The problem is in the SSL connection provider (first added in STAF
>>>> V3.3.0).
>>>>  We have fixed the following bug in the STAF SSL connection provider in
>>>> the
>>>> next release of STAF (planned to be released at the end of June 2009)
>>>> which
>>>> may resolve the problem you are seeing.  I could provide you with a
>>>> private
>>>> version of this new STAF version for you to try to see if it resolves
>>>> the
>>>> problem you're seeing.  If you're interested in trying this version,
>>>> also
>>>> post the contents of the install.properties file in the directory where
>>>> you
>>>> installed STAF (e.g. C:\STAF or /usr/local/staf) on these two machines.
>>>>
>>>>   - Fixed intermittent hangs that could occur submitting any STAF
>>>> service
>>>> request by changing SSL_connect() to use a non-blocking socket to
>>>> prevent
>>>> a
>>>> SSL handshake from exceeding the connection timeout (Bug #2727266)
>>>>
>>>> A workaround for this problem is to comment out the ssl interface line
>>>> in
>>>> the STAF.cfg files temporarily until this problem is resolved so that
>>>> STAF
>>>> would use the non-secure TCP/IP interface (e.g. tcp) instead of the SSL
>>>> TCP/IP interface (e.g. ssl) to communicate to remote machines.  To
>>>> comment
>>>> out the ssl interface. insert a "#" at the beginning of the "interface
>>>> ssl"
>>>> line as follows:
>>>>
>>>> # Enable TCP/IP connections
>>>> #interface ssl library STAFTCP option Secure=Yes option Port=6550
>>>> interface tcp library STAFTCP option Secure=No  option Port=6500
>>>>
>>>> Note that it would be best to see if this problem has already been
>>>> resolved
>>>> or not by trying out the private version of STAF.  Let me know if you're
>>>> interested in trying it out.  Thanks.
>>>>
>>>> --------------------------------------------------------------
>>>> Sharon Lucas
>>>> IBM Austin,   luc...@us.ibm.com
>>>> (512) 286-7313 or Tieline 363-7313
>>>>
>>>>
>>>>
>>>> Raymond Kroeker <raykroe...@gmail.com>
>>>>
>>>> 06/06/2009 10:48 AM
>>>>
>>>> Please respond to
>>>> raykroe...@gmail.com
>>>> To
>>>> staf-users@lists.sourceforge.net
>>>> cc
>>>> Subject
>>>> [staf-users] Staf IO Exception
>>>>
>>>>
>>>>
>>>>
>>>> I'm currently having an intermittent but repeatable issue where I get
>>>> an error when trying to read a remote staf variable on a Windows 2003
>>>> Server box from an Ubuntu 8.04 Server box.
>>>>
>>>> Here is the trace from the WIndows box:
>>>> 20090606-01:56:55;388;00002000;Caught STAFException in
>>>> HandleRequest(): Connection terminated unexpectedly. , Exception:
>>>> STAFConnectionIOException, Location:
>>>>
>>>>
>>>> c:\dev\autobuild\build\src\staf\stafif\STAFConnectionProviderInlImpl.cpp(251),
>>>> Text: STAFConnectionRead: Error reading from socket: SSL_read()
>>>> RC=10038 SSL error: error:00000000:lib(0):func(0):reason(0), Error
>>>> code: 22
>>>>
>>>>
>>>> Here is the stack from the Ubuntu box:
>>>> STAFConnectionReadUInt: Error reading from socket: other side closed
>>>> socket:
>>>> 22
>>>>
>>>> Here is the request being issued:
>>>> staf4 var resolve system string {STAF/Config/Sep/File}
>>>>
>>>> Can anyone shed any light as to why this may be happening?
>>>>
>>>> --
>>>> ---------------------------------------------------------
>>>> Raymond Kroeker
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
>>>> looking to deploy the next generation of Solaris that includes the
>>>> latest
>>>> innovations from Sun and the OpenSource community. Download a copy and
>>>> enjoy capabilities such as Networking, Storage and Virtualization.
>>>> Go to: http://p.sf.net/sfu/opensolaris-get
>>>> _______________________________________________
>>>> staf-users mailing list
>>>> staf-users@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/staf-users
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> ---------------------------------------------------------
>>> Raymond Kroeker
>>>
>>
>>
>>
>> --
>> ---------------------------------------------------------
>> Raymond Kroeker
>>
>>
>>
>> --
>> ---------------------------------------------------------
>> Raymond Kroeker
>>
>>
>> ------------------------------------------------------------------------------
>> Crystal Reports - New Free Runtime and 30 Day Trial
>> Check out the new simplified licensing option that enables unlimited
>> royalty-free distribution of the report engine for externally facing
>> server and web deployment.
>> http://p.sf.net/sfu/businessobjects
>> _______________________________________________
>> staf-users mailing list
>> staf-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/staf-users
>>
>>
>
>
>
> --
> ---------------------------------------------------------
> Raymond Kroeker
>
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables unlimited
> royalty-free distribution of the report engine for externally facing
> server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> staf-users mailing list
> staf-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/staf-users
>
>



-- 
---------------------------------------------------------
Raymond Kroeker

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to