[
http://issues.apache.org/jira/browse/DIRMINA-163?page=comments#action_12362783
]
Niklas Therning commented on DIRMINA-163:
-----------------------------------------
Under Linux I can't reproduce this exact problem. However, sometimes I get a
ConnectException. If I change the line
bind( false );
into
bind( true );
and change the line
ConnectFuture future = connector.connect( addr, new IoHandlerAdapter() );
into
ConnectFuture future = connector.connect( new InetSocketAddress( "localhost",
port ),
new IoHandlerAdapter() );
my ConnectException problem seems to go away. It would be great if you could
try this under Windows and see if the BindException problem persists. I'm
afraid I don't have access to a Windows installation so I can't test it myself.
Adding the test method below could be helpful
public void testALot() throws Exception
{
for( int i = 0; i < 100; i++ )
{
System.out.println( "Test run " + i );
testUnbindDisconnectsClients();
}
}
> Build fails with failed SocketBindTest
> --------------------------------------
>
> Key: DIRMINA-163
> URL: http://issues.apache.org/jira/browse/DIRMINA-163
> Project: Directory MINA
> Type: Bug
> Environment: Windows XP Pro
> Version 2002
> Service Pack 2
> $ java -version
> java version "1.5.0_06"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
> Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
> $ mvn -version
> Maven version: 2.0.1
> Reporter: Alex Karasulu
> Assignee: Niklas Therning
> Priority: Blocker
> Fix For: 0.9.1
>
> $ less org.apache.mina.transport.socket.nio.SocketBindTest.txt
> -------------------------------------------------------------------------------
> Battery: org.apache.mina.transport.socket.nio.SocketBindTest
> -------------------------------------------------------------------------------
> Tests run: 4, Failures: 0, Errors: 1, Time elapsed: 4.078 sec
> testUnbindDisconnectsClients(org.apache.mina.transport.socket.nio.SocketBindTest
> ) Time elapsed: 0.047 sec <<< ERROR!
> ...
> [ stacktrace ] -----------------------------------------------------------
> java.net.BindException: Cannot assign requested address: no further
> information
> at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> at
> sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:525
> )
> at
> org.apache.mina.transport.socket.nio.support.SocketConnectorDelegate.
> processSessions(SocketConnectorDelegate.java:223)
> at
> org.apache.mina.transport.socket.nio.support.SocketConnectorDelegate.
> access$800(SocketConnectorDelegate.java:49)
> at
> org.apache.mina.transport.socket.nio.support.SocketConnectorDelegate$
> Worker.run(SocketConnectorDelegate.java:321)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira