blob: 7828aadddf1b3be83f0cd4c8e176641ee6b02072 [file] [log] [blame]
<div class="wiki-content maincontent">
<p>You may wonder why you are not receiving any message at all during multicast, maybe you have just tried everything, and even on some other OS or distributions and JDK and realize that it works in some place and not on other... you may have tried a small C program to do the same..and it worked well.. you're feeling the pressure on your neck...what could be wrong on YOUR application on THIS OS/distribution...</p>
<p>As a default, on the Linux platform, if you have IPV6 support enabled in your kernel, the Java Runtime (since 1.4 version) will use IPV6 sockets to communicate. That's perfectly fine, except that your network may not be configured for IPV6. So everything will be dropped...and nothing will ever be received on the consumer side (which maybe even does not support IPV6).</p>
<p>There's a solution to this problem: Force IPV4 stack to be used by the Java Runtime. This can be done using a system property: </p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre> -Djava.net.preferIPv4Stack=true
</pre>
</div></div>
<div class="confluence-information-macro confluence-information-macro-information"><p class="title">Networking IPv6 User Guide</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>This information and much more details can be found in the Java Documentation <a shape="rect" class="external-link" href="http://java.sun.com/j2se/1.5.0/docs/guide/net/ipv6_guide/" rel="nofollow">Networking IPv6 User Guide</a> and in <a shape="rect" class="external-link" href="http://java.sun.com/j2se/1.5.0/docs/guide/net/properties.html" rel="nofollow">Networking Properties</a></p></div></div>
<p>Alternatively you can disable IPV6 support on your Linux machine by adding the following line <strong>at the end of /etc/modprobe.conf</strong> (<em>as its name suggests immediately, net-pf-10 is the IPV6 networking module</em>)</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>alias net-pf-10 off # disable IPV6
</pre>
</div></div>
<p>If you have very knowledgeable sysadmins that are used to these problems (like in a TV or Radio company for instance where they use multicast a lot), they will be able to tell you immediately if IPV6 is supported on the network (alternatively they will be able to tell you as well if multicast is supported and on which address/port you can multicast), this is a plus and will help you tremendously.</p>
<p>In some more frequent cases, your sysadmin will be as lost as you are as they are not dealing with these issues very frequently. So good luck for finding out problems. You will need to have a very strict approach to eliminate uncertainties. For this you will need at least a tool like <a shape="rect" class="external-link" href="http://www.ethereal.com" rel="nofollow">ethereal</a> (works on unix, linux and windows)</p></div>