What is Garbage Collection?
Garbage Collection is basically a process where Java goes through the heap memory and determines which Java objects are currently in use from the ones that are not. The objects not being used anymore are then “collected” by the Garbage Collector and deleted.
Updates to Garbage Collection
There have been upgrades to Garbage Collection throughout the years with newer iterations of Java. This has helped make garbage collection more efficient while some older tools have been deprecated and removed. One such major tool used by Java 11 which is not present in the newer editions of Java including Java 17 is the The Concurrent Mark Sweep Collector (CMS).
You may ask, “Why is Java 17 mentioned here?” The reason is ever since the release of Ignition version 8.1.33, Java 11 has been replaced by Java 17 as the bundled Java that comes with Ignition.
The Issue: Connection to Ignition
Since the Ignition service has always been configured to make use of CMS collector prior to 8.1.33 and the subsequent upgrade to Java 17, there have been issues where the service has issues starting the JVM. Looking into the wrapper logs, users can see a specific log stating “Unrecognized VM option ‘UseConcMarkSweepGC’ “. The stack trace would look similar to this:
STATUS | wrapper | 2024/03/25 12:33:29 | Reloading Wrapper configuration...
STATUS | wrapper | 2024/03/25 12:33:29 | Launching a JVM...
INFO | jvm 3 | 2024/03/25 12:33:29 | Unrecognized VM option 'UseConcMarkSweepGC'
INFO | jvm 3 | 2024/03/25 12:33:29 | Error: Could not create the Java Virtual Machine.
INFO | jvm 3 | 2024/03/25 12:33:29 | Error: A fatal exception has occurred. Program will exit.
The Solution: Editing ignition.conf
In order to resolve the issue, the steps below can be followed:
- Make sure the Ignition service has been stopped.
- Navigate to the Ignition install directory on the system where the Gateway is hosted.
- Open a text editor as an Administrator which can be Notepad/Notepad++.
- Open the “ignition.conf” file in this text editor which is generally located at this default install location “C:\Program Files\Inductive Automation\Ignition\data”.
- Locate the “UseConcMarkSweep” variable and comment it out. It should generally look like this:
wrapper.java.additional.3=-XX:+UseConcMarkSweepGC
- Save the “ignition.conf” file.
- Start the Ignition service.
- This should successfully start the service and the Gateway.
Hopefully this has provided enough information to resolve the issue if it ever arises for you!
Resources
https://learn.microsoft.com/en-us/java/openjdk/transition-from-java-8-to-java-11
https://www.oracle.com/webfolder/technetwork/tutorials/obe/java/gc01/index.html
Comments
0 comments
Article is closed for comments.