When centos6.5 uses su to switch users, it appears: fork: retry: The resource is temporarily unavailable, and the java program cannot be started normally.
Solutions found online:
cd /etc/security/limits.d has a file vi 90-nproc.conf
# Default limit for number of user's processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.
* soft nproc 1024
change into
* soft nproc 65535
Or comment out.