users@shoal.java.net

Re: Problem sending message using a ipv6 only interface

From: Joseph Fialli <joe.fialli_at_oracle.com>
Date: Tue, 17 Jan 2012 14:25:17 -0500

  Andre,

What version of shoal are you using? 1.5.x or the 1.6.x branch.
I have committed fixes to the 1.6.x branch recently to enhance IPv6 support
and to enhance selection of a IPv4 network interface, if one does exist.
The submitted networkutility output looks like the 1.5.x branch (the trunk).

Could you submit network utility output for 1.6.x branch?

Here is a pointer to that workspace:
|https://svn.java.net/svn/shoal~svn/branches/gms-transport-module|

Here is a pointer to the latest release (via maven):
https://maven.java.net/content/repositories/public/org/shoal/shoal-gms-impl/1.6.17/shoal-gms-impl-1.6.17.jar

You can run the latest 1.6.x NetworkUtility by downloading and including
above jar in classpath.

We have been working on gms-transport-module branch lately and it
will become the trunk after glassfish 3.1.2 is released.

********

Could you submit the entire logs?

Or you could look for following at beginning of grupo:P1 server log.

[#|2012-01-17T11:20:52.647-0500|CONFIG||ShoalLogger|_ThreadID=18;_ThreadName=Thread-4;|Grizzly
controller listening on /0.0.0.0:9144. Controller started in 86 ms|#]


The above server log message states explicitly what address and port
that grupo:P1 is listening on and could assist in understanding
the error that you have sent in.

java.io.IOException: failed to connect
to fe80:0:0:0:862b:2bff:fe72:d5eb%3:9092:230.30.1.1:9090:grupo:P1

********

Setting BIND_INTERFACE_ADDRESS is the means to specify a network
interface when there are multiple ones and
GMS is not selecting the correct one. There was support to set the
network interface name but it was not
working correctly on all platforms(linux was known to fail) due to
differences in java.network methods across platforms.
(Here is documentation of that known bug:
http://java.net/jira/browse/GLASSFISH-18047)

I do have a fix but was waiting for glassfish 3.1.2 to release before
committing that fix.
I have attached that diff if you would like to try out applying that
patch yourself
to latest revision of
|https://svn.java.net/svn/shoal~svn/branches/gms-transport-module.|

**********

I would like to state that our testing is mostly on IPv4 only or
dual stack (IPv4 and IPv6). When we have tested on IPv6 only(very
rarely), we have had to explicitly set
several java.net properties (see link below)

Link: http://docs.oracle.com/javase/7/docs/api/java/net/doc-files/net-properties.html


-Joe Fialli, Oracle Corp.

On 1/17/12 12:11 PM, André Fonseca wrote:
> 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 <http://192.168.159.13>,
> /fe80:0:0:0:862b:2bff:fe71:f124%2, /192.168.160.13
> <http://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
> <http://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 <http://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
> <http://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!
>
>


attached mail follows:


attached mail follows: