java.net.SocketException: No buffer space available | Weblogic

Oracle Weblogic Server

Env: AIX x64

If you are getting below error while starting managed server:

<Apr 11, 2011 3:37:19 PM CDT> <Error> <Coherence> <BEA-000000> <2011-04-11 15:37:19.717/150.259 Oracle Coherence 3.6.0 <Error> (thread=ACTIVE ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Error while starting cluster: (Wrapped) java.net.SocketException: No buffer space available

at com.tangosol.coherence.component.net.socket.UdpSocket.initializeDatagramSocket(UdpSocket.CDB:35)

at com.tangosol.coherence.component.net.socket.UdpSocket.open(UdpSocket.CDB:17)

at com.tangosol.coherence.component.net.Cluster$SocketManager.bindListeners(Cluster.CDB:99)

at com.tangosol.coherence.component.net.Cluster.onStart(Cluster.CDB:216)

at com.tangosol.coherence.component.net.Cluster.start(Cluster.CDB:11)

at com.tangosol.coherence.component.util.SafeCluster.startCluster(SafeCluster.CDB:3)

at com.tangosol.coherence.component.util.SafeCluster.restartCluster(SafeCluster.CDB:7)

at com.tangosol.coherence.component.util.SafeCluster.ensureRunningCluster(SafeCluster.CDB:26)

at com.tangosol.coherence.component.util.SafeCluster.start(SafeCluster.CDB:2)

at com.tangosol.net.CacheFactory.ensureCluster(CacheFactory.java:998)

at com.tangosol.net.DefaultConfigurableCacheFactory.ensureServiceInternal(DefaultConfigurableCacheFactory.java:913)

at com.tangosol.net.DefaultConfigurableCacheFactory.ensureService(DefaultConfigurableCacheFactory.java:892)

at com.tangosol.net.DefaultConfigurableCacheFactory.ensureCache(DefaultConfigurableCacheFactory.java:874)

at com.tangosol.net.DefaultConfigurableCacheFactory.configureCache(DefaultConfigurableCacheFactory.java:1223)

at com.tangosol.net.DefaultConfigurableCacheFactory.ensureCache(DefaultConfigurableCacheFactory.java:290)

at com.tangosol.net.CacheFactory.getCache(CacheFactory.java:735)

at com.tangosol.net.CacheFactory.getCache(CacheFactory.java:712)

...............................................................
...............................................................
...............................................................

Caused by: java.net.SocketException: No buffer space available

at java.net.PlainDatagramSocketImpl.socketSetOption(Native Method)

at java.net.PlainDatagramSocketImpl.setOption(PlainDatagramSocketImpl.java:398)

at java.net.DatagramSocket.setReceiveBufferSize(DatagramSocket.java:913)

<Apr 11, 2011 3:37:19 PM CDT> <Error> <oracle.integration.platform.blocks.deploy.coordinator> <BEA-000000> <Cluster communication initialization failed. If you are using multicast, please make sure multicast is enabled on your network and that there is no interference on the address in use. Please see the documentation for more details.

(Wrapped) java.net.SocketException: No buffer space available

at com.tangosol.coherence.component.net.socket.UdpSocket.initializeDatagramSocket(UdpSocket.CDB:35)

at com.tangosol.coherence.component.net.socket.UdpSocket.open(UdpSocket.CDB:17)

at com.tangosol.coherence.component.net.Cluster$SocketManager.bindListeners(Cluster.CDB:99)

at com.tangosol.coherence.component.net.Cluster.onStart(Cluster.CDB:216)

at com.tangosol.coherence.component.net.Cluster.start(Cluster.CDB:11)

at com.tangosol.coherence.component.util.SafeCluster.startCluster(SafeCluster.CDB:3)

at com.tangosol.coherence.component.util.SafeCluster.restartCluster(SafeCluster.CDB:7)

at com.tangosol.coherence.component.util.SafeCluster.ensureRunningCluster(SafeCluster.CDB:26)

at com.tangosol.coherence.component.util.SafeCluster.start(SafeCluster.CDB:2)

at com.tangosol.net.CacheFactory.ensureCluster(CacheFactory.java:998)

at com.tangosol.net.DefaultConfigurableCacheFactory.ensureServiceInternal(DefaultConfigurableCacheFactory.java:913)

at com.tangosol.net.DefaultConfigurableCacheFactory.ensureService(DefaultConfigurableCacheFactory.java:892)

at com.tangosol.net.DefaultConfigurableCacheFactory.ensureCache(DefaultConfigurableCacheFactory.java:874)

at com.tangosol.net.DefaultConfigurableCacheFactory.configureCache(DefaultConfigurableCacheFactory.java:1223)

at com.tangosol.net.DefaultConfigurableCacheFactory.ensureCache(DefaultConfigurableCacheFactory.java:290)

at com.tangosol.net.CacheFactory.getCache(CacheFactory.java:735)

at com.tangosol.net.CacheFactory.getCache(CacheFactory.java:712)

at oracle.integration.platform.blocks.cluster.CoherenceClusterInterfaceImpl.getNamedCacheForCluster(CoherenceClusterInterfaceImpl.java:146)

at oracle.integration.platform.blocks.cluster.CoherenceClusterInterfaceImpl.initCoordinator(CoherenceClusterInterfaceImpl.java:90)

at oracle.integration.platform.blocks.cluster.CoherenceClusterInterfaceImpl.<init>(CoherenceClusterInterfaceImpl.java:36)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:44)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCon

 

When you see above error in logs while starting managed servers in AIX try below configurations in AIX

To help minimization of packet loss, the operating system 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 operating system is not configured to allow for large buffers Coherence will use 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 operating system failed to allocate the full size buffer.

Example : Message Indicating OS Failed to Allocate the Full Buffer Size

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 operating system 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.

In case of any ©Copyright or missing credits issue please check CopyRights page for faster resolutions.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.