OK, setting the correct limits in /etc/sysconfig/limits.conf, and messing around with ulimit can leave you thinking everything is ok, while it is not.
This little line shows you an overview of all the running java processes, to quickly check the Open File limit is correct.

Check the limits (open files) for all running java processes
(as root).

for i in $(pgrep java); do prlimit -p $i|grep NOFILE; done  

In this example, you see that there’s just 2 of the jvm’s running with the correct limits. The easiest way to resolve this (if `/etc/sysconfig/limits.conf is correct, and you have a service that starts your nodeagent) , is to reboot :

NOFILE max number of open files 65536 65536
NOFILE max number of open files 65536 65536
NOFILE max number of open files 1024 4096
NOFILE max number of open files 1024 4096
NOFILE max number of open files 1024 4096
NOFILE max number of open files 1024 4096
NOFILE max number of open files 1024 4096
NOFILE max number of open files 1024 4096
NOFILE max number of open files 1024 4096
NOFILE max number of open files 1024 4096
NOFILE max number of open files 1024 4096
NOFILE max number of open files 1024 4096
NOFILE max number of open files 1024 4096
NOFILE max number of open files 1024 4096
NOFILE max number of open files 1024 4096
NOFILE max number of open files 1024 4096
NOFILE max number of open files 1024 4096
NOFILE max number of open files 1024 4096
NOFILE max number of open files 1024 4096