Y.op
Y.op

Reputation: 79

CentOS - Insufficient memory for the java runtime

I want to install jenkins on my server, unfortunately, I can't run Java, i have this error :

There is insufficient memory for the Java Runtime Environment to continue

Error

Result of free -m : free There is 2,7Go RAM free.

I set JAVA_OPTS : export JAVA_OPTS="-Xms1024m -Xmx1024m -XX:MaxPermSize=256m"

So, I tried a lot of things, but it's impossible to start java...

If anyone has any ideas

thx.

Upvotes: 0

Views: 828

Answers (1)

Adam vonNieda
Adam vonNieda

Reputation: 1745

The short answer is that you're running into selinux enforcement. The quick solution is to set selinux to "permissive" via

setenforce 0

There's longer explanations that you can find if you search for "selinux openjdk os::commit_memory permission denied"

How and why does "setenforce 0" allow Java 7 to run?

Upvotes: 2

Related Questions