You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sebb <se...@gmail.com> on 2021/07/27 15:05:22 UTC

[NET] Issues with FTPSClientTest and JKS files

Something strange is going on with the FTPSClientTest.

One my macOS system, the original jks file works with all my Java installations:
Java 8 (Oracle and AdoptOpenJDK)
Java 11 (Oracle and AdoptOpenJDK)
Java 15 (Oracle)
Java 16 (AdoptOpenJDK)

With the jre8.jks, only Java8 works; the others all fail with:
java.io.EOFException: SSL peer shut down incorrectly

With jre16.jks and java 16, I get
java.io.EOFException: SSL peer shut down incorrectly

However, when GitHub builds using the original JKS file, only Java 8 works.
Java 11, 16 and 17 all hang when running FTPSClientTest

Any ideas?

Sebb.

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


Re: [NET] Issues with FTPSClientTest and JKS files

Posted by sebb <se...@gmail.com>.
On Thu, 29 Jul 2021 at 14:22, sebb <se...@gmail.com> wrote:
>
> On Thu, 29 Jul 2021 at 13:43, Gary Gregory <ga...@gmail.com> wrote:
> >
> > On Tue, Jul 27, 2021 at 7:38 PM sebb <se...@gmail.com> wrote:
> > >
> > > On Tue, 27 Jul 2021 at 16:05, sebb <se...@gmail.com> wrote:
> > > >
> > > > Something strange is going on with the FTPSClientTest.
> > > >
> > > > One my macOS system, the original jks file works with all my Java installations:
> > > > Java 8 (Oracle and AdoptOpenJDK)
> > > > Java 11 (Oracle and AdoptOpenJDK)
> > > > Java 15 (Oracle)
> > > > Java 16 (AdoptOpenJDK)
> > > >
> > > > With the jre8.jks, only Java8 works; the others all fail with:
> > > > java.io.EOFException: SSL peer shut down incorrectly
> > > >
> > > > With jre16.jks and java 16, I get
> > > > java.io.EOFException: SSL peer shut down incorrectly
> > > >
> > > > However, when GitHub builds using the original JKS file, only Java 8 works.
> > > > Java 11, 16 and 17 all hang when running FTPSClientTest
> > >
> > > Lots of debugging later, and it looks like the MINA server does not
> > > always see the USER command, so that test is timing out.
> > > However it does work sometimes (in all the JDK versions), so it does
> > > not seem to be an issue with the JKS file (currently using the
> > > original one).
> > >
> > > The code works OK on Jenkins (currently using JDK 16).
> > >
> > > Why is only GitHub failing?
> >
> > Could there be a subtle difference in OS and JRE version?
>
> It's not just the OS, because Java 8 works on GitHub with the same OS.
>
> Obviously something is different, otherwise we would not see a
> consistent difference in behaviour.
>
> Question is: how to proceed?
>
> It seems to be associated with MINA embedded FTP server: is there an
> alternative that could be used for the test?

I've found a work-round: add a short sleep (200 ms) before the USER command.
I added it because I noticed that the the MINA ftpserver did not
appear to receive the USER command.
So perhaps the previous commands sometimes need a bit of time to catch up?
I'm just guessing.

> BTW, we still need to document how the original JKS file was created.

This is still the case.

> The new ones don't work reliably.
I have deleted them.

> > Gary
> >
> > >
> > > > Any ideas?
> > > >
> > > > Sebb.
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > For additional commands, e-mail: dev-help@commons.apache.org
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > For additional commands, e-mail: dev-help@commons.apache.org
> >

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


Re: [NET] Issues with FTPSClientTest and JKS files

Posted by sebb <se...@gmail.com>.
On Thu, 29 Jul 2021 at 13:43, Gary Gregory <ga...@gmail.com> wrote:
>
> On Tue, Jul 27, 2021 at 7:38 PM sebb <se...@gmail.com> wrote:
> >
> > On Tue, 27 Jul 2021 at 16:05, sebb <se...@gmail.com> wrote:
> > >
> > > Something strange is going on with the FTPSClientTest.
> > >
> > > One my macOS system, the original jks file works with all my Java installations:
> > > Java 8 (Oracle and AdoptOpenJDK)
> > > Java 11 (Oracle and AdoptOpenJDK)
> > > Java 15 (Oracle)
> > > Java 16 (AdoptOpenJDK)
> > >
> > > With the jre8.jks, only Java8 works; the others all fail with:
> > > java.io.EOFException: SSL peer shut down incorrectly
> > >
> > > With jre16.jks and java 16, I get
> > > java.io.EOFException: SSL peer shut down incorrectly
> > >
> > > However, when GitHub builds using the original JKS file, only Java 8 works.
> > > Java 11, 16 and 17 all hang when running FTPSClientTest
> >
> > Lots of debugging later, and it looks like the MINA server does not
> > always see the USER command, so that test is timing out.
> > However it does work sometimes (in all the JDK versions), so it does
> > not seem to be an issue with the JKS file (currently using the
> > original one).
> >
> > The code works OK on Jenkins (currently using JDK 16).
> >
> > Why is only GitHub failing?
>
> Could there be a subtle difference in OS and JRE version?

It's not just the OS, because Java 8 works on GitHub with the same OS.

Obviously something is different, otherwise we would not see a
consistent difference in behaviour.

Question is: how to proceed?

It seems to be associated with MINA embedded FTP server: is there an
alternative that could be used for the test?

BTW, we still need to document how the original JKS file was created.
The new ones don't work reliably.

> Gary
>
> >
> > > Any ideas?
> > >
> > > Sebb.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > For additional commands, e-mail: dev-help@commons.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

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


Re: [NET] Issues with FTPSClientTest and JKS files

Posted by Gary Gregory <ga...@gmail.com>.
On Tue, Jul 27, 2021 at 7:38 PM sebb <se...@gmail.com> wrote:
>
> On Tue, 27 Jul 2021 at 16:05, sebb <se...@gmail.com> wrote:
> >
> > Something strange is going on with the FTPSClientTest.
> >
> > One my macOS system, the original jks file works with all my Java installations:
> > Java 8 (Oracle and AdoptOpenJDK)
> > Java 11 (Oracle and AdoptOpenJDK)
> > Java 15 (Oracle)
> > Java 16 (AdoptOpenJDK)
> >
> > With the jre8.jks, only Java8 works; the others all fail with:
> > java.io.EOFException: SSL peer shut down incorrectly
> >
> > With jre16.jks and java 16, I get
> > java.io.EOFException: SSL peer shut down incorrectly
> >
> > However, when GitHub builds using the original JKS file, only Java 8 works.
> > Java 11, 16 and 17 all hang when running FTPSClientTest
>
> Lots of debugging later, and it looks like the MINA server does not
> always see the USER command, so that test is timing out.
> However it does work sometimes (in all the JDK versions), so it does
> not seem to be an issue with the JKS file (currently using the
> original one).
>
> The code works OK on Jenkins (currently using JDK 16).
>
> Why is only GitHub failing?

Could there be a subtle difference in OS and JRE version?

Gary

>
> > Any ideas?
> >
> > Sebb.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

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


Re: [NET] Issues with FTPSClientTest and JKS files

Posted by sebb <se...@gmail.com>.
On Tue, 27 Jul 2021 at 16:05, sebb <se...@gmail.com> wrote:
>
> Something strange is going on with the FTPSClientTest.
>
> One my macOS system, the original jks file works with all my Java installations:
> Java 8 (Oracle and AdoptOpenJDK)
> Java 11 (Oracle and AdoptOpenJDK)
> Java 15 (Oracle)
> Java 16 (AdoptOpenJDK)
>
> With the jre8.jks, only Java8 works; the others all fail with:
> java.io.EOFException: SSL peer shut down incorrectly
>
> With jre16.jks and java 16, I get
> java.io.EOFException: SSL peer shut down incorrectly
>
> However, when GitHub builds using the original JKS file, only Java 8 works.
> Java 11, 16 and 17 all hang when running FTPSClientTest

Lots of debugging later, and it looks like the MINA server does not
always see the USER command, so that test is timing out.
However it does work sometimes (in all the JDK versions), so it does
not seem to be an issue with the JKS file (currently using the
original one).

The code works OK on Jenkins (currently using JDK 16).

Why is only GitHub failing?

> Any ideas?
>
> Sebb.

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