search cancel

Jaspersoft Native memory allocation (mmap) failed to map


Article ID: 239935


Updated On:


Clarity PPM On Premise


You followed the steps in this KB to remediate the vulnerability to install a new version of Tomcat.

However, after following  the steps detailed below, you receive a memory error as shown:


Steps we took (per

  1. Download the apache-tomcat-9.0.62.tar_1649767997732.gz file
  2. Transfer to linux server to this location:  /opt/cappm/ppm/tomcat/
  3. gunzip apache-tomcat-9.0.62.tar_1649767997732.gz
  4. tar -xvf apache-tomcat-9.0.62.tar_1649767997732

   (resulting content in /opt/cappm/ppm/tomcat/apache-tomcat-9.0.62)

  1. cp -R /opt/cappm/ppm/tomcat/apache-tomcat-8.5.43/webapps/reportservice /opt/cappm/ppm/tomcat/apache-tomcat-9.0.62/webapps
  2. cp -R /opt/cappm/ppm/tomcat/apache-tomcat-8.5.43/.jaspersoft /opt/cappm/ppm/tomcat/apache-tomcat-9.0.62
  3. In /opt/cappm/ppm/tomcat/apache-tomcat-9.0.62/.jaspersoft/ updated per instruction
  4. Downloaded ojdbc8- from
  5. copied to /opt/cappm/ppm/tomcat/apache-tomcat-9.0.62/lib
  6. chown cappm:cappm ojdbc8-
  7. cp /opt/cappm/ppm/tomcat/apache-tomcat-8.5.43/conf/server.xml /opt/cappm/ppm/tomcat/apache-tomcat-9.0.62/conf
  8. cp /opt/cappm/ppm/tomcat/apache-tomcat-8.5.43/bin/ /opt/cappm/ppm/tomcat/apache-tomcat-9.0.62/bin
  9. Verified javaops parameters
  10. chmod all files in new tomcat directory:

    cd /opt/cappm/ppm/tomcat/apache-tomcat-9.0.62

    chmod -R +xr *

  1. Update account's .bash_profile to reference new tomcat directory:

    cd /home/cappm

    more .bash_profile

    change CATALINA_HOME to use new directory




Log file shows this:

Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00000004d4cc0000, 12535988224, 0) failed; error='Can

not allocate memory' (errno=12)


# There is insufficient memory for the Java Runtime Environment to continue.

# Native memory allocation (mmap) failed to map 12535988224 bytes for committing reserved memory.

# An error report file with more information is saved as:

# /opt/cappm/ppm/tomcat/apache-tomcat-9.0.62/bin/hs_err_pid20862.log




Release : 15.9.3

Component : PPMJSP


 Tomcat is trying to allocate 12 gb on startup. However, there is not enough contiguous memory on the server for java.

First thing we can check is id there are any zombie java processes running on the server.

ps -aux | grep java

Kill off any PID of any jaspersoft related java process.

Then try the /opt/jaspertomcat/bin/ again.

If it still gets the same error, we can lower the memory for startup in this file.


and look for:

export JAVA_OPTS="$JAVA_OPTS -Xms1024m -Xmx2048m -XX:MetaspaceSize=32m"


Change the part after "-Xmx" to something smaller, like 8 gb.  For example:

export JAVA_OPTS="$JAVA_OPTS -Xms1024m -Xmx8g -XX:MetaspaceSize=32m"