Can you please answer the questions below so we all have a better
understanding of what's going on?

1. Are downloads working fine for you?
2. Is directory listing working fine for you? Normally FileZilla does a
LIST or MLSD command to list the directory contents soon after login, but I
do not see anything in the logs to reflect it.
3. What happens if you try to upload a small file (like 1K or less)
4. Are the uploads working fine when you are NOT using SSL at all (plain
old FTP)?
5. Do you see any errors in FileZilla log or the FTP Server log when you
quit (logout) the session? Just login and log out without doing anything
else.

Thanks.


On Mon, Jan 28, 2013 at 9:21 AM, Rubén Páez <ruben.p...@itac.com.co> wrote:

>
>
> Hi!
>
>
> I have configured an standalone ftp server (Apache FTPServer) using this
> config file:
>
>
>
>
> START ---------- ---------- ---------- ---------- ---------- ----------
> ----------
>
> <?xml version="1.0" encoding="UTF-8"?>
> <server xmlns="http://mina.apache.org/ftpserver/spring/v1";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xsi:schemaLocation="
> http://mina.apache.org/ftpserver/spring/v1
> http://mina.apache.org/ftpserver/ftpserver-1.0.xsd
> "
> id="myServer">
> <listeners>
> <nio-listener name="default" port="2122">
> <ssl>
> <keystore file="./res/ftpserver.jks" password="password" />
> </ssl>
> </nio-listener>
> <nio-listener name="sdefault" port="21991" implicit-ssl="true">
> <ssl>
> <keystore file="./res/ftpserver.jks" password="password" />
> </ssl>
> </nio-listener>
> </listeners>
> <file-user-manager file="./res/conf/users.properties" />
> </server>
> END ---------- ---------- ---------- ---------- ---------- ----------
> ----------
>
>
>
>
> I use FileZilla Client to log in (either using FTPES or FTPS, I've tried
> both, I accept the certificate FileZilla displays to me) and try to upload
> a file. Everything seems ok, but the upload always stalls (around 300 kB).
> The log of FileZilla Client is:
>
>
>
>
> START ---------- ---------- ---------- ---------- ---------- ----------
> ----------
>
> Status: Resolving address of localhost
> Status: Connecting to 127.0.0.1:2122...
> Status: Connection established, waiting for welcome message...
> Response: 220 Service ready for new user.
> Command: AUTH TLS
> Response: 234 Command AUTH okay; starting TLS connection.
> Status: Initializing TLS...
> Status: Verifying certificate...
> Command: USER xxx
> Status: TLS/SSL connection established.
> Response: 331 User name okay, need password for xxx
> Command: PASS *****
> Response: 230 User logged in, proceed.
> Command: OPTS UTF8 ON
> Response: 200 Command OPTS okay.
> Command: PBSZ 0
> Response: 200 Command PBSZ okay.
> Command: PROT P
> Response: 200 Command PROT okay.
> Command: OPTS MLST size;modify;type;
> Response: 200 Command OPTS okay.
> Status: Connected
> Status: Starting upload of xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Command: CWD /
> Response: 250 Directory changed to /
> Command: PWD
> Response: 257 "/" is current directory.
> Command: TYPE I
> Response: 200 Command TYPE okay.
> Command: PASV
> Response: 227 Entering Passive Mode (127,0,0,1,199,113)
> Command: STOR xxxxxxxxxxxxxxxxxxxxxxx
> Response: 150 File status okay; about to open data connection.
> Error: Connection timed out
> Error: File transfer failed after transferring 278.6 KB in 21 seconds
> Response: 551 xxxxxxxxxxxxxxxxxxxxxx: Error on output file.
> Status: Disconnected from server
> Error: Connection closed by server
> END ---------- ---------- ---------- ---------- ---------- ----------
> ----------
>
>
>
>
> and the Apache FTP Sever log is:
>
>
>
>
> START ---------- ---------- ---------- ---------- ---------- ----------
> ----------
>
> [ INFO] 2013-01-25 12:04:31,940 [] [] Refreshing
> org.springframework.context.support.FileSystemXmlApplicationContext@ed0338:
> display name
> [org.springframework.context.support.FileSystemXmlApplicationContext@ed0338];
> startup date [Fri Jan 25 12:04:31 COT 2013]; root of context hierarchy
> [ INFO] 2013-01-25 12:04:32,030 [] [] Loading XML bean definitions from
> file [xxxxxxxxxxxx/apache-ftpserver-1.0.6/res/conf/ftpd-typical.xml]
> [ INFO] 2013-01-25 12:04:32,370 [] [] Bean factory for application context
> [org.springframework.context.support.FileSystemXmlApplicationContext@ed0338]:
> org.springframework.beans.factory.support.DefaultListableBeanFactory@19bb25a
> [ INFO] 2013-01-25 12:04:32,402 [] [] Pre-instantiating singletons in
> org.springframework.beans.factory.support.DefaultListableBeanFactory@19bb25a:
> defining beans
> [org.apache.ftpserver.listener.ListenerFactory#0,org.apache.ftpserver.listener.ListenerFactory#1,org.apache.ftpserver.usermanager.PropertiesUserManagerFactory#0,org.apache.ftpserver.FtpServerFactory#0,myServer];
> root of factory hierarchy
> [ INFO] 2013-01-25 12:04:32,744 [] [] FTP server started
>
>
> [ INFO] 2013-01-25 12:05:06,927 [] [127.0.0.1] CREATED
> [ INFO] 2013-01-25 12:05:06,929 [] [127.0.0.1] OPENED
> [ INFO] 2013-01-25 12:05:06,930 [] [127.0.0.1] SENT: 220 Service ready for
> new user.
>
>
> [ INFO] 2013-01-25 12:05:07,051 [] [127.0.0.1] RECEIVED: AUTH TLS
> [ INFO] 2013-01-25 12:05:07,163 [] [127.0.0.1] SENT: 234 Command AUTH
> okay; starting TLS connection.
>
>
> [ INFO] 2013-01-25 12:05:07,164 [] [127.0.0.1] RECEIVED: USER xxx
> [ INFO] 2013-01-25 12:05:07,167 [xxx] [127.0.0.1] SENT: 331 User name
> okay, need password for xxx.
>
>
> [ INFO] 2013-01-25 12:05:07,208 [xxx] [127.0.0.1] RECEIVED: PASS *****
> [ INFO] 2013-01-25 12:05:07,209 [xxx] [127.0.0.1] Login success - xxx
> [ INFO] 2013-01-25 12:05:07,210 [xxx] [127.0.0.1] SENT: 230 User logged
> in, proceed.
>
>
> [ INFO] 2013-01-25 12:05:07,258 [xxx] [127.0.0.1] RECEIVED: OPTS UTF8 ON
> [ INFO] 2013-01-25 12:05:07,261 [xxx] [127.0.0.1] SENT: 200 Command OPTS
> okay.
>
>
> [ INFO] 2013-01-25 12:05:07,318 [xxx] [127.0.0.1] RECEIVED: PBSZ 0
> [ INFO] 2013-01-25 12:05:07,319 [xxx] [127.0.0.1] SENT: 200 Command PBSZ
> okay.
>
>
> [ INFO] 2013-01-25 12:05:07,343 [xxx] [127.0.0.1] RECEIVED: PROT P
> [ INFO] 2013-01-25 12:05:07,344 [xxx] [127.0.0.1] SENT: 200 Command PROT
> okay.
>
>
> [ INFO] 2013-01-25 12:05:07,384 [xxx] [127.0.0.1] RECEIVED: OPTS MLST
> size;modify;type;
> [ INFO] 2013-01-25 12:05:07,386 [xxx] [127.0.0.1] SENT: 200 Command OPTS
> okay.
>
>
> [ INFO] 2013-01-25 12:05:07,421 [xxx] [127.0.0.1] RECEIVED: CWD /
> [ INFO] 2013-01-25 12:05:07,422 [xxx] [127.0.0.1] SENT: 250 Directory
> changed to /
>
>
> [ INFO] 2013-01-25 12:05:07,452 [xxx] [127.0.0.1] RECEIVED: PWD
> [ INFO] 2013-01-25 12:05:07,454 [xxx] [127.0.0.1] SENT: 257 "/" is current
> directory.
>
>
> [ INFO] 2013-01-25 12:05:07,499 [xxx] [127.0.0.1] RECEIVED: TYPE I
> [ INFO] 2013-01-25 12:05:07,503 [xxx] [127.0.0.1] SENT: 200 Command TYPE
> okay.
>
>
> [ INFO] 2013-01-25 12:05:07,553 [xxx] [127.0.0.1] RECEIVED: PASV
> [ INFO] 2013-01-25 12:05:07,556 [xxx] [127.0.0.1] SENT: 227 Entering
> Passive Mode (127,0,0,1,199,113)
>
>
> [ INFO] 2013-01-25 12:05:07,599 [xxx] [127.0.0.1] RECEIVED: STOR
> xxxxxxxxxxxxxx
> [ WARN] 2013-01-25 12:05:28,477 [xxx] [127.0.0.1] Exception during data
> transfer, closing data connection socket
> javax.net.ssl.SSLException: SSL peer shut down incorrectly
> at
> com.sun.net.ssl.internal.ssl.InputRecord.readV3Record(InputRecord.java:408)
> at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:360)
> at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:863)
> at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:820)
> at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75)
> at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
> at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
> at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
> at java.io.FilterInputStream.read(FilterInputStream.java:90)
> at
> org.apache.ftpserver.impl.IODataConnection.transfer(IODataConnection.java:243)
> at
> org.apache.ftpserver.impl.IODataConnection.transferFromClient(IODataConnection.java:136)
> at org.apache.ftpserver.command.impl.STOR.execute(STOR.java:146)
> at
> org.apache.ftpserver.impl.DefaultFtpHandler.messageReceived(DefaultFtpHandler.java:210)
> at
> org.apache.ftpserver.listener.nio.FtpHandlerAdapter.messageReceived(FtpHandlerAdapter.java:61)
> at
> org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:716)
> at
> org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
> at
> org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
> at
> org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:796)
> at
> org.apache.ftpserver.listener.nio.FtpLoggingFilter.messageReceived(FtpLoggingFilter.java:85)
> at
> org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
> at
> org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
> at
> org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:796)
> at
> org.apache.mina.core.filterchain.IoFilterEvent.fire(IoFilterEvent.java:75)
> at
> org.apache.mina.filter.logging.MdcInjectionFilter.filter(MdcInjectionFilter.java:136)
> at
> org.apache.mina.filter.util.CommonEventFilter.messageReceived(CommonEventFilter.java:70)
> at
> org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
> at
> org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
> at
> org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:796)
> at
> org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:427)
> at
> org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:245)
> at
> org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
> at
> org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
> at
> org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:796)
> at
> org.apache.mina.core.filterchain.IoFilterEvent.fire(IoFilterEvent.java:75)
> at org.apache.mina.core.session.IoEvent.run(IoEvent.java:63)
> at
> org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTask(OrderedThreadPoolExecutor.java:780)
> at
> org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTasks(OrderedThreadPoolExecutor.java:772)
> at
> org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.run(OrderedThreadPoolExecutor.java:714)
> at java.lang.Thread.run(Thread.java:662)
> [ WARN] 2013-01-25 12:05:28,479 [xxx] [127.0.0.1] Releasing unreserved
> passive port: 51057
> END ---------- ---------- ---------- ---------- ---------- ----------
> ----------
>
>
>
>
> The SSLException is thrown when I cancel the upload. Can anybody help me?
> What am I configuring wrong that does not let me use FTPS?
>
>
> The system I'm running the tests in is Linux (ubuntu 12), jdk 6.
>
>
> I appreciate any hint you can give me!
>
>
>
> Rubén Darío Páez Rivera
>

Reply via email to