You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Marcin Kudla <ma...@gmail.com> on 2024/04/23 09:56:21 UTC
[NET] 451-Error during read from data connection
Hi
I used Apache Commons Net for long time without problems, but recently I
get error from one of us server when we try to upload files over ftps.
Error: 451-Error during read from data connection
451-Transfer aborted
451 0.233 seconds (measured here), 68.53 Kbytes per second
This error occurs always on specific files, other files upload without
problems.
Here is some example of my code:
FTPSClient client = new FTPSClient();
client.setAuthValue("TLS");
client.setControlEncoding("UTF-8");
client.connect("host", "port");
client.login("user", "passw");
client.setKeepAlive(true);
client.enterLocalPassiveMode();
client.execPBSZ(0);
client.execPROT("P");
client.setFileType(FTP.BINARY_FILE_TYPE);
client.storeFile(remotePath, inputStream)
Server is Pure-FTPd, I tried set some buffers values for client but nothing
help.
Do you have any suggestions as to what could be the problem?
Regards,
Marcin Kudla
Re: [NET] 451-Error during read from data connection
Posted by Marcin Kudla <ma...@gmail.com>.
Hi
Thanks for response. Yes, we used current version 3.10.0. It's hardly to
reproduce because problem is on our client server and problem occurs
randomly.
But I will ask our client about the possibility of testing with newest
snapshot and will try come back with the results.
Regards,
Marcin Kudla
wt., 28 maj 2024 o 22:10 Gary Gregory <ga...@gmail.com> napisał(a):
> You can also test with a 3.11.0 snapshot build from git master or
>
> https://repository.apache.org/content/repositories/snapshots/commons-net/commons-net/3.11.0-SNAPSHOT/
>
> TY,
> Gary
>
> On Tue, Apr 23, 2024 at 7:14 AM Gary Gregory <ga...@gmail.com>
> wrote:
> >
> > Hello Marcin,
> >
> > What version are you using? Make sure yoy test with the current version
> 3.10.0. Without a reproducible integration test, we don't have anything to
> debug. If you can create a PR with a smallest reproducible test case, that
> would be grea. You can use Docker if it can't all be done in Java.
> >
> > Gary
> >
> > On Tue, Apr 23, 2024, 5:57 AM Marcin Kudla <ma...@gmail.com>
> wrote:
> >>
> >> Hi
> >>
> >> I used Apache Commons Net for long time without problems, but recently I
> >> get error from one of us server when we try to upload files over ftps.
> >>
> >> Error: 451-Error during read from data connection
> >> 451-Transfer aborted
> >> 451 0.233 seconds (measured here), 68.53 Kbytes per second
> >>
> >> This error occurs always on specific files, other files upload without
> >> problems.
> >>
> >> Here is some example of my code:
> >>
> >> FTPSClient client = new FTPSClient();
> >> client.setAuthValue("TLS");
> >> client.setControlEncoding("UTF-8");
> >> client.connect("host", "port");
> >> client.login("user", "passw");
> >> client.setKeepAlive(true);
> >> client.enterLocalPassiveMode();
> >> client.execPBSZ(0);
> >> client.execPROT("P");
> >> client.setFileType(FTP.BINARY_FILE_TYPE);
> >>
> >> client.storeFile(remotePath, inputStream)
> >>
> >> Server is Pure-FTPd, I tried set some buffers values for client but
> nothing
> >> help.
> >>
> >> Do you have any suggestions as to what could be the problem?
> >>
> >> Regards,
> >>
> >> Marcin Kudla
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>
Re: [NET] 451-Error during read from data connection
Posted by Gary Gregory <ga...@gmail.com>.
You can also test with a 3.11.0 snapshot build from git master or
https://repository.apache.org/content/repositories/snapshots/commons-net/commons-net/3.11.0-SNAPSHOT/
TY,
Gary
On Tue, Apr 23, 2024 at 7:14 AM Gary Gregory <ga...@gmail.com> wrote:
>
> Hello Marcin,
>
> What version are you using? Make sure yoy test with the current version 3.10.0. Without a reproducible integration test, we don't have anything to debug. If you can create a PR with a smallest reproducible test case, that would be grea. You can use Docker if it can't all be done in Java.
>
> Gary
>
> On Tue, Apr 23, 2024, 5:57 AM Marcin Kudla <ma...@gmail.com> wrote:
>>
>> Hi
>>
>> I used Apache Commons Net for long time without problems, but recently I
>> get error from one of us server when we try to upload files over ftps.
>>
>> Error: 451-Error during read from data connection
>> 451-Transfer aborted
>> 451 0.233 seconds (measured here), 68.53 Kbytes per second
>>
>> This error occurs always on specific files, other files upload without
>> problems.
>>
>> Here is some example of my code:
>>
>> FTPSClient client = new FTPSClient();
>> client.setAuthValue("TLS");
>> client.setControlEncoding("UTF-8");
>> client.connect("host", "port");
>> client.login("user", "passw");
>> client.setKeepAlive(true);
>> client.enterLocalPassiveMode();
>> client.execPBSZ(0);
>> client.execPROT("P");
>> client.setFileType(FTP.BINARY_FILE_TYPE);
>>
>> client.storeFile(remotePath, inputStream)
>>
>> Server is Pure-FTPd, I tried set some buffers values for client but nothing
>> help.
>>
>> Do you have any suggestions as to what could be the problem?
>>
>> Regards,
>>
>> Marcin Kudla
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: [NET] 451-Error during read from data connection
Posted by Gary Gregory <ga...@gmail.com>.
Hello Marcin,
What version are you using? Make sure yoy test with the current version
3.10.0. Without a reproducible integration test, we don't have anything to
debug. If you can create a PR with a smallest reproducible test case,
that would be grea. You can use Docker if it can't all be done in Java.
Gary
On Tue, Apr 23, 2024, 5:57 AM Marcin Kudla <ma...@gmail.com> wrote:
> Hi
>
> I used Apache Commons Net for long time without problems, but recently I
> get error from one of us server when we try to upload files over ftps.
>
> Error: 451-Error during read from data connection
> 451-Transfer aborted
> 451 0.233 seconds (measured here), 68.53 Kbytes per second
>
> This error occurs always on specific files, other files upload without
> problems.
>
> Here is some example of my code:
>
> FTPSClient client = new FTPSClient();
> client.setAuthValue("TLS");
> client.setControlEncoding("UTF-8");
> client.connect("host", "port");
> client.login("user", "passw");
> client.setKeepAlive(true);
> client.enterLocalPassiveMode();
> client.execPBSZ(0);
> client.execPROT("P");
> client.setFileType(FTP.BINARY_FILE_TYPE);
>
> client.storeFile(remotePath, inputStream)
>
> Server is Pure-FTPd, I tried set some buffers values for client but nothing
> help.
>
> Do you have any suggestions as to what could be the problem?
>
> Regards,
>
> Marcin Kudla
>