mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kiran Ayyagari <kayyag...@apache.org>
Subject Re: Fwd: [Cancel] vas: [VOTE] MINA 2.0.6 Release
Date Mon, 01 Oct 2012 17:24:36 GMT
failed on Ubuntu 12.04 using jdk 1.6.0_26

On Mon, Oct 1, 2012 at 10:00 PM, Emmanuel Lécharny <elecharny@gmail.com> wrote:
> Le 10/1/12 6:27 PM, Emmanuel Lécharny a écrit :
>
>> Le 10/1/12 4:43 PM, Emmanuel Lécharny a écrit :
>>>
>>>
>>> Le 10/1/12 4:13 PM, Emmanuel Lécharny a écrit :
>>>>
>>>> Le 10/1/12 4:01 PM, Julien Vermillard a écrit :
>>>>>
>>>>> finally -1 :
>>>>>
>>>>> Running org.apache.mina.transport.socket.nio.DatagramSessionIdleTest
>>>>> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.028
>>>>> sec
>>>>> <<< FAILURE!
>>>>
>>>>
>>>> Damn it... Seems like it passes on OSX, but not on Ubuntu :/
>>>
>>>
>>> There is a failure due to some IPV4/IPV6 address mismatches. I'll try to
>>> get it fixed asap.
>>>
>>>
>> So the problem is that when we bind on the server using this address :
>>
>>         InetSocketAddress bindAddress = new
>> InetSocketAddress(AvailablePortFinder.getNextAvailable());
>>
>> (which is 0.0.0.0:XYZT)
>>
>> the server create the DatagramChannel :
>>
>>     protected DatagramChannel open(SocketAddress localAddress) throws
>> Exception {
>>         final DatagramChannel c = DatagramChannel.open();
>>         boolean success = false;
>>         try {
>>             new NioDatagramSessionConfig(c).setAll(getSessionConfig());
>>             c.configureBlocking(false);
>>             c.socket().bind(localAddress);
>>             c.register(selector, SelectionKey.OP_READ);
>>             success = true;
>>         } finally {
>>             if (!success) {
>>                 close(c);
>>             }
>>         }
>>
>>         return c;
>>     }
>>
>> and then store the channel's address in the boundedHandles map :
>>
>>                 for (SocketAddress socketAddress : localAddresses) {
>>                     H handle = open(socketAddress);
>>                     newHandles.put(localAddress(handle), handle);
>>                 }
>>
>>                 boundHandles.putAll(newHandles);
>>
>>
>> Here, the localAddress(handle) method does :
>>
>>     protected SocketAddress localAddress(DatagramChannel handle) throws
>> Exception {
>>         return handle.socket().getLocalSocketAddress();
>>     }
>>
>> which returns 0:0:0:0:0:0:0:0:XYZT, an IPV6 address :/
>>
>> So we have now an IPV6 address stored in the map, but when we do in the
>> test :
>>
>>         IoSession session = acceptor.newSession(
>>                 new InetSocketAddress("127.0.0.1",
>> AvailablePortFinder.getNextAvailable()), bindAddress);
>>
>>
>> the bindAddress is an IPV4 address, it it won't be found :/
>>
>> If anyone has an idea on how to fix that properly...
>>
>
> FTR, this test is working perfectly well on Mac OSX, and on Windows. It just
> fails on Ubuntu (Java 1.6.0_33 n my server)
>
> Anyone can test the code on any other Linux box ?
>
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>



-- 
Kiran Ayyagari
http://keydap.com

Mime
View raw message