[
https://issues.jboss.org/browse/JGRP-2305?page=com.atlassian.jira.plugin....
]
Dan Berindei commented on JGRP-2305:
------------------------------------
Not sure if I should reopen this issue, but I can only run tests that use MPING with the
default settings (e.g. {{LeaveTest}}) if I set {{-Djava.net.preferIPv4Stack=true}}.
Without it I get this error:
{noformat}
17:00:31,730 ERROR (main:[]) [MPING] JGRP000200: failed sending discovery request
java.io.IOException: Invalid argument (sendto failed)
at java.net.PlainDatagramSocketImpl.send(Native Method) ~[?:1.8.0_171]
at java.net.DatagramSocket.send(DatagramSocket.java:693) ~[?:1.8.0_171]
at org.jgroups.protocols.MPING.sendMcastDiscoveryRequest(MPING.java:306) [classes/:?]
at org.jgroups.protocols.PING.sendDiscoveryRequest(PING.java:64) [classes/:?]
at org.jgroups.protocols.PING.findMembers(PING.java:32) [classes/:?]
at org.jgroups.protocols.Discovery.invokeFindMembers(Discovery.java:214) [classes/:?]
at org.jgroups.protocols.Discovery.findMembers(Discovery.java:239) [classes/:?]
at org.jgroups.protocols.Discovery.down(Discovery.java:379) [classes/:?]
at org.jgroups.protocols.FD_SOCK.down(FD_SOCK.java:376) [classes/:?]
at org.jgroups.protocols.FD_ALL.down(FD_ALL.java:236) [classes/:?]
at org.jgroups.protocols.VERIFY_SUSPECT.down(VERIFY_SUSPECT.java:101) [classes/:?]
at org.jgroups.protocols.pbcast.NAKACK2.down(NAKACK2.java:563) [classes/:?]
at org.jgroups.protocols.UNICAST3.down(UNICAST3.java:570) [classes/:?]
at org.jgroups.protocols.pbcast.STABLE.down(STABLE.java:346) [classes/:?]
at org.jgroups.protocols.pbcast.ClientGmsImpl.joinInternal(ClientGmsImpl.java:72)
[classes/:?]
at org.jgroups.protocols.pbcast.ClientGmsImpl.join(ClientGmsImpl.java:40) [classes/:?]
at org.jgroups.protocols.pbcast.GMS.down(GMS.java:1076) [classes/:?]
at org.jgroups.stack.ProtocolStack.down(ProtocolStack.java:908) [classes/:?]
at org.jgroups.JChannel.down(JChannel.java:668) [classes/:?]
at org.jgroups.JChannel._connect(JChannel.java:897) [classes/:?]
at org.jgroups.JChannel.connect(JChannel.java:393) [classes/:?]
at org.jgroups.JChannel.connect(JChannel.java:384) [classes/:?]
at org.jgroups.tests.LeaveTest.setup(LeaveTest.java:48) [classes/:?]
at org.jgroups.tests.LeaveTest.testConcurrentLeaves2(LeaveTest.java:152) [classes/:?]
{noformat}
Get rid of need for java.net.preferIPv4Stack
--------------------------------------------
Key: JGRP-2305
URL:
https://issues.jboss.org/browse/JGRP-2305
Project: JGroups
Issue Type: Enhancement
Reporter: Bela Ban
Assignee: Bela Ban
Priority: Major
Fix For: 4.0.16
New address picking scheme:
* First we detect which addresses are available: IPv4 and/or IPv6 (dual-stack if both)
* When we encounter an IPv4 address:
** If dual-stack or IPv4 stack: use it
** If IPv6-only stack: use it unless it is a class D (multicast) address: then convert it
to an IPv6-mapped address
* When we encounter an IPv6 address:
** If dual-stack or IPv6-only stack: use it
** Else: throw an exception (IPv6 address in an IPv4-only stack)
--
This message was sent by Atlassian Jira
(v7.12.1#712002)