You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Jiri Kuhn (JIRA)" <ji...@apache.org> on 2008/12/23 14:37:44 UTC
[jira] Created: (FTPSERVER-250) java.net.BindException: Address
already in use
java.net.BindException: Address already in use
----------------------------------------------
Key: FTPSERVER-250
URL: https://issues.apache.org/jira/browse/FTPSERVER-250
Project: FtpServer
Issue Type: Bug
Components: Core
Affects Versions: 1.0.0-RC1
Environment: linux, windows
Reporter: Jiri Kuhn
I have configured ftp server to use particular interface and port on active data mode like
<active enabled="true" local-address="127.0.0.1" local-port="2020" ip-check="true"/>
After that, the server starts to throw java.net.BindException: Address already in use during second and other data transfer. First data transfer is always ok. It seems that it has something to do with TIME_WAIT tcp port state (as it can be seen using netstat utility).
I have created two tests, one for serial execution and one for parallel execution, see attached files (patch for ClientTestTemplate required)
- serial execution - emulates what I'm doing in command line ftp client (or any other client), I'm always able to reproduce it on linux, but never on windows xp sp2
- parallel execution - emulates situation when more then one data connection has to be opened in one time, it fails with two clients on linux (but it may by simple serial execution failure), on windows it fails with three clients
BUT - I have tested the parallel test against proftpd server (fixed data port 20) with 30 clients and none of them fails.
Are you able to reproduce the behaviour I have observed?
Does anyone with deeper knowledge of java socket programming know if it is possible to bind a port once and then reuse it for generally unlimited number of (simultaneous) connections?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (FTPSERVER-250) java.net.BindException: Address
already in use
Posted by "Niklas Gustavsson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FTPSERVER-250?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niklas Gustavsson closed FTPSERVER-250.
---------------------------------------
Approved by Jiri
> java.net.BindException: Address already in use
> ----------------------------------------------
>
> Key: FTPSERVER-250
> URL: https://issues.apache.org/jira/browse/FTPSERVER-250
> Project: FtpServer
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.0.0-RC1
> Environment: linux, windows
> Reporter: Jiri Kuhn
> Assignee: Niklas Gustavsson
> Fix For: 1.0.0-RC1
>
> Attachments: BindExceptionParallelTest.java, BindExceptionSerialTest.java, ClientTestTemplate.patch
>
>
> I have configured ftp server to use particular interface and port on active data mode like
> <active enabled="true" local-address="127.0.0.1" local-port="2020" ip-check="true"/>
> After that, the server starts to throw java.net.BindException: Address already in use during second and other data transfer. First data transfer is always ok. It seems that it has something to do with TIME_WAIT tcp port state (as it can be seen using netstat utility).
> I have created two tests, one for serial execution and one for parallel execution, see attached files (patch for ClientTestTemplate required)
> - serial execution - emulates what I'm doing in command line ftp client (or any other client), I'm always able to reproduce it on linux, but never on windows xp sp2
> - parallel execution - emulates situation when more then one data connection has to be opened in one time, it fails with two clients on linux (but it may by simple serial execution failure), on windows it fails with three clients
> BUT - I have tested the parallel test against proftpd server (fixed data port 20) with 30 clients and none of them fails.
> Are you able to reproduce the behaviour I have observed?
> Does anyone with deeper knowledge of java socket programming know if it is possible to bind a port once and then reuse it for generally unlimited number of (simultaneous) connections?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FTPSERVER-250) java.net.BindException: Address
already in use
Posted by "Jiri Kuhn (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FTPSERVER-250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12659560#action_12659560 ]
Jiri Kuhn commented on FTPSERVER-250:
-------------------------------------
Now everything is working and I'm able to see TIME_WAIT state for the configured interface and port multiple times, for each data connection made once.
Well done, thanks.
> java.net.BindException: Address already in use
> ----------------------------------------------
>
> Key: FTPSERVER-250
> URL: https://issues.apache.org/jira/browse/FTPSERVER-250
> Project: FtpServer
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.0.0-RC1
> Environment: linux, windows
> Reporter: Jiri Kuhn
> Assignee: Niklas Gustavsson
> Fix For: 1.0.0-RC1
>
> Attachments: BindExceptionParallelTest.java, BindExceptionSerialTest.java, ClientTestTemplate.patch
>
>
> I have configured ftp server to use particular interface and port on active data mode like
> <active enabled="true" local-address="127.0.0.1" local-port="2020" ip-check="true"/>
> After that, the server starts to throw java.net.BindException: Address already in use during second and other data transfer. First data transfer is always ok. It seems that it has something to do with TIME_WAIT tcp port state (as it can be seen using netstat utility).
> I have created two tests, one for serial execution and one for parallel execution, see attached files (patch for ClientTestTemplate required)
> - serial execution - emulates what I'm doing in command line ftp client (or any other client), I'm always able to reproduce it on linux, but never on windows xp sp2
> - parallel execution - emulates situation when more then one data connection has to be opened in one time, it fails with two clients on linux (but it may by simple serial execution failure), on windows it fails with three clients
> BUT - I have tested the parallel test against proftpd server (fixed data port 20) with 30 clients and none of them fails.
> Are you able to reproduce the behaviour I have observed?
> Does anyone with deeper knowledge of java socket programming know if it is possible to bind a port once and then reuse it for generally unlimited number of (simultaneous) connections?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (FTPSERVER-250) java.net.BindException: Address
already in use
Posted by "Niklas Gustavsson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FTPSERVER-250?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niklas Gustavsson resolved FTPSERVER-250.
-----------------------------------------
Resolution: Fixed
Fix Version/s: 1.0.0-RC1
Assignee: Niklas Gustavsson
I've enabled reuse of local addresses for active data connection sockets in rev 729486. I also added in your tests and BindExceptionParallelTest now runs fine with 200 clients. Could you please verify that this fixes the issue on your machine as well.
> java.net.BindException: Address already in use
> ----------------------------------------------
>
> Key: FTPSERVER-250
> URL: https://issues.apache.org/jira/browse/FTPSERVER-250
> Project: FtpServer
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.0.0-RC1
> Environment: linux, windows
> Reporter: Jiri Kuhn
> Assignee: Niklas Gustavsson
> Fix For: 1.0.0-RC1
>
> Attachments: BindExceptionParallelTest.java, BindExceptionSerialTest.java, ClientTestTemplate.patch
>
>
> I have configured ftp server to use particular interface and port on active data mode like
> <active enabled="true" local-address="127.0.0.1" local-port="2020" ip-check="true"/>
> After that, the server starts to throw java.net.BindException: Address already in use during second and other data transfer. First data transfer is always ok. It seems that it has something to do with TIME_WAIT tcp port state (as it can be seen using netstat utility).
> I have created two tests, one for serial execution and one for parallel execution, see attached files (patch for ClientTestTemplate required)
> - serial execution - emulates what I'm doing in command line ftp client (or any other client), I'm always able to reproduce it on linux, but never on windows xp sp2
> - parallel execution - emulates situation when more then one data connection has to be opened in one time, it fails with two clients on linux (but it may by simple serial execution failure), on windows it fails with three clients
> BUT - I have tested the parallel test against proftpd server (fixed data port 20) with 30 clients and none of them fails.
> Are you able to reproduce the behaviour I have observed?
> Does anyone with deeper knowledge of java socket programming know if it is possible to bind a port once and then reuse it for generally unlimited number of (simultaneous) connections?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (FTPSERVER-250) java.net.BindException: Address
already in use
Posted by "Jiri Kuhn (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FTPSERVER-250?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jiri Kuhn updated FTPSERVER-250:
--------------------------------
Attachment: BindExceptionParallelTest.java
BindExceptionSerialTest.java
ClientTestTemplate.patch
> java.net.BindException: Address already in use
> ----------------------------------------------
>
> Key: FTPSERVER-250
> URL: https://issues.apache.org/jira/browse/FTPSERVER-250
> Project: FtpServer
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.0.0-RC1
> Environment: linux, windows
> Reporter: Jiri Kuhn
> Attachments: BindExceptionParallelTest.java, BindExceptionSerialTest.java, ClientTestTemplate.patch
>
>
> I have configured ftp server to use particular interface and port on active data mode like
> <active enabled="true" local-address="127.0.0.1" local-port="2020" ip-check="true"/>
> After that, the server starts to throw java.net.BindException: Address already in use during second and other data transfer. First data transfer is always ok. It seems that it has something to do with TIME_WAIT tcp port state (as it can be seen using netstat utility).
> I have created two tests, one for serial execution and one for parallel execution, see attached files (patch for ClientTestTemplate required)
> - serial execution - emulates what I'm doing in command line ftp client (or any other client), I'm always able to reproduce it on linux, but never on windows xp sp2
> - parallel execution - emulates situation when more then one data connection has to be opened in one time, it fails with two clients on linux (but it may by simple serial execution failure), on windows it fails with three clients
> BUT - I have tested the parallel test against proftpd server (fixed data port 20) with 30 clients and none of them fails.
> Are you able to reproduce the behaviour I have observed?
> Does anyone with deeper knowledge of java socket programming know if it is possible to bind a port once and then reuse it for generally unlimited number of (simultaneous) connections?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.