Java error when setting Xms setting too high.

  • KM725910
  • 15-May-2009
  • 29-Sep-2015

Summary

This document applies to Service Manager versions 7.0x and 7.1x. Setting the Xms parameter too high for system available memory will generate an error and prevent Service Manager Server from starting

Error

Please note that this Knowledge Document applies to Service Manager versions 7.0x and 7.1x

The following error block is encountered in the Service Manager sm.log. Below is a sample excerpt from an affected system

 


 

6436(  4084) 05/15/2009 11:10:49  RTE E **** CreateJavaVM() failed! rc = -4
6436(  4084) 05/15/2009 11:10:49  RTE D  -Xms512m
6436(  4084) 05/15/2009 11:10:49  RTE D  -Xmx512m
6436(  4084) 05/15/2009 11:10:49  RTE D  -Xrs
6436(  4084) 05/15/2009 11:10:49  RTE D  -Djava.class.path=.\lib\common-7.10.jar;.\lib\commons-codec-1.3.jar;.\lib\commons-logging-1.1.jar;.\lib\embedded-7.10.jar;.\lib\FastInfoset-1.1.1.jar;.\lib\htmlparser-1.6.jar;.\lib\jgroups-all-2.5.0.jar;.\lib\k2.jar;.\lib\kmplugin-7.10.jar;.\lib\log4j-1.2.15.jar;.\lib\mail-1.4.jar;.\lib\saaj-api-2.1.jar;.\lib\saaj-impl-2.1.jar;.\lib\scautoserver-7.10.jar;.\lib\utility-7.10.jar;.\tomcat\lib\catalina-optional.jar;.\tomcat\lib\catalina.jar;.\tomcat\lib\commons-el.jar;.\tomcat\lib\commons-logging.jar;.\tomcat\lib\commons-modeler.jar;.\tomcat\lib\jasper-compiler-jdt.jar;.\tomcat\lib\jasper-compiler.jar;.\tomcat\lib\jasper-runtime.jar;.\tomcat\lib\jsp-api.jar;.\tomcat\lib\naming-factory.jar;.\tomcat\lib\naming-resources.jar;.\tomcat\lib\servlet-api.jar;.\tomcat\lib\servlets-default.jar;.\tomcat\lib\tomcat-coyote.jar;.\tomcat\lib\tomcat-http.jar;.\tomcat\lib\tomcat-util.jar;C:\Program Files\Common Files\Hewlett-Packard\HPOvLIC\lib\OvLic.jar
6436(  4084) 05/15/2009 11:10:49  RTE D  -Djava.library.path=.
6436(  4084) 05/15/2009 11:10:49  RTE D  -Djava.endorsed.dirs=.\lib\endorsed
6436(  4084) 05/15/2009 11:10:49  RTE D  -Djavax.net.ssl.trustStore=C:\Program Files\HP\Service Manager 7.10\Server\RUN\jre\lib\security\cacerts
6436(  4084) 05/15/2009 11:10:49  RTE D  -Djavax.net.ssl.trustStorePassword=changeit
6436(  4084) 05/15/2009 11:10:49  RTE D  -Djavax.net.ssl.keyStore=C:\Program Files\HP\Service Manager 7.10\Server\RUN\smsrv.keystore
6436(  4084) 05/15/2009 11:10:49  RTE D  -Djavax.net.ssl.keyStorePassword=changeit
6436(  4084) 05/15/2009 11:10:49  RTE D  -Djava.net.preferIPv4Stack=true
6436(  4084) 05/15/2009 11:10:49  RTE E Error! CreateJavaVM() failed! rc = -4
6436(  4084) 05/15/2009 11:10:49  RTE E HP Service Manager is unable to start. Failed to initialize or attach to shared memory environment
6436(  4084) 05/15/2009 11:10:49  RTE E Could not create JVM.
6436(  4084) 05/15/2009 11:10:49  RTE I Shutdown of HP Service Manager environment has completed
6436(  4084) 05/15/2009 11:10:49  RTE E runServlet: inhook failed!
6436(  4084) 05/15/2009 11:10:49  RTE E runServlet returned -1
6436(  4084) 05/15/2009 11:10:49  RTE I Thread termination in progress
6436(  4084) 05/15/2009 11:10:49  RTE E Error 487 in call VirtualFree - Attempt to access invalid address.
6436(  4084) 05/15/2009 11:10:49  RTE D Total number of recorded stacks: 0
6436(  4084) 05/15/2009 11:10:49  RTE I Process termination cleanup complete

 


 

Cause

Setting initial Java heap size (i.e. Xms) to a value that is too high for the systems available memory will cause Service Manager (SM) to attempt reserving memory that is not free - or - simply not available.

Fix

There are several options to resolve this error depending on the requirements.

  • Lower the amount of memory reserved for Service Manager (lower amount of Xms memory).
  • Add more memory to the server hosting Service Manager.
  • Free up memory by stopping other non-essential applications taking memory on the Server.