Mac OS X issues


TOS issue

When running with JDK 5 (same for 6 beta), the following exception occurs if tos (in UDP) is set to a value greater than 0:

traffic class of 8 could not be set, will be ignored Invalid argument
        at Method)
        at org.jgroups.protocols.UDP.createSockets(
        at org.jgroups.protocols.UDP.start(
        at org.jgroups.stack.Configurator.startProtocolStack(
        at org.jgroups.stack.ProtocolStack.startStack(
        at org.jgroups.JChannel.connect(
        at SimpleChat.start(
        at SimpleChat.main(


The reason is that this call is not implemented properly in the IPv6 stack of the JDK 5 port for Mac OS X:


This can be avoided by using the IPv4 stack:


The JGroups JIRA issue is This hasn't been fixed in JDK 6 beta (as of July 2007).



UDP Messages sent over the loopback (localhost) with a size > mtu (default is 16K) are silently discarded


There is a bug in the loopback adapter in Mac OSX 10.4.X (Tiger). This default limit is significantly smaller than the 65K on Windows, see


This is really bad, especially since there isn't even a warning!


Therefore, either the mtu on the loopback has to be increased:

sudo ifconfig lo0 mtu 65535

Or, the following parameters have to be below the 16K:

  • UDP.max_bundle_size

  • NAKACK.max_xmit_size and

  • FRAG2.frag_size


The JIRA issue is