Trying to switch to G1GC but Ignition won't start with my changes

To improve performance we recently alloted our Gateway a lot more ram to work with. So I wanted to increase the Java Heap Init/Max and change our garbage collection from CMS/ParNew to G1GC. I would also like the GC to log information just in case I need to look at it later.

Here’s the current working wrapper file, the bottom commented out half is what did not work. Where did I go wrong? I tried following this post - Gateway / Java question 7.7.2

Java Additional Parameters

#Comment out PermSize/MaxPermSize since we use G1GC now
wrapper.java.additional.1=-XX:PermSize=64m
wrapper.java.additional.2=-XX:MaxPermSize=128m
wrapper.java.additional.3=-XX:+UseConcMarkSweepGC
wrapper.java.additional.4=-XX:+CMSClassUnloadingEnabled
wrapper.java.additional.5=-XX:+CMSPermGenSweepingEnabled
wrapper.java.additional.6=-Ddata.dir=data
wrapper.java.additional.7=-Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
wrapper.java.additional.8=-Xdebug
wrapper.java.additional.9=-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
#wrapper.java.additional.1=-XX:+UseG1GC
#wrapper.java.additional.2=-XX:MaxGCPauseMillis=100
#wrapper.java.additional.3=-Xloggc:/var/log/ignition/javagc-%WRAPPER_TIME_YYYMMDDHHIISS%.log
#wrapper.java.additional.4=-Ddata.dir=/var/lib/ignition/data
#wrapper.java.additional.5=-Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
#wrapper.java.additional.6=-XX:+PrintGCDetails
#wrapper.java.additional.7=-XX:+PrintGCTimeStamps
#wrapper.java.additional.8=-XX:+PrintGCDateStamps

What was the error? What version of Java are you using? Did you comment out the top half when you tried it?

Actually after reverting to the original wrapper statements and trying that again, it loaded. So then I tried the UseG1GC statements again, and it loaded this time no issue, however on my status/sys.performance page, the Garbage Collectors are still listed as ParNew,ConcurrentMarkSweep, and my max Java Heap is still 1016 not my new value.

Before the error saying to search for " NET HELPMSG 3547" for more info. But that no longer appears. The GCU loads fine, but again, the garbage collector on the status page seems to not have changed despite me changing it the .conf file. I closed and restarted the GCU. Still happening. The .conf file has definitely been saved with these parameters

wrapper.java.additional.1=-XX:+UseG1GC
wrapper.java.additional.2=-XX:MaxGCPauseMillis=100
wrapper.java.additional.3=-Xloggc:/var/log/ignition/javagc-%WRAPPER_TIME_YYYMMDDHHIISS%.log
wrapper.java.additional.4=-Ddata.dir=/var/lib/ignition/data
wrapper.java.additional.5=-Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
wrapper.java.additional.6=-XX:+PrintGCDetails
wrapper.java.additional.7=-XX:+PrintGCTimeStamps
wrapper.java.additional.8=-XX:+PrintGCDateStamps

EDIT: I am using Java 8 Update 201

Closing and opening the GCU doesn’t do anything, you’d need to restart the Ignition service to see any change.

Ok just restarted. The error when trying to start-

"The Ignition Gateway servis is starting…The Ignition Gateway service could not be started. A service specific error occured: 1.More help is available by typing NET HELPMSG 3547.

The wrapper log - STATUS | wrapper | 2019/04/16 10:51:42 | Java Service Wrapper Standard Edition 64-bit 3.5.29
STATUS | wrapper | 2019/04/16 10:51:42 | Copyright © 1999-2016 Tanuki Software, Ltd. All Rights Reserved.
STATUS | wrapper | 2019/04/16 10:51:42 | http://wrapper.tanukisoftware.com
STATUS | wrapper | 2019/04/16 10:51:42 | Licensed to Inductive Automation for Inductive Automation
STATUS | wrapper | 2019/04/16 10:51:42 |
INFO | wrapper | 2019/04/16 10:51:42 | Attempting to map the “\nas\Bay1” share to “M:”…
WARN | wrapper | 2019/04/16 10:51:43 | Unable to map “M:”. Trying to continue. (The user name or password is incorrect. (0x52e))
INFO | wrapper | 2019/04/16 10:51:43 | Attempting to map the “\file3\F” share to “Z:”…
WARN | wrapper | 2019/04/16 10:51:43 | Unable to map “Z:”. Trying to continue. (Access is denied. (0x5))
STATUS | wrapper | 2019/04/16 10:51:43 | Launching a JVM…
INFO | jvm 1 | 2019/04/16 10:51:43 | Error: Could not create the Java Virtual Machine.
INFO | jvm 1 | 2019/04/16 10:51:43 | Error: A fatal exception has occurred. Program will exit.
INFO | jvm 1 | 2019/04/16 10:51:43 | Invalid file name for use with -Xloggc: Filename can only contain the characters [A-Z][a-z][0-9]-.%[p|t] but it has been /var/log/ignition/javagc-{INVALID}.log
INFO | jvm 1 | 2019/04/16 10:51:43 | Note %p or %t can only be used once
ERROR | wrapper | 2019/04/16 10:51:43 | JVM exited while loading the application.
STATUS | wrapper | 2019/04/16 10:51:48 | Reloading Wrapper configuration…
STATUS | wrapper | 2019/04/16 10:51:48 | Launching a JVM…
INFO | jvm 2 | 2019/04/16 10:51:48 | Error: Could not create the Java Virtual Machine.
INFO | jvm 2 | 2019/04/16 10:51:48 | Error: A fatal exception has occurred. Program will exit.
INFO | jvm 2 | 2019/04/16 10:51:48 | Invalid file name for use with -Xloggc: Filename can only contain the characters [A-Z][a-z][0-9]-
.%[p|t] but it has been /var/log/ignition/javagc-{INVALID}.log
INFO | jvm 2 | 2019/04/16 10:51:48 | Note %p or %t can only be used once
ERROR | wrapper | 2019/04/16 10:51:48 | JVM exited while loading the application.
STATUS | wrapper | 2019/04/16 10:51:53 | Reloading Wrapper configuration…
STATUS | wrapper | 2019/04/16 10:51:53 | Launching a JVM…
INFO | jvm 3 | 2019/04/16 10:51:54 | Error: Could not create the Java Virtual Machine.
INFO | jvm 3 | 2019/04/16 10:51:54 | Error: A fatal exception has occurred. Program will exit.
INFO | jvm 3 | 2019/04/16 10:51:54 | Invalid file name for use with -Xloggc: Filename can only contain the characters [A-Z][a-z][0-9]-.%[p|t] but it has been /var/log/ignition/javagc-{INVALID}.log
INFO | jvm 3 | 2019/04/16 10:51:54 | Note %p or %t can only be used once
ERROR | wrapper | 2019/04/16 10:51:54 | JVM exited while loading the application.
STATUS | wrapper | 2019/04/16 10:51:58 | Reloading Wrapper configuration…
STATUS | wrapper | 2019/04/16 10:51:59 | Launching a JVM…
INFO | jvm 4 | 2019/04/16 10:51:59 | Error: Could not create the Java Virtual Machine.
INFO | jvm 4 | 2019/04/16 10:51:59 | Error: A fatal exception has occurred. Program will exit.
INFO | jvm 4 | 2019/04/16 10:51:59 | Invalid file name for use with -Xloggc: Filename can only contain the characters [A-Z][a-z][0-9]-
.%[p|t] but it has been /var/log/ignition/javagc-{INVALID}.log
INFO | jvm 4 | 2019/04/16 10:51:59 | Note %p or %t can only be used once
ERROR | wrapper | 2019/04/16 10:51:59 | JVM exited while loading the application.
STATUS | wrapper | 2019/04/16 10:52:04 | Reloading Wrapper configuration…
STATUS | wrapper | 2019/04/16 10:52:04 | Launching a JVM…
INFO | jvm 5 | 2019/04/16 10:52:04 | Error: Could not create the Java Virtual Machine.
INFO | jvm 5 | 2019/04/16 10:52:04 | Error: A fatal exception has occurred. Program will exit.
INFO | jvm 5 | 2019/04/16 10:52:04 | Invalid file name for use with -Xloggc: Filename can only contain the characters [A-Z][a-z][0-9]-_.%[p|t] but it has been /var/log/ignition/javagc-{INVALID}.log
INFO | jvm 5 | 2019/04/16 10:52:04 | Note %p or %t can only be used once
ERROR | wrapper | 2019/04/16 10:52:04 | JVM exited while loading the application.
FATAL | wrapper | 2019/04/16 10:52:04 | There were 5 failed launches in a row, each lasting less than 300 seconds. Giving up.
FATAL | wrapper | 2019/04/16 10:52:04 | There may be a configuration problem: please check the logs.
STATUS | wrapper | 2019/04/16 10:52:04 | <-- Wrapper Stopped

So I guess something is wrong with my wrapper.java.additional.3 statement?

Yes:

Invalid file name for use with -Xloggc: Filename can only contain the characters [A-Z][a-z][0-9]-.%[p|t] but it has been /var/log/ignition/javagc-{INVALID}.log

I changed wrapper.java.additional.3=-Xloggc:/var/log/ignition/javagc-%WRAPPER_TIME_YYYMMDDHHIISS%.log to
wrapper.java.additional.3=-Xloggc:/var/log/ignition/javagc-log.log

I am now getting a different erro r when starting the gateway (progress!) -

“A service specific error occured:4294967295. More help is available by typing NET HELPMESSAGE 3547.”

STATUS | wrapper | 2019/04/16 11:01:21 | Launching a JVM…
INFO | jvm 1 | 2019/04/16 11:01:22 | WrapperManager: Initializing…
INFO | jvm 1 | 2019/04/16 11:01:22 | java.io.FileNotFoundException: \var\lib\ignition\data\response (The system cannot find the path specified)
INFO | jvm 1 | 2019/04/16 11:01:22 | at java.io.RandomAccessFile.open0(Native Method)
INFO | jvm 1 | 2019/04/16 11:01:22 | at java.io.RandomAccessFile.open(Unknown Source)
INFO | jvm 1 | 2019/04/16 11:01:22 | at java.io.RandomAccessFile.(Unknown Source)
INFO | jvm 1 | 2019/04/16 11:01:22 | at java.io.RandomAccessFile.(Unknown Source)
INFO | jvm 1 | 2019/04/16 11:01:22 | at com.inductiveautomation.catapult.CatapultRequestServer.(CatapultRequestServer.java:36)
INFO | jvm 1 | 2019/04/16 11:01:22 | at com.inductiveautomation.catapult.Catapult.(Catapult.java:83)
INFO | jvm 1 | 2019/04/16 11:01:22 | at com.inductiveautomation.catapult.Catapult.main(Catapult.java:60)
INFO | jvm 1 | 2019/04/16 11:01:22 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO | jvm 1 | 2019/04/16 11:01:22 | at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
INFO | jvm 1 | 2019/04/16 11:01:22 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
INFO | jvm 1 | 2019/04/16 11:01:22 | at java.lang.reflect.Method.invoke(Unknown Source)
INFO | jvm 1 | 2019/04/16 11:01:22 | at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:325)
INFO | jvm 1 | 2019/04/16 11:01:22 | at java.lang.Thread.run(Unknown Source)
INFO | jvm 1 | 2019/04/16 11:01:24 | Java HotSpot™ 64-Bit Server VM warning: Cannot open file /var/log/ignition/javagc-log.log due to No such file or directory
INFO | jvm 1 | 2019/04/16 11:01:24 |
STATUS | wrapper | 2019/04/16 11:01:24 | <-- Wrapper Stopped

I am confused why it’s trying to open the file, I thought wrapper.java.additional.3 was setting the save path? What is happening here?

Are you running on Windows but trying to configure using paths for a Linux system?

We are using windows, I was unaware that I telling paths for a Linux system. Pardon my ignorance I am not very familiar with the part of Ignition at all. How would I change this to work on a windows system?

Change those paths to point somewhere valid on your windows system.

Instead of /var/log/ignition use C:\path\goes\here. Maybe point it to the Ignition log directory?

Ok, and I should do the same for wrapper.java.additional.4,=-Ddata.dir=C:\Program Files\Inductive Automation\Ignition\logs presumably

Yes, change that one too. Or don’t modify that parameter at all and use the default value, which is likely correct:

wrapper.java.additional.4=-Ddata.dir=data

I had to add quotes. The final product -

wrapper.java.additional.3=-Xloggc:"C:\Program Files\Inductive Automation\Ignition\logs"
wrapper.java.additional.4=-Ddata.dir=data

works fine now. Thanks!

2 Likes