[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FTPAPI connection reset
Upon further review...
I don't believe the socket reset is being thrown at the FTP_quit() call..
Instead, I think it is coming here in ftp_putraw() when the Reply()
procedure is called after put_block() completes...
* note that we don't do "line mode" for a put.
* it'd be kinda pointless, since we're not reading
* the results... plus, all it would be is a custom read proc...
B01 c if put_block(wwSock: peDescr: peReadProc)<0
c return -1
E01 c endif
* 226 Transfer Complete.
c eval wwReply = Reply(peSocket: wwMsg)
Assuming this is correct, quietly swallowing there error in our code
is not an option.
I suppose we might be able to do so somewhere in the above FTPAPI
code. But that doesn't seem like a good idea.
Instead, i think the only real answer is to modify put_block() to
periodically send something out the command channel..
Thoughts?
Charles
On Thu, Mar 1, 2012 at 9:28 AM, Charles Wilt <charles.wilt@xxxxxxxxx> wrote:
> We are using FTPAPI to transfer files to a WebMethods Integration Server...
>
> Once and a while, we'll see an exception thrown: "A connection with a
> remote socket was reset by that socket"
>
> It appears to occur after the data transfer completes, the file is
> intact at the destination, when our RPG program calls the FTP_Quit
> procedure.
>
> Given that the file transfer takes 5+ min, I'm assuming the command
> channel connection is being closed by the remote machine due to
> inactivity...from what I'm been able to find about FTP in general,
> this is not an unknown problem.
>
> Has anybody run into this?
>
> The question, assuming we can't ask the Webmethod guys to increase
> their timeout, how can we handle this on our side?
>
> My research has shown that at least a few FTP clients handle this by
> using a "keep-alive"; periodically issuing a command such as SITE over
> the command channel while the data transfer is going on. I'm thinking
> the FTPAPI put_block() procedure could be modified to do this...
>
> Otherwise, I supposed we could just quietly swallow the error...as it
> doesn't really matter.
>
> Thoughts?
>
> Thanks!
> Charles
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------