You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Pitre, Russell" <RP...@shawmut.com> on 2010/07/02 17:56:19 UTC

SFTP hangs after a day or two

Hello-

 

I'm using Camel 2.2 SFTP component like so:

 

from(sftp://user@ftpserver:22/OUTBOUND?delay=60000&delete=true&localWork
Directory=\\\\3050-b\\Intranet\\adp\\employee\\tmp&password=secret)

                .routeId("sftp")

                .log("Moving file ${file:name} to localWorkDirectory.")

                .to("file: \\\\3050-b\\Intranet\\adp\\employee");

 

Once a day, files are posted to the ftp server which the above route
will transfer to a local server.  This runs fine but then hangs after a
day or two.  This is a tough problem since I cannot reproduce it in
development to try out various uri options.  After taking a look at the
uri options for the sftp component page on the wiki, I noticed the
"disconnect" option.  It says it will disconnect right after use.  This
seems it might work but I don't fully understand how connections to the
ftp server are maintained within the Camel.  I would imagine they are
fault tolerant. 

 

Any thoughts on why this route may be hanging?  I've double-checked that
we are in fact using commons-net-2.0 as suggested in another users
mailing list post.

 

 

Any ideas?

 

Thanks,

Russ


RE: SFTP hangs after a day or two

Posted by "Pitre, Russell" <RP...@shawmut.com>.
Hi

Adding the "disconnect=true" option to the sftp uri seems to have solved my issue. 




-----Original Message-----
From: Claus Ibsen [mailto:claus.ibsen@gmail.com] 
Sent: Friday, July 02, 2010 12:42 PM
To: users@camel.apache.org
Subject: Re: SFTP hangs after a day or two

Hi

Camel 2.4 has better re-connect logic with the FTP components.
So wait for that release.

And yeah use the disconnect if you are not constantly polling from the remote FTP server.
Then its a better chance the FTPClient is capable of connecting when you need to poll.



On Fri, Jul 2, 2010 at 5:56 PM, Pitre, Russell <RP...@shawmut.com> wrote:
> Hello-
>
>
>
> I'm using Camel 2.2 SFTP component like so:
>
>
>
> from(sftp://user@ftpserver:22/OUTBOUND?delay=60000&delete=true&localWo
> rk
> Directory=\\\\3050-b\\Intranet\\adp\\employee\\tmp&password=secret)
>
>                .routeId("sftp")
>
>                .log("Moving file ${file:name} to localWorkDirectory.")
>
>                .to("file: \\\\3050-b\\Intranet\\adp\\employee");
>
>
>
> Once a day, files are posted to the ftp server which the above route 
> will transfer to a local server.  This runs fine but then hangs after 
> a day or two.  This is a tough problem since I cannot reproduce it in 
> development to try out various uri options.  After taking a look at 
> the uri options for the sftp component page on the wiki, I noticed the 
> "disconnect" option.  It says it will disconnect right after use.  
> This seems it might work but I don't fully understand how connections 
> to the ftp server are maintained within the Camel.  I would imagine 
> they are fault tolerant.
>
>
>
> Any thoughts on why this route may be hanging?  I've double-checked 
> that we are in fact using commons-net-2.0 as suggested in another 
> users mailing list post.
>
>
>
>
>
> Any ideas?
>
>
>
> Thanks,
>
> Russ
>
>



--
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: SFTP hangs after a day or two

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Camel 2.4 has better re-connect logic with the FTP components.
So wait for that release.

And yeah use the disconnect if you are not constantly polling from the
remote FTP server.
Then its a better chance the FTPClient is capable of connecting when
you need to poll.



On Fri, Jul 2, 2010 at 5:56 PM, Pitre, Russell <RP...@shawmut.com> wrote:
> Hello-
>
>
>
> I'm using Camel 2.2 SFTP component like so:
>
>
>
> from(sftp://user@ftpserver:22/OUTBOUND?delay=60000&delete=true&localWork
> Directory=\\\\3050-b\\Intranet\\adp\\employee\\tmp&password=secret)
>
>                .routeId("sftp")
>
>                .log("Moving file ${file:name} to localWorkDirectory.")
>
>                .to("file: \\\\3050-b\\Intranet\\adp\\employee");
>
>
>
> Once a day, files are posted to the ftp server which the above route
> will transfer to a local server.  This runs fine but then hangs after a
> day or two.  This is a tough problem since I cannot reproduce it in
> development to try out various uri options.  After taking a look at the
> uri options for the sftp component page on the wiki, I noticed the
> "disconnect" option.  It says it will disconnect right after use.  This
> seems it might work but I don't fully understand how connections to the
> ftp server are maintained within the Camel.  I would imagine they are
> fault tolerant.
>
>
>
> Any thoughts on why this route may be hanging?  I've double-checked that
> we are in fact using commons-net-2.0 as suggested in another users
> mailing list post.
>
>
>
>
>
> Any ideas?
>
>
>
> Thanks,
>
> Russ
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus