Vinay B
Vinay B

Reputation: 733

GridGain 6.2.0 / 6.2.1 : too many file descriptors open

After upgrading to gridgain 6.2.0, on mac and linux we get "too many open files" exceptions when running our junit test case suite. The individual test cases run fine on their. We get these errors only when we run the entire suite. Has anything changed in the number of files gridgain keeps open in 6.2.x? Here is an example of the exception on Mac (On linux, the error is similar but stems from the nio package). Increasing the open file limit addresses on the OS resolves the issue but is this issue a bug or just an additional upgrade item to be noted?

Thanks

[2014-09-10 12:02:49,396] ERROR GridTcpDiscoverySpi - Failed to accept TCP connection
On MAC OS you may have too many file descriptors open (simple restart usually solves the issue) []
java.net.SocketException: Invalid argument
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:398)
at java.net.ServerSocket.implAccept(ServerSocket.java:530)
at java.net.ServerSocket.accept(ServerSocket.java:498)
at org.gridgain.grid.spi.discovery.tcp.GridTcpDiscoverySpi$TcpServer.body(GridTcpDiscoverySpi.java:5037)
at org.gridgain.grid.spi.GridSpiThread.run(GridSpiThread.java:67)

Upvotes: 0

Views: 148

Answers (2)

Ivan  Veselovsky
Ivan Veselovsky

Reputation: 181

It looks like the question is a duplicate of Tomcat startup fails due to 'java.net.SocketException Invalid argument' on Mac OS X . As I understand, the solution is to upgrade JDK to 7u60 or above, at least that works for us. (Our experiments have shown that on MacOs even significant increase of open files limit does not resolve the problem.)

Upvotes: 0

Valentin Kulichenko
Valentin Kulichenko

Reputation: 8390

From which version of GridGain are you upgrading to 6.2.1? Most likely this error is caused by shared memory communication between nodes on one host. It can be fixed by increasing the open files limit in operation system, or by switching shared memory off. Can you check if your exception is reproduced without shared memory? To switch it off configure communication SPI like this:

<property name="communicationSpi">
    <bean class="org.gridgain.grid.spi.communication.tcp.GridTcpCommunicationSpi">
        <property name="sharedMemoryPort" value="-1"/>
    </bean>
</property>

Upvotes: 2

Related Questions