Commons FTP Access file twice parallelly

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Commons FTP Access file twice parallelly

sum124
Hello,

Scenario: TWO Cronjob running simulaneously (means at the same time ) to FTP download a same file using same login from the server to the machine.  
I am getting a commons.net.ftp.FTPConnectionClosedException: Connection closed without indication exception. for files which I want to download.

But strangely I do see that the file exists on the server, and one of the download succeeds where the other fails which gets started later.

Can some one point me to how to workaround this.

-S
Reply | Threaded
Open this post in threaded view
|

Re: Commons FTP Access file twice parallelly

Steve Siebert
How many simultaneous connections for a set of credentials are permitted on
the server?  The default for most *nix systems I've seen is 10, but could
have been set to something different...

S

On Mon, Oct 17, 2011 at 10:02 AM, sum124 <[hidden email]> wrote:

> Hello,
>
> Scenario: TWO Cronjob running simulaneously (means at the same time ) to
> FTP
> download a same file using same login from the server to the machine.
> I am getting a commons.net.ftp.FTPConnectionClosedException: Connection
> closed without indication exception. for files which I want to download.
>
> But strangely I do see that the file exists on the server, and one of the
> download succeeds where the other fails which gets started later.
>
> Can some one point me to how to workaround this.
>
> -S
>
> --
> View this message in context:
> http://apache-commons.680414.n4.nabble.com/Commons-FTP-Access-file-twice-parallelly-tp3912149p3912149.html
> Sent from the Commons - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
S

*"When all you have is a hammer, everything looks like a skull."*
Reply | Threaded
Open this post in threaded view
|

Re: Commons FTP Access file twice parallelly

sebb-2-2
In reply to this post by sum124
On 17 October 2011 15:02, sum124 <[hidden email]> wrote:

> Hello,
>
> Scenario: TWO Cronjob running simulaneously (means at the same time ) to FTP
> download a same file using same login from the server to the machine.
> I am getting a commons.net.ftp.FTPConnectionClosedException: Connection
> closed without indication exception. for files which I want to download.
>
> But strangely I do see that the file exists on the server, and one of the
> download succeeds where the other fails which gets started later.
>
> Can some one point me to how to workaround this.

What happens if the two cronjobs try to download different files?
Does that always work? If not, fix that first.

Are the local destination files the same?
If so, change them so they are different.

> -S
>
> --
> View this message in context: http://apache-commons.680414.n4.nabble.com/Commons-FTP-Access-file-twice-parallelly-tp3912149p3912149.html
> Sent from the Commons - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Commons FTP Access file twice parallelly

sum124
In reply to this post by Steve Siebert
Sorry, I dont know the number of simultaneous connections allowed on the box. But, I just tested that application,  and it succeeded for simulaneous connections on windows, somehow. The file got saved in two different directories.

But dont know why it failed on UNIX for only one of the instances.
Reply | Threaded
Open this post in threaded view
|

Re: Commons FTP Access file twice parallelly

sum124
In reply to this post by sebb-2-2
No destinations are different, .
Reply | Threaded
Open this post in threaded view
|

Re: Commons FTP Access file twice parallelly

Steve Siebert
In reply to this post by sum124
So I understand...you changed the server side of this from a Unix to Windows
server, and your application is working now?  Can you have more than one
simultaneous connection with the unix server when not downloading the same
file?  I'm asking about this because I experienced a similar situation where
the server side was restricting my number of connections and I had to add
thread/connection throttling to one of my simple apps support the different
server configurations.

I'm wondering why you want to download the file twice over (I assume) the
WAN instead of grabbing the remote copy once and doing a local copy...it
would be nicer on both the remote server and the associated network
segments.  It would also solve your parallel download issue without having
to do any more diagnosis.

S

On Mon, Oct 17, 2011 at 12:12 PM, sum124 <[hidden email]> wrote:

> Sorry, I dont know the number of simultaneous connections allowed on the
> box.
> But, I just tested that application,  and it succeeded for simulaneous
> connections on windows, somehow. The file got saved in two different
> directories.
>
> But dont know why it failed on UNIX for only one of the instances.
>
> --
> View this message in context:
> http://apache-commons.680414.n4.nabble.com/Commons-FTP-Access-file-twice-parallelly-tp3912149p3912528.html
> Sent from the Commons - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
S

*"When all you have is a hammer, everything looks like a skull."*
Reply | Threaded
Open this post in threaded view
|

Re: Commons FTP Access file twice parallelly

sum124
Thanks for the reponse, As of now, I dont know and  am trying to get details on simulatenous connections.

I thought about the same to download it once and then duplicate it. But this doesnt fit our requirements since we use a specific process for even deployment of scripts to various environments.
Each of these downloads are for specific environments(for Now. test and QA) which happens within a specific timeframe after which the file on the FTP server gets processed and deleted.

Yes the thing worked on windows somehow, I used task scheduler to run them simulatenously.
Reply | Threaded
Open this post in threaded view
|

Re: Commons FTP Access file twice parallelly

sum124
In reply to this post by Steve Siebert
Yep the number of simultaneous connections is 10.