Docker Community Forums

Share and learn in the Docker community.

Permission Denied and OOM error when running "java -version" command

(Arunviswa) #1


I’ve running docker in Centos 6.6. I’ve not actually installed it instead I’ve downloaded the latest docker binary from

In this VM I’ve created the centos container by the following commands.

cat ./images/docker-centos-base-master/centos65.tar.xz | ./docker-latest import - centos/mycontainer
./docker-latest create --privileged=true -t -i centos/mycontainer bash
./docker-latest start -a -i e1ab024063a5

Container started successfully in interactive mode.
I’ve copied the jdk7 rpm to the container and installed it using “rpm” and then I tried “java -version” command

bash-4.1# java -version
Java HotSpot™ 64-Bit Server VM warning: INFO: os::commit_memory(0x00007f0480815000, 2555904, 1) failed; error=‘Permission denied’ (errno=13)
’# There is insufficient memory for the Java Runtime Environment to continue.
’# Native memory allocation (malloc) failed to allocate 2555904 bytes for committing reserved memory.
’# An error report file with more information is saved as:
’# /opt/jdk1.7.0_72/bin/hs_err_pid9.log

So I tried running it from the installed location and end up with the same error.
bash-4.1# cd /opt/jdk1.7.0_72/bin/
bash-4.1# java -version

Almost 8GB of my memory is still free but I’m not sure why this error is coming.
bash-4.1# free -g
total used free shared buffers cached
Mem: 15 7 8 0 0 6
-/+ buffers/cache: 0 15
Swap: 3 0 3

Any help will be really appreciable.

Arun V