Errors Launching the VM
These types of errors are reported by the Service Wrapper into the wrapper.log files. When reading the files, you will see something like:
STATUS | wrapper | 2023/08/10 08:49:32 | Launching a JVM...
INFO | jvm 1 | 2023/08/10 08:49:32 | Error occurred during initialization of VM
or
INFO | jvm 1 | 2024/03/25 12:59:16 | Error: Could not create the Java Virtual Machine.
.. followed by additional messages.
The messages that follow can provide a crucial clue as to what is going wrong. The following are some messages that may occur. Some situations may result in multiple of the following messages.
Initial heap size set to a larger value than the maximum heap size
INFO | jvm 1 | 2023/06/06 10:39:24 | Initial heap size set to a larger value than the maximum heap size
INFO | jvm 1 | 2023/06/06 10:39:24 | Picked up JAVA_OPTIONS: -Xmx512M
ERROR | wrapper | 2023/06/06 10:39:24 | JVM exited while loading the application.
It is possible to set an Environment Variable in Windows, called "_JAVA_OPTIONS", that will be applied to each Java application that is launched. This can have a significant effect on Ignition, as it will override the values configured in ignition.conf.
If this option is present, it should be removed, and any applications that use it should be modified to use other mechanisms, such as passing the desired parameters through the command line.
You can check for this Environment Variable in Windows, by doing the following (Windows 10/11):
- Click on Start, Go to Settings / About.
- Select "Advanced system settings"
- Select "Environment Variables..."
- Look for the entry under "System Variables"
You can check for this Environment Variable in Linux, by doing the following:
-
Opened a command prompt as admin and performed the following command:
echo %_JAVA_OPTIONS% - If this returns the value
-Xmx512M, navigate into 'Environment Variables' application and locate_JAVA_OPTIONSunder 'System Variables' - Delete the Java Variable and Restart.
Could not reserve enough space for {numberValue} object heap
INFO | jvm 1 | 2018/06/01 15:34:37 | Could not reserve enough space for 1048576KB object heap
ERROR | wrapper | 2018/06/01 15:34:37 | JVM exited while loading the application.
FATAL | wrapper | 2018/06/01 15:34:59 | There were 5 failed launches in a row, each lasting less than 300 seconds. Giving up.
FATAL | wrapper | 2018/06/01 15:34:59 | There may be a configuration problem: please check the logs.
STATUS | wrapper | 2018/06/01 15:34:59 | <-- Wrapper Stopped
This error states that the Java version being used will not accept the amount of memory being allocated to it under Java Additional Parameters. Such a scenario can occur if you are attempting to use a 32-bit version of Java instead of 64-bit, since only 32-bit versions have an upper limit with heap memory allocations. To confirm this is the case, you will need to check the ignition.conf.
By default, the ignition.conf file's first two configurable arguments under Java Wrapper Properties are:
set.JAVA_HOME=lib/runtime/jre-win
wrapper.java.command=%JAVA_HOME%/bin/java
These two arguments ensure that the default embedded Java is configured to run the Ignition Gateway (for 8.0 and higher) on your machine. If anything other than the two argument inputs are shown above, you are most likely pointing your Ignition Gateway service to the wrong version of Java and must change it back to either this default configuration or the file path of the manually installed Java version you wish to use.
Unrecognized VM option 'UseConcMarkSweepGC'
STATUS | wrapper | 2024/03/25 12:59:16 | Launching a JVM...
INFO | jvm 1 | 2024/03/25 12:59:16 | Unrecognized VM option 'UseConcMarkSweepGC'
INFO | jvm 1 | 2024/03/25 12:59:16 | Error: Could not create the Java Virtual Machine.
INFO | jvm 1 | 2024/03/25 12:59:16 | Error: A fatal exception has occurred. Program will exit.
ERROR | wrapper | 2024/03/25 12:59:16 | JVM exited while loading the application
Since Java 9, the garbage collector Concurrent Mark Sweep (CMS) was deprecated in favor of the Generation First Garbage Collector (G1GC) and then later deleted sometime in the next few Java versions. Ignition version 8.1.33 updated the embedded Java version to Java 11 making CMS unrecognizable.
If you are receiving this error, you will need to navigate to the ignition.conf file's Java Additional Parameters sections and remove the following lines:
wrapper.java.additional.1=-XX:+UseConcMarkSweepGC
wrapper.java.additional.2=-XX:+CMSClassUnloadingEnabled
Once that is saved, try starting the Ignition Gateway again.
Comments
0 comments
Please sign in to leave a comment.