Java.net. SocketException in Linux: Too program open files solution Linux code [root @ fwang5stash ~] # Ulimit-a core file size (blocks,-c) 0 data seg size (kbytes,-d) unlimited scheduling priority (-e) 0 file size (blocks,-f) unlimited pending signals (-I) 7167 max locked memory (kbytes,-l) 32 max memory size (kbytes,-m) unlimited open files (-n) 1024 pipe size (512 bytes,-p) 8 POSIX message queues (bytes,-q) 819200 real-time priority (-r) 0 stack size (kbytes,-s) 10240 cpu time (seconds, -T) unlimited max user processes (-u) 7167 virtual memory (kbytes,-v) unlimited file locks (-x) unlimited 1. Temporarily modify the Linux code [root @ fwang5stash ~] # Ulimit-n 8192 2. permanently modify/etc/security/limits. add the following line to conf: *-nofile 8192 Modify/etc/pam. d/login: Add the following session required/lib/security/pam_limits.so and log on again.