title: jGroups does not join any group on RHEL with link-local ipv6 address
body: <p>Am seeing this exception in RHEL 7.3.1 when running my code to form a jGroups cluster. The following exception is seen in log.</p>
  
  <pre><code>[DEBUG] 2017-10-03 20:23:01.339 [pool-10-thread-1] client.jgroups  - Creating new Channel
  [WARN ] 2017-10-03 20:23:01.342 [pool-10-thread-1] stack.Configurator  - JGRP000014: TP.loopback has been deprecated: enabled by default
  [DEBUG] 2017-10-03 20:23:01.343 [pool-10-thread-1] stack.Configurator  - set property UDP.bind_addr to default value /fe80:0:0:0:2d57:389e:e4fe:9520%eth0
  [DEBUG] 2017-10-03 20:23:01.345 [pool-10-thread-1] stack.Configurator  - set property UDP.diagnostics_addr to default value /ff0e:0:0:0:0:0:75:75
  [DEBUG] 2017-10-03 20:23:01.346 [pool-10-thread-1] client.jgroups  - STATE OPEN
  [DEBUG] 2017-10-03 20:23:01.347 [pool-10-thread-1] protocols.UDP  - sockets will use interface fe80:0:0:0:2d57:389e:e4fe:9520%eth0
  [ERROR] 2017-10-03 20:23:01.374 [pool-10-thread-1] client.jgroups  - Catching
  java.lang.Exception: failed to open a port in range 40000-40255
      at org.jgroups.protocols.UDP.createDatagramSocketWithBindPort(UDP.java:500) ~[xxx-xxx.jar:2.0.1]
      at org.jgroups.protocols.UDP.createSockets(UDP.java:361) ~[xxx-xxx.jar:2.0.1]
      at org.jgroups.protocols.UDP.start(UDP.java:270) ~[xxx-xxx.jar:2.0.1]
      at org.jgroups.stack.ProtocolStack.startStack(ProtocolStack.java:965) ~[xxx-xxx.jar:2.0.1]
      at org.jgroups.JChannel.startStack(JChannel.java:891) ~[xxx-xxx.jar:2.0.1]
      at org.jgroups.JChannel._preConnect(JChannel.java:553) ~[xxx-xxx.jar:2.0.1]
      at org.jgroups.JChannel.connect(JChannel.java:288) ~[xxx-xxx.jar:2.0.1]
      at org.jgroups.JChannel.connect(JChannel.java:279) ~[xxx-xxx.jar:2.0.1]
  </code></pre>
  
  <p>Now the same client code runs perfectly on a Ubuntu 14.04 machine. Another thing to note is that the following flag is not provided in both the cases.</p>
  
  <pre><code>-Djava.net.preferIPv4Stack=true
  </code></pre>
  
  <p>Also in both the cases link-local IPv6 addresses are being used.
  How to make the same code work on RHEL?</p>
  
  <p>Adding the following info, for the questions asked by @<a href="https://stackoverflow.com/users/2309917/bela-ban">bela-ban</a> : 
  Trying options in config xml.</p>
  
  <blockquote>
    <blockquote>
      <p>I tried both LINK_LOCAL &amp; NON_LOOPBACK, but still getting the same error. </p>
    </blockquote>
  </blockquote>
  
  <p>JGroups version?</p>
  
  <blockquote>
    <blockquote>
      <p>I am using 3.6.3-Final version of JGroups.</p>
    </blockquote>
  </blockquote>
  
  <p>Omitting IPv4 flag</p>
  
  <blockquote>
    <blockquote>
      <p>We have omitted -Djava.net.preferIPv4Stack=true, as we want to test our client in an IPv6 client environment. </p>
    </blockquote>
  </blockquote>
  
  <p>Running ifconfig -a</p>
  
  <blockquote>
    <blockquote>
      <p>Also running the command ifconfig -a , gives the following output : </p>
    </blockquote>
  </blockquote>
  
  <pre><code>ifconfig -a
  eth0: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt;  mtu 1500
          inet 10.66.194.103  netmask 255.255.252.0  broadcast 10.66.195.255
          inet6 fe80::4b16:4a66:2bc3:c505  prefixlen 64  scopeid 0x20&lt;link&gt;
          inet6 fe80::30cb:2f41:5e04:51c2  prefixlen 64  scopeid 0x20&lt;link&gt;
          inet6 fe80::2d57:389e:e4fe:9520  prefixlen 64  scopeid 0x20&lt;link&gt;
          ether 00:15:5d:b8:65:47  txqueuelen 1000  (Ethernet)
          RX packets 8485475  bytes 1961303302 (1.8 GiB)
          RX errors 0  dropped 109087  overruns 0  frame 0
          TX packets 49088  bytes 4169469 (3.9 MiB)
          TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  
  lo: flags=73&lt;UP,LOOPBACK,RUNNING&gt;  mtu 65536
          inet 127.0.0.1  netmask 255.0.0.0
          inet6 ::1  prefixlen 128  scopeid 0x10&lt;host&gt;
          loop  txqueuelen 1  (Local Loopback)
          RX packets 154252  bytes 11261136 (10.7 MiB)
          RX errors 0  dropped 0  overruns 0  frame 0
          TX packets 154252  bytes 11261136 (10.7 MiB)
          TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  </code></pre>