[
https://issues.apache.org/jira/browse/FTPSERVER-236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13792883#comment-13792883
]
Jayani Atreya commented on FTPSERVER-236:
-----------------------------------------
I am still seeing this issue on 1.0.4 version. Here is the stack trace. There
are no failed messages but on the client side this exception is thrown
intermittently.
2013-10-11 10:12:03,028 - WARN [Thread-1508] (FtpLoggingFilter.log:122) -
EXCEPTION :
org.apache.mina.core.write.WriteToClosedSessionException
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.clearWriteRequestQueue(AbstractPollingIoProcessor.java:573)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.removeNow(AbstractPollingIoProcessor.java:534)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.removeSessions(AbstractPollingIoProcessor.java:497)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:61)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:974)
at
org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2013-10-11 10:12:03,029 - WARN [Thread-1508]
(DefaultFtpHandler.exceptionCaught:161) - Client closed connection before all
replies could be sent, last reply was HeapBuffer[pos=0 lim=37 cap=66: 15 03 01
00 20 0C 6D 0C 0C 55 BC BF 93 56 D3 F3...]
> DefaultFtpHandler catches WriteToCloseSessionException on failure to deliver
> "221 Goodbye", logs it as an error
> ---------------------------------------------------------------------------------------------------------------
>
> Key: FTPSERVER-236
> URL: https://issues.apache.org/jira/browse/FTPSERVER-236
> Project: FtpServer
> Issue Type: Improvement
> Components: Server
> Affects Versions: 1.0.0-M3
> Environment: Linux, probably Windows XP. FTP clients are likely
> EnterpriseDT's, but I don't think it's restricted to them.
> Reporter: Larry West
> Assignee: Niklas Gustavsson
> Priority: Minor
> Fix For: 1.0.0-RC1
>
>
> DefaultFtpHandler.exceptionCaught() [via FtpHandlerAdapter.exceptionCaught(),
> via DefaultIoFilterChain.exceptionCaught() ad infinitum] logs an error when
> the client closes the session before the server can send the "221 Goodbye."
> message.
> LOG.error("Exception caught, closing session", cause);
> [which is also unfortunate wording in that it sounds like the session is
> being closed due to the exception].
> In my reading of the FTP protocol, this isn't really an error; certainly not
> near the level of other problems.
> I would like to suggest that if the only message that can't be delivered to a
> closing session is "221 Goodbye" that this be logged as a Warning. I'm not
> sure where the best place to store this state is, so I'll spare you a bogus
> fix, but it should be on the order of 5-10 lines of code.
> However, here's a stack trace for reference:
> ERROR [apache.ftpserver.DefaultFtpHandler] - Exception caught, closing session
> org.apache.mina.core.write.WriteToClosedSessionException
> at
> org.apache.mina.core.polling.AbstractPollingIoProcessor.clearWriteRequestQueue(AbstractPollingIoProcessor.java:521)
> at
> org.apache.mina.core.polling.AbstractPollingIoProcessor.removeNow(AbstractPollingIoProcessor.java:484)
> at
> org.apache.mina.core.polling.AbstractPollingIoProcessor.remove(AbstractPollingIoProcessor.java:455)
> at
> org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:58)
> at
> org.apache.mina.core.polling.AbstractPollingIoProcessor$Worker.run(AbstractPollingIoProcessor.java:862)
> at
> org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
> at java.lang.Thread.run(Thread.java:595)
> It's also inconvenient that DefaultFtpHandler.exceptionCaught is not logging
> the failedRequests List<> that
> AbstractPollingIoProcessor.clearWriteRequestQueue() so lovingly collects and
> passes in the WriteToClosedSessionException object.
--
This message was sent by Atlassian JIRA
(v6.1#6144)