users@shoal.java.net

Problem sending message using a ipv6 only interface

From: <andre.amorimfonseca_at_gmail.com>
Date: Tue, 17 Jan 2012 17:16:00 +0000 (GMT)

Hi,

I'm getting the following error trying to send a message using the
shoal example explained on
http://blogs.oracle.com/shreedhar/resource/SimpleGMSSample.java . This
error occurs only when I use a ipv6 only interface.

=======================LOG=====================================
85024 [GMS ViewWindowThread Group-grupo] INFO ShoalLogger - GMS1092:
GMS View Change Received for group: grupo : Members in view for
JOINED_AND_READY_EVENT(before change analysis) are :

1: MemberId: P0, MemberType: CORE, Address:
fe80:0:0:0:862b:2bff:fe71:f125%3:9187:230.30.1.1:9090:grupo:P0

2: MemberId: P1, MemberType: CORE, Address:
fe80:0:0:0:862b:2bff:fe72:d5eb%3:9092:230.30.1.1:9090:grupo:P1



Jan 16, 2012 3:36:19 PM
com.sun.enterprise.ee.cms.impl.base.ViewWindowImpl newViewObserved

INFO: GMS1016: Analyzing new membership snapshot received as part of
event: JOINED_AND_READY_EVENT for member: P1 of group: grupo

85025 [GMS ViewWindowThread Group-grupo] INFO ShoalLogger - GMS1016:
Analyzing new membership snapshot received as part of event:
JOINED_AND_READY_EVENT for member: P1 of group: grupo

Jan 16, 2012 3:36:19 PM
com.sun.enterprise.ee.cms.impl.base.ViewWindowImpl
addJoinedAndReadyNotificationSignal

INFO: GMS1025: Adding Joined And Ready member: P1 group: grupo
StartupState: INSTANCE_STARTUP

85025 [GMS ViewWindowThread Group-grupo] INFO ShoalLogger - GMS1025:
Adding Joined And Ready member: P1 group: grupo StartupState:
INSTANCE_STARTUP

198173 [pool-1-thread-1] WARN testshoal.SimpleGMSSample - There was
an error sending message : com.sun.enterprise.ee.cms.core.GMSException:
java.io.IOException: failed to connect to
fe80:0:0:0:862b:2bff:fe72:d5eb%3:9092:230.30.1.1:9090:grupo:P1

=====================END LOG========================================



As we can see, the receive another kind of notifications of each other
(e.g. JOINED_AND_READY_EVENT), however, when I try to send a message
with the sendMessage method of the GroupHandle object, I got the
exception.

I've run the com.sun.enterprise.mgmt.transport.NetworkUtility in order
to take some information about the used network interfaces:



================== NetworkUtility OUTPUT
===============================

Java property java.net.preferIPv6Addresses=false

AllLocalAddresses() = [/fe80:0:0:0:862b:2bff:fe71:f125%3,
/192.168.159.13, /fe80:0:0:0:862b:2bff:fe71:f124%2, /192.168.160.13]

getFirstNetworkInterface() = name:eth1 (eth1)

getFirstInetAddress(preferIPv6Addresses:false)=null

getFirstInetAddress()=/fe80:0:0:0:862b:2bff:fe71:f125%3

getFirstInetAddress( true ) = /fe80:0:0:0:862b:2bff:fe71:f125%3

getFirstInetAddress( false ) = null

getLocalHostAddress = chimint-13.lille.grid5000.fr/192.168.159.13

getFirstNetworkInteface() = name:eth1 (eth1)

getNetworkInetAddress(firstNetworkInteface, true) =
/fe80:0:0:0:862b:2bff:fe71:f125%3

getNetworkInetAddress(firstNetworkInteface, false) = null



-------------------------------------------------------



All Network Interfaces

**************************************************

Display name: eth1

Name: eth1

PreferIPv6Addresses: false

InetAddress: /fe80:0:0:0:862b:2bff:fe71:f125%3

Up? true

Loopback? false

PointToPoint? false

Supports multicast? true

Virtual? false

Hardware address: [-124, 43, 43, 113, -15, 37]

MTU: 1500

Network Inet Address (preferIPV6=false) null

Network Inet Address (preferIPV6=true)
/fe80:0:0:0:862b:2bff:fe71:f125%3

resolveBindInterfaceName(eth1)=fe80:0:0:0:862b:2bff:fe71:f125%3



**************************************************

Display name: eth0

Name: eth0

PreferIPv6Addresses: false

InetAddress: /fe80:0:0:0:862b:2bff:fe71:f124%2

InetAddress: /192.168.160.13

Up? true

Loopback? false

PointToPoint? false

Supports multicast? true

Virtual? false

Hardware address: [-124, 43, 43, 113, -15, 36]

MTU: 1500

Network Inet Address (preferIPV6=false) /192.168.160.13

Network Inet Address (preferIPV6=true)
/fe80:0:0:0:862b:2bff:fe71:f124%2

resolveBindInterfaceName(eth0)=192.168.160.13

=================== End NetworkUtility OUTPUT
===========================

As we can see, the interface eth1 has been selected to be used although
it supports only ipv6.

So, I have a couple of question here: There is some problem with this
configuration? If there is really a problem with interfaces using IPV6
only, can I workaround this problem using the BIND_INTERFACE_ADDRESS
configuration key? Actually, I think It should be nice bind with a
interface name instead of an address (like, for example "eth0", since
it has IPV4 support) since I have to do the bind over 100 different
machines with different addresses. However, I've tried it with no
success :(

Thanks for your time!