IBM Support

javax.naming.CommunicationException: Too many open files :java.net.SocketException: Too many open files

Troubleshooting


Problem

javax.naming.CommunicationException: Too many open files :java.net.SocketException: Too many open files

Symptom

Issue: Integration Server throws “too many open files" error.
 
Scenario:
 
 
Customer is downloading items using manageItem API. They have a simple service, which calls manageItem API to create items reading the messages from a queue. They are frequently facing "Caused by: java.net.SocketException: Too many open files" error and their agents stop working. On restarting the agent, it starts working properly.
The issue is because of repeated lookup call (to propagate the cache to all the other JVMs) requiring RMI channels. This error happens because of a high demand for a common resource [RMI Channel] and/or because of insufficient limit configured at the OS level.
 
For Example:
When system repeatedly makes the RMI calls (because of Item Updates happening at a very high frequency), there is not enough time given for the context closure or release of resources resulting in the channel exhaustion ultimately causing the Socket Exception.
Error Message

========ERROR TRACE============
Failed with error: javax.naming.CommunicationException: Too many open files [Root exception is java.net.SocketException: Too many open files]: YCPRemoteUtils          
2009-06-16 05:17:35,776:ERRORDTL:Thread-16_Hub2ProductDataReceiver: [1245125855775]javax.naming.CommunicationException: Could not obtain connection to any of these urls: <MACHINE IP:PortNO> and discovery failed with error: javax.naming.CommunicationException: Too many open files [Root exception is java.net.SocketException: Too many open files] [Root exception is javax.naming.CommunicationException: Failed to connect to server <MACHINE IP:PortNO> [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server <MACHINE IP:PortNO> [Root exception is java.net.SocketException: Too many open files]]]
 at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1414)
 at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:594)
 at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
 at javax.naming.InitialContext.lookup(InitialContext.java:351)
 at com.yantra.yfc.rmi.YFCRemoteUtils.invokeOnRemoteObject(YFCRemoteUtils.java:64)
 at com.yantra.ycp.rmi.YCPRemoteUtils.broadcast(YCPRemoteUtils.java:146)
 at com.yantra.ycp.rmi.YCPRemoteUtils.internalBroadcast(YCPRemoteUtils.java:59)
===================================

Resolving The Problem

Resolution:

High demand for a common resource [RMI Channel] is root cause of this error. There are two options (Sterling Support strongly recommends option#1).
 
1.       Disable the cache for the entity for which the frequent RMI calls occur.
2.       It is worth checking with the System Administrator for any limits set for this at the operating system level and if possible to stretch those limits.
 
 
In this particular case customer implemented #1 and the issue was resolved completely.

[{"Product":{"code":"SS6PEW","label":"IBM Sterling Order Management"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Not Applicable","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Historical Number

NFX6900

Document Information

Modified date:
16 June 2018

UID

swg21551911