Glassfish v3 failure when startup. "Cannot allocate memory "
Posted
by
Shisoft
on Server Fault
See other posts from Server Fault
or by Shisoft
Published on 2011-02-01T11:50:16Z
Indexed on
2011/02/01
15:27 UTC
Read the original article
Hit count: 252
It is clear in this Question
Fail to start Glassfish 3.1: java.io.IOException: error=12, Cannot allocate memory
But in my case,I have a 512M memory Ubuntu 10.04 vps.It seems that I don't need to change any configure.But when start the server,I got this exception
VM failed to start: java.io.IOException: Cannot run program "/usr/lib/jvm/java-6-sun-1.6.0.22/bin/java" (in directory "/home/glassfish/glassfish/domains/domain1/config"): java.io.IOException: error=12, Cannot allocate memory
So,I set
<jvm-options>-Xmx512</jvm-options>
to
<jvm-options>-Xmx400</jvm-options>
The exception remains.What did I do something wrong?
result of free -m
total used free shared buffers cached
Mem: 512 43 468 0 0 0
-/+ buffers/cache: 43 468
Swap: 0 0 0
result of cat /proc/user_beancounters
Version: 2.5
uid resource held maxheld barrier limit failcnt
146049: kmemsize 2670652 5385253 51200000 51200000 0
lockedpages 0 8 2048 2048 0
privvmpages 11134 134522 131200 262200 4
shmpages 648 1352 128000 128000 0
dummy 0 0 0 0 0
numproc 12 73 500 500 0
physpages 6519 28162 0 200000000 0
vmguarpages 0 0 512000 512000 0
oomguarpages 6527 28169 512000 512000 0
numtcpsock 4 14 4096 4096 0
numflock 0 5 2048 2048 0
numpty 1 2 32 32 0
numsiginfo 0 3 1024 1024 0
tcpsndbuf 159600 265744 20480000 20480000 0
tcprcvbuf 65536 3590352 20480000 20480000 0
othersockbuf 44232 90640 20480000 20480000 0
dgramrcvbuf 0 12848 10240000 10240000 0
numothersock 22 31 2048 2048 0
dcachesize 0 0 10240000 10240000 0
numfile 1002 1474 50000 50000 0
dummy 0 0 0 0 0
dummy 0 0 0 0 0
dummy 0 0 0 0 0
numiptent 24 24 2048 2048 0
Thanks
© Server Fault or respective owner