You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Nick Padgett (JIRA)" <ji...@apache.org> on 2009/10/01 23:45:23 UTC

[jira] Commented: (FTPSERVER-334) Read Timed Out Prior to Idle Timeout

    [ https://issues.apache.org/jira/browse/FTPSERVER-334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12761355#action_12761355 ] 

Nick Padgett commented on FTPSERVER-334:
----------------------------------------

Say I have a file that takes 300 seconds to upload on a passive connection.  If I set the ListenerFactory's idleTimeout higher than 300 seconds, say 400 seconds, then I do NOT receive this error.  If I set the ListenerFacotry's idleTimeout lower than 300 seconds, say 200 seconds, then I do receive this error.  If the client wasn't correctly terminating the socket, then shouldn't I receive this error is both situations?

> Read Timed Out Prior to Idle Timeout
> ------------------------------------
>
>                 Key: FTPSERVER-334
>                 URL: https://issues.apache.org/jira/browse/FTPSERVER-334
>             Project: FtpServer
>          Issue Type: Bug
>    Affects Versions: 1.0.2
>            Reporter: Nick Padgett
>
> I receive a read timeout when I attempt to passively ftp a file that is longer than the idle timeout.  The file makes it to the server in its entirety and then throws a read timeout.  The input and output sockets need to be kept in sync.  I.e. the input socket shouldn't timeout if the output socket was used within the idle timeout.  Similarly, the output socket shouldn't timeout if the input socket was used withing the idle timeout.
> <code>
> 1304157934 [pool-2-thread-455] INFO  org.apache.ftpserver.listener.nio.FtpLoggingFilter  - RECEIVED: USER glattig
> 1304158004 [pool-2-thread-455] INFO  org.apache.ftpserver.listener.nio.FtpLoggingFilter  - RECEIVED: PASS *****
> 1304158005 [pool-2-thread-455] INFO  org.apache.ftpserver.command.impl.PASS  - Login success - glattig
> 1304158044 [pool-2-thread-455] INFO  org.apache.ftpserver.listener.nio.FtpLoggingFilter  - RECEIVED: OPTS utf8 on
> 1304158083 [pool-2-thread-455] INFO  org.apache.ftpserver.listener.nio.FtpLoggingFilter  - RECEIVED: PWD
> 1304158122 [pool-2-thread-455] INFO  org.apache.ftpserver.listener.nio.FtpLoggingFilter  - RECEIVED: CWD /1037/2009/09/14/
> 1304158163 [pool-2-thread-455] INFO  org.apache.ftpserver.listener.nio.FtpLoggingFilter  - RECEIVED: TYPE I
> 1304158202 [pool-2-thread-455] INFO  org.apache.ftpserver.listener.nio.FtpLoggingFilter  - RECEIVED: PASV
> 1304158281 [pool-2-thread-455] INFO  org.apache.ftpserver.listener.nio.FtpLoggingFilter  - RECEIVED: STOR 6928_uUKgWHvc_event.wmv
> 1306180855 [pool-2-thread-455] WARN  org.apache.ftpserver.impl.IODataConnection  - Exception during data transfer, closing data connection socket
> java.net.SocketTimeoutException: Read timed out
>         at java.net.SocketInputStream.socketRead0(Native Method)
>         at java.net.SocketInputStream.read(SocketInputStream.java:129)
>         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:721)
>         at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:433)
>         at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)
>         at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:801)
>         at org.apache.ftpserver.listener.nio.FtpLoggingFilter.messageReceived(FtpLoggingFilter.java:85)
>         at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:433)
>         at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)
>         at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:801)
>         at org.apache.mina.core.filterchain.IoFilterEvent.fire(IoFilterEvent.java:71)
>         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:433)
>         at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)
>         at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:801)
>         at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:375)
>         at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:229)
>         at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:433)
>         at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)
>         at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:801)
>         at org.apache.mina.core.filterchain.IoFilterEvent.fire(IoFilterEvent.java:71)
>         at org.apache.mina.core.session.IoEvent.run(IoEvent.java:63)
>         at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTask(OrderedThreadPoolExecutor.java:801)
>         at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTasks(OrderedThreadPoolExecutor.java:793)
>         at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.run(OrderedThreadPoolExecutor.java:735)
>         at java.lang.Thread.run(Thread.java:619)
> </code>
> From spring.xml: 
> <code> 
> <bean id="dataConnectionConfigurationFactory" class="org.apache.ftpserver.DataConnectionConfigurationFactory"> 
> <property name="activeEnabled" value="true" /> 
> <property name="activeIpCheck" value="false" /> 
> <property name="idleTime" value="60" /> 
>                 ... 
> </bean> 
>         ... 
>         <bean id="listenerFactory" class="org.apache.ftpserver.listener.ListenerFactory"> 
> <property name="idleTimeout" value="300" /> 
>                 ... 
> </bean> 
>         ... 
> </code>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Commented: (FTPSERVER-334) Read Timed Out Prior to Idle Timeout

Posted by Sai Pullabhotla <sa...@jmethods.com>.
I tried to reproduce the issue, but could not. I will keep looking
into it some more. It might help if you setup your logging (in DEBUG
mode) to include dates and times in a readable format and send the log
when it timesout again so we can look at the sequence of commands,
replies and the timestamps. That may give us some clues.

Sai Pullabhotla
www.jMethods.com




On Thu, Oct 1, 2009 at 4:45 PM, Nick Padgett (JIRA) <ji...@apache.org> wrote:
>
>    [ https://issues.apache.org/jira/browse/FTPSERVER-334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12761355#action_12761355 ]
>
> Nick Padgett commented on FTPSERVER-334:
> ----------------------------------------
>
> Say I have a file that takes 300 seconds to upload on a passive connection.  If I set the ListenerFactory's idleTimeout higher than 300 seconds, say 400 seconds, then I do NOT receive this error.  If I set the ListenerFacotry's idleTimeout lower than 300 seconds, say 200 seconds, then I do receive this error.  If the client wasn't correctly terminating the socket, then shouldn't I receive this error is both situations?
>
>> Read Timed Out Prior to Idle Timeout
>> ------------------------------------
>>
>>                 Key: FTPSERVER-334
>>                 URL: https://issues.apache.org/jira/browse/FTPSERVER-334
>>             Project: FtpServer
>>          Issue Type: Bug
>>    Affects Versions: 1.0.2
>>            Reporter: Nick Padgett
>>
>> I receive a read timeout when I attempt to passively ftp a file that is longer than the idle timeout.  The file makes it to the server in its entirety and then throws a read timeout.  The input and output sockets need to be kept in sync.  I.e. the input socket shouldn't timeout if the output socket was used within the idle timeout.  Similarly, the output socket shouldn't timeout if the input socket was used withing the idle timeout.
>> <code>
>> 1304157934 [pool-2-thread-455] INFO  org.apache.ftpserver.listener.nio.FtpLoggingFilter  - RECEIVED: USER glattig
>> 1304158004 [pool-2-thread-455] INFO  org.apache.ftpserver.listener.nio.FtpLoggingFilter  - RECEIVED: PASS *****
>> 1304158005 [pool-2-thread-455] INFO  org.apache.ftpserver.command.impl.PASS  - Login success - glattig
>> 1304158044 [pool-2-thread-455] INFO  org.apache.ftpserver.listener.nio.FtpLoggingFilter  - RECEIVED: OPTS utf8 on
>> 1304158083 [pool-2-thread-455] INFO  org.apache.ftpserver.listener.nio.FtpLoggingFilter  - RECEIVED: PWD
>> 1304158122 [pool-2-thread-455] INFO  org.apache.ftpserver.listener.nio.FtpLoggingFilter  - RECEIVED: CWD /1037/2009/09/14/
>> 1304158163 [pool-2-thread-455] INFO  org.apache.ftpserver.listener.nio.FtpLoggingFilter  - RECEIVED: TYPE I
>> 1304158202 [pool-2-thread-455] INFO  org.apache.ftpserver.listener.nio.FtpLoggingFilter  - RECEIVED: PASV
>> 1304158281 [pool-2-thread-455] INFO  org.apache.ftpserver.listener.nio.FtpLoggingFilter  - RECEIVED: STOR 6928_uUKgWHvc_event.wmv
>> 1306180855 [pool-2-thread-455] WARN  org.apache.ftpserver.impl.IODataConnection  - Exception during data transfer, closing data connection socket
>> java.net.SocketTimeoutException: Read timed out
>>         at java.net.SocketInputStream.socketRead0(Native Method)
>>         at java.net.SocketInputStream.read(SocketInputStream.java:129)
>>         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:721)
>>         at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:433)
>>         at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)
>>         at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:801)
>>         at org.apache.ftpserver.listener.nio.FtpLoggingFilter.messageReceived(FtpLoggingFilter.java:85)
>>         at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:433)
>>         at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)
>>         at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:801)
>>         at org.apache.mina.core.filterchain.IoFilterEvent.fire(IoFilterEvent.java:71)
>>         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:433)
>>         at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)
>>         at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:801)
>>         at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:375)
>>         at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:229)
>>         at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:433)
>>         at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)
>>         at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:801)
>>         at org.apache.mina.core.filterchain.IoFilterEvent.fire(IoFilterEvent.java:71)
>>         at org.apache.mina.core.session.IoEvent.run(IoEvent.java:63)
>>         at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTask(OrderedThreadPoolExecutor.java:801)
>>         at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTasks(OrderedThreadPoolExecutor.java:793)
>>         at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.run(OrderedThreadPoolExecutor.java:735)
>>         at java.lang.Thread.run(Thread.java:619)
>> </code>
>> From spring.xml:
>> <code>
>> <bean id="dataConnectionConfigurationFactory" class="org.apache.ftpserver.DataConnectionConfigurationFactory">
>> <property name="activeEnabled" value="true" />
>> <property name="activeIpCheck" value="false" />
>> <property name="idleTime" value="60" />
>>                 ...
>> </bean>
>>         ...
>>         <bean id="listenerFactory" class="org.apache.ftpserver.listener.ListenerFactory">
>> <property name="idleTimeout" value="300" />
>>                 ...
>> </bean>
>>         ...
>> </code>
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>