You followed the steps in this KB to remediate the vulnerability
https://knowledge.broadcom.com/external/article?articleId=238263 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 https://knowledge.broadcom.com/external/article?articleId=238263)
(resulting content in /opt/cappm/ppm/tomcat/apache-tomcat-9.0.62)
cd /opt/cappm/ppm/tomcat/apache-tomcat-9.0.62
chmod -R +xr *
cd /home/cappm
more .bash_profile
change CATALINA_HOME to use new directory
./startup.sh
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/startup.sh again.
If it still gets the same error, we can lower the memory for startup in this file.
/opt/jaspertomcat/bin/setenv.sh
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"