Oct 172012
Java Errors

The following message is logged from Coherence, preventing it from starting up:

java.net.SocketException: No buffer space available
at com.tangosol.coherence.component.net.socket.UdpSocket.initializeDatagramSocket(UdpSocket.CDB:28)

This can be seen either in Coherence standalone environments but has been observed to turn up also in WebLogic Server/SOA instances, as Coherence may be consumed there as well.

Coherence’s network layer requires some minimum buffer sizes which might not be enabled by operating system’s default settings.

Configure the operating system to allow the network buffer socket sizes that Coherence requires.

To help minimization of packet loss, the OS socket buffers need to be large enough to handle the incoming network traffic while your Java application is paused during garbage collection. By default Coherence will attempt to allocate a socket buffer of 2MB. If your OS is not configured to allow for large buffers Coherence will utilize smaller buffers. Most versions of Unix have a very low default buffer limit, which should be increased to at least 2MB.

Starting with Coherence 3.1 you will receive the following warning if the OS failed to allocate the full size buffer.

UnicastUdpSocket failed to set receive buffer size to 1428 packets (2096304 bytes); actual size is 89 packets (131071 bytes). Consult your OS documentation regarding increasing the maximum socket buffer size. Proceeding with the actual value may cause sub-optimal performance.

Though it is safe to operate with the smaller buffers it is recommended that you configure your OS to allow for larger buffers.

On Linux execute (as root):

sysctl -w net.core.rmem_max=2096304
sysctl -w net.core.wmem_max=2096304

On Solaris execute (as root):

ndd -set /dev/udp udp_max_buf 2096304

On AIX execute (as root):

no -o rfc1323=1
no -o sb_max=4194304

Note that AIX only supports specifying buffer sizes of 1MB, 4MB, and 8MB. Additionally there is an issue with IBM’s 1.4.2, and 1.5 JVMs which may prevent them from allocating socket buffers larger then 64K. This issue has been addressed in IBM’s 1.4.2 SR7 SDK and 1.5 SR3 SDK.
On Windows:

Windows does not impose a buffer size restriction by default.

© Incase of any copyright infringements please check copyrights page for faster resolutions.

Leave a Reply

Show Buttons
Hide Buttons