|
You're suggestion with using new InetSocketAddress( "localhost", port) fixed the test case. I applied the change on commit version 369219 here:
http://svn.apache.org/viewcvs.cgi/directory/trunks/mina/core/src/test/java/org/apache/mina/transport/socket/nio/SocketBindTest.java?rev=369219&view=diff&r1=369219&r2=369218&p1=directory/trunks/mina/core/src/test/java/org/apache/mina/transport/socket/nio/SocketBindTest.java&p2=/directory/trunks/mina/core/src/test/java/org/apache/mina/transport/socket/nio/SocketBindTest.java Thanks! I still had the problem on Linux Ubuntu 5.0.4.
I fiexd it in maven by adding this parameter in mvn script : exec "$JAVACMD" \ -Djava.net.preferIPv4Stack=true \ <<<<<--------------------- $MAVEN_OPTS \ -classpath "${M2_HOME}"/core/boot/classworlds-*.jar \ "-Dclassworlds.conf=${M2_HOME}/bin/m2.conf" \ "-Dmaven.home=${M2_HOME}" \ ${CLASSWORLDS_LAUNCHER} $@ Seems that Mina does not like IPV6 !!! downgrade from blocker to major.
Let's investigate into this issue more and release 0.9.1 without resolving it for now.
I cannot reproduce this on my computer. I'm running Ubuntu 5.10 here and as far as I can tell IPv6 is enabled:
niklas@niklas:~/Projects/mina$ ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:03:0D:07:E0:63 inet addr:192.168.0.138 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::203:dff:fe07:e063/64 Scope:Link ... niklas@niklas:~/Projects/mina$ ping6 -I eth0 fe80::203:dff:fe07:e063 PING fe80::203:dff:fe07:e063(fe80::203:dff:fe07:e063) from fe80::203:dff:fe07:e063 eth0: 56 data bytes 64 bytes from fe80::203:dff:fe07:e063: icmp_seq=1 ttl=64 time=0.046 ms 64 bytes from fe80::203:dff:fe07:e063: icmp_seq=2 ttl=64 time=0.057 ms ... niklas@niklas:~/Projects/mina$ ping6 -I lo ::1 PING ::1(::1) from ::1 lo: 56 data bytes 64 bytes from ::1: icmp_seq=1 ttl=64 time=0.046 ms ... niklas@niklas:~/Projects/mina$ java -version java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing) niklas@niklas:~/Projects/mina$ uname -a Linux niklas 2.6.12-10-k7 #1 Sat Mar 11 16:59:38 UTC 2006 i686 GNU/Linux Emmanuel, could you verify that this is still an issue for you? If yes, please describe your Java/Linux setup (e.g. is only the lo network interface available). Does anyone else have problems with the SocketBindTest? I tested both on Debian Linux and on Windows XP professional, but I couldn't reproduce the problem, either.
It would be nice if we can mark this issue as 'can't reproduce' unless there's any objection. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||
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();
}
}