Hello!

I've been having a great time with ftpserver. I've been developing a
toy tool just for learning and some work related stuff. All good with
it.

But recently I needed to add FTPS support to it and I can't make it work.

To pinpoint the problem, I will use the EmbeddingFtpServer.java[1] example.

It is simply not working for me. It throws some exceptions that I'll show below.

Does the same happen to you? Is there something am I missing?

Thank you very much!


# Environment

As the "Embedding" guide[2] tells, this is the list of jars I have in
my classpath:

 - ftplet-api-1.1.1.jar
 - ftpserver-core-1.1.1.jar
 - mina-core-2.0.21.jar
 - slf4j-api-1.7.31.jar
 - slf4j-simple-1.7.31.jar

I'm running Ubuntu Linux 20.04.2 LTS
I'm managing Java with SDKMAN.

The java version is:

openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK-11.0.11+9 (build 11.0.11+9, mixed mode)

The javac version is: javac 11.0.11


# The Stacktrace

This is part of the full log and stack trace I'm pasting in this link[3].

```plain
[main] INFO org.apache.ftpserver.impl.DefaultFtpServer - FTP server started
[NioProcessor-3] INFO
org.apache.ftpserver.listener.nio.FtpLoggingFilter - CREATED
[pool-3-thread-1] INFO
org.apache.ftpserver.listener.nio.FtpLoggingFilter - OPENED
[pool-3-thread-1] WARN
org.apache.ftpserver.listener.nio.FtpLoggingFilter - EXCEPTION :
javax.net.ssl.SSLException: Improper close state: Status = OK
HandshakeStatus = NEED_WRAP
bytesConsumed = 0 bytesProduced = 160 sequenceNumber = 0

...

[pool-3-thread-1] ERROR org.apache.ftpserver.impl.DefaultFtpHandler -
Exception caught, closing session
javax.net.ssl.SSLException: Improper close state: Status = OK
HandshakeStatus = NEED_WRAP
bytesConsumed = 0 bytesProduced = 160 sequenceNumber = 0

...

[pool-3-thread-1] WARN
org.apache.ftpserver.listener.nio.FtpLoggingFilter - EXCEPTION :
javax.net.ssl.SSLHandshakeException: SSL handshake failed.
...
Caused by: javax.net.ssl.SSLHandshakeException: No available
authentication scheme
...
[pool-3-thread-1] ERROR org.apache.ftpserver.impl.DefaultFtpHandler -
Exception caught, closing session
javax.net.ssl.SSLHandshakeException: SSL handshake failed.
...
Caused by: javax.net.ssl.SSLHandshakeException: No available
authentication scheme

...

[pool-3-thread-2] INFO
org.apache.ftpserver.listener.nio.FtpLoggingFilter - CLOSED
[NioProcessor-4] INFO
org.apache.ftpserver.listener.nio.FtpLoggingFilter - CREATED
[pool-3-thread-1] INFO
org.apache.ftpserver.listener.nio.FtpLoggingFilter - OPENED
[pool-3-thread-1] WARN
org.apache.ftpserver.listener.nio.FtpLoggingFilter - EXCEPTION :
javax.net.ssl.SSLException: Improper close state: Status = OK
HandshakeStatus = NEED_WRAP
bytesConsumed = 0 bytesProduced = 160 sequenceNumber = 0

...

[pool-3-thread-1] ERROR org.apache.ftpserver.impl.DefaultFtpHandler -
Exception caught, closing session
javax.net.ssl.SSLException: Improper close state: Status = OK
HandshakeStatus = NEED_WRAP
bytesConsumed = 0 bytesProduced = 160 sequenceNumber = 0

...

[pool-3-thread-1] WARN
org.apache.ftpserver.listener.nio.FtpLoggingFilter - EXCEPTION :
javax.net.ssl.SSLHandshakeException: SSL handshake failed.
...
Caused by: javax.net.ssl.SSLHandshakeException: No available
authentication scheme
...
[pool-3-thread-1] ERROR org.apache.ftpserver.impl.DefaultFtpHandler -
Exception caught, closing session
javax.net.ssl.SSLHandshakeException: SSL handshake failed.
...
Caused by: javax.net.ssl.SSLHandshakeException: No available
authentication scheme

...

[pool-3-thread-1] INFO
org.apache.ftpserver.listener.nio.FtpLoggingFilter - CLOSED
```

[1] 
https://gitbox.apache.org/repos/asf?p=mina-ftpserver.git;a=blob;f=core/src/examples/java/org/apache/ftpserver/examples/EmbeddingFtpServer.java;h=dc5a06d79d9e6aa4373b716d2f9f564aa0046df1;hb=HEAD
[2] https://mina.apache.org/ftpserver-project/embedding_ftpserver.html
[3] http://ix.io/3uoz

Reply via email to