Java processes do not start using smgrdia | Too small initial heap or ownership
search cancel

Java processes do not start using smgrdia | Too small initial heap or ownership

book

Article ID: 220177

calendar_today

Updated On:

Products

CA Automic One Automation

Issue/Introduction

Right-clicking the JCP in the service manager dialog in a newly installed 12.3 system and choosing "start" does nothing.  Service manager log shows something like:

20210722/182359.011 - U00022004 Starting process 'UC4 JCP' ...
20210722/182359.011 - U00022005 ... with command line  'java -Xrs -Xmx512 -jar ucsrvjp.jar -IC:\automic\12.3.4\ServiceManager\bin\..\..\AutomationEngine\bin\ucsrv.ini -svc%port% -rest'.
20210722/182359.011 - U00022006 ... and start directory  'C:\automic\12.3.4\ServiceManager\bin\..\..\AutomationEngine\bin'.
20210722/182359.011 - U00022007 Process 'UC4 JCP' (ID '16736') successfully started.
20210722/182419.085 - U00022023 No associated window can be found for process 'UC4 JCP'.
20210722/182419.085 - U00022012 Process 'UC4 JCP' (ID '16736') ended.
20210722/182419.085 - U00022022 Process 'UC4 JCP' ended, exit code='1'.

To troubleshoot:

  1. Open the service manager dialog (smgrdia)
  2. Right-click the java process (in this case JCP) and choose properties
  3. Copy the start command in full and note the start path which should be the /bin directory for the automation engine in most cases
  4. Open the windows command line as an administrator
  5. Navigate to the /bin directory using the cd command
  6. Pasted in the start command from step 3 above and hit enter:
    [Full path to java]\java -Xmx512 -jar ucsrvjp.jar -Iucsrv.ini -svc%port% -rest

Running this throws the error:
Error occurred during initialization of VM
Too small initial heap

Environment

Release : 12.3

Component : AUTOMATION ENGINE

Cause

1) The error "Too small initial heap" is caused because a size identifier is missing from the -Xmx[number] parameter.

For example, in the command below:
[Full path to java]\java -Xmx512 -jar ucsrvjp.jar -Iucsrv.ini -svc%port% -rest

a "m" is missing after the -Xmx512, so it is trying to allocate 512 bytes to memory rather than 512 MB. 

2) wrong ownership of files or folders

Resolution

1) Update the command to include the size identifier:

[Full path to java]\java -Xmx512m -jar ucsrvjp.jar -Iucsrv.ini -svc%port% -rest

Please check the documentation for recommended heap size as 512m is often too small an amount.

2) Check ownership of the files and folders related to JCP processes.

e.g.: ../AE/bin/configuration/  folder where file or folders can be owned by a root user even if a different user is used to start the JCP process