You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by sum124 <su...@yahoo.com> on 2011/10/17 16:02:22 UTC

Commons FTP Access file twice parallelly

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: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: Commons FTP Access file twice parallelly

Posted by sum124 <su...@yahoo.com>.
Yep the number of simultaneous connections is 10. 

--
View this message in context: http://apache-commons.680414.n4.nabble.com/Commons-FTP-Access-file-twice-parallelly-tp3912149p3913460.html
Sent from the Commons - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: Commons FTP Access file twice parallelly

Posted by sum124 <su...@yahoo.com>.
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.

--
View this message in context: http://apache-commons.680414.n4.nabble.com/Commons-FTP-Access-file-twice-parallelly-tp3912149p3912660.html
Sent from the Commons - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: Commons FTP Access file twice parallelly

Posted by Steven Siebert <sm...@gmail.com>.
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 <su...@yahoo.com> 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: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>


-- 
S

*"When all you have is a hammer, everything looks like a skull."*

Re: Commons FTP Access file twice parallelly

Posted by sum124 <su...@yahoo.com>.
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: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: Commons FTP Access file twice parallelly

Posted by Steven Siebert <sm...@gmail.com>.
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 <su...@yahoo.com> 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: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>


-- 
S

*"When all you have is a hammer, everything looks like a skull."*

Re: Commons FTP Access file twice parallelly

Posted by sum124 <su...@yahoo.com>.
No destinations are different, .

--
View this message in context: http://apache-commons.680414.n4.nabble.com/Commons-FTP-Access-file-twice-parallelly-tp3912149p3912532.html
Sent from the Commons - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: Commons FTP Access file twice parallelly

Posted by sebb <se...@gmail.com>.
On 17 October 2011 15:02, sum124 <su...@yahoo.com> 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: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org