I'm stomped.
While as root:
root@web01 [~]# uname -a
Linux web01 2.6.32-71.29.1.el6.x86_64 #1 SMP Mon Jun 27 19:49:27 BST 2011 x86_64 x86_64 x86_64 GNU/Linux`
root@web01 [~]# java -version
java version "1.6.0_27"
Java(TM) SE Runtime Environment (build 1.6.0_27-b07)
Java HotSpot(TM) 64-Bit Server VM (build 20.2-b06, mixed mode)
While as a low-privilege user:
user@web01 [~]# java -Xmx32m -version
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
UPDATED:
Output of ulimit -a (when run as the low privilege user):
core file size (blocks, -c) 200000
data seg size (kbytes, -d) 200000
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 7875
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) 200000
open files (-n) 100
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 35
virtual memory (kbytes, -v) 200000
file locks (-x) unlimited
Add following lines to the /etc/security/limits.conf
Replace
<user>
with your linux user. -as(address space) will be used to modify virtual/actual memory.Here's your culprit. A Java Vm with 32M heap won't fit into that: