OneClick tomcat error Initial heap size set to a larger value than the maximum heap size - after upgrading to NetOps 21.2
search cancel

OneClick tomcat error Initial heap size set to a larger value than the maximum heap size - after upgrading to NetOps 21.2

book

Article ID: 225544

calendar_today

Updated On:

Products

CA Spectrum DX NetOps

Issue/Introduction


After upgrading Spectrum OneClick to NetOps 21.2 tomcat fails to start.

The following errors are seen in the catalina.out log

$SPECROOT/tomcat/logs/
tail catalina.out

Error occurred during initialization of VM
Initial heap size set to a larger value than the maximum heap size

Environment

Release : 21.2

Component : Spectrum OneClick

Cause

In some cases the java initial heap memory -Xms and the maximum heap memory -Xmx values have been switched in
  the $SPECROOT/tomcat/bin/catalina.sh script. Tomcat fails to start due to the initial memory setting now being larger 
  than the maximum memory


example

 

If the $PECROOT/custom/common/config/tomcat-server-config.xml exists, then the upgrade will pick up the maximum heap memory from that file and update in the $SPECROOT/tomcat/bin/catalina.sh script.

Whenever you change the Tomcat memory setting via the OneClick Administration page, the change will be saved on both files (tomcat-server-config.xml and catalina.sh).

Resolution


Edit: catalina.sh


cd $SPECROOT/tomcat/bin/
vi catalina.sh

Correct the -Xmx and -Xms values so that the -Xmx (max heap) value is larger or equal to the -Xms (initial heap value) then restart OneClick tomcat

example


./startTomcat.sh


Also, update the $PECROOT/custom/common/config/tomcat-server-config.xml file, so this problem would not happen on future upgrades.