[
https://issues.apache.org/jira/browse/FTPSERVER-438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13792490#comment-13792490
]
Dave Roberts commented on FTPSERVER-438:
----------------------------------------
I have fixed this locally by checking if port 0 is the only entry in the
initial set, in which case a flag is set to indicate any port maybe used. In
this instance, both the reserve and release methods return quickly.
Although the following pull request is based on a branch from master, it could
easily be applied to 1.0.6.
https://github.com/peodratash/mina-ftpserver/pull/3
> Server logs a lot of warnings (Releasing unreserved passive port: ...) when
> using passive mode
> ----------------------------------------------------------------------------------------------
>
> Key: FTPSERVER-438
> URL: https://issues.apache.org/jira/browse/FTPSERVER-438
> Project: FtpServer
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.0.6
> Reporter: Andreas Haufler
> Priority: Minor
>
> When using passive mode without specifiying any port or port range a lot of
> warning are output like this:
> [ WARN] 2012-11-27 20:50:56,717 [admin] [127.0.0.1] Releasing unreserved
> passive port: 53835
> This is caused by PassivePorts#reserveNextPort() which always returns 0. But
> then, PassivePorts#releasePort(int) is confused about the given port which is
> not contained in the usedList.
> Maybe this warning should be disabled when the usedList only contains "0".
> To recreate this "bug" simply download the 1.0.6 version and start the server
> with the typical config. Fire up an ftp client, switch to passive mode and
> put a file. The log now contains the described error message.
--
This message was sent by Atlassian JIRA
(v6.1#6144)