App service is not starting until remove the JVM parameters

book

Article ID: 144003

calendar_today

Updated On:

Products

CLARITY PPM FOR ITG Clarity PPM On Premise

Issue/Introduction

After upgrade to 15.5.1, 15.6, 15.6.1, 15.7 or 15.7.1 we see that few Java parameters are deprecated. Especially if we use extensive GC logging using options such as

-loggc, -XX:+PrintGCTimeStamps, -XX:+PrintGC(-verbose:GC), -XX:+PrintGCDetails, -XX:+PrintGCDateStamps.

This also causes the application to fail starting up with below errors.

 

YYYY/MM/DD 08:26:28.822 | Launching a JVM...

YYYY/MM/DD 08:26:28.932 | [0.003s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:Path instead.

YYYY/MM/DD 08:26:28.932 | Unrecognized VM option 'PrintGCTimeStamps'

YYYY/MM/DD 08:26:28.932 | Error: Could not create the Java Virtual Machine.

YYYY/MM/DD 08:26:28.947 | Error: A fatal exception has occurred. Program will exit.

YYYY/MM/DD 08:26:28.947 | JVM exited while loading the application.

YYYY/MM/DD 08:26:33.976 | Launching a JVM...

YYYY/MM/DD 08:26:34.086 | [0.003s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:Path instead.

YYYY/MM/DD 08:26:34.086 | Unrecognized VM option 'PrintGCTimeStamps'

YYYY/MM/DD 08:26:34.086 | Error: Could not create the Java Virtual Machine.

YYYY/MM/DD 08:26:34.101 | Error: A fatal exception has occurred. Program will exit.

YYYY/MM/DD 08:26:34.101 | JVM exited while loading the application.

YYYY/MM/DD 08:26:39.159 | Launching a JVM...

YYYY/MM/DD 08:26:39.269 | [0.003s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:Path instead.

YYYY/MM/DD 08:26:39.269 | Unrecognized VM option 'PrintGCTimeStamps'

YYYY/MM/DD 08:26:39.269 | Error: Could not create the Java Virtual Machine.

YYYY/MM/DD 08:26:39.289 | Error: A fatal exception has occurred. Program will exit.

YYYY/MM/DD 08:26:39.291 | JVM exited while loading the application.

 

 

Cause

This is Caused by deprecated Java Parameters in Java 11.

Environment

Release : 15.5.1,15.6,15.6.1,15.7,15.7.1

Component : CA PPM INTEGRATIONS & INSTALLATIONS

Resolution

With Java's new Unified logging we don't need additional parameters to do GC logging.

We can achieve it using the below single line parameter.

 -Xlog:gc*=debug:file=<Path to File>:time,uptime,level,hostname,pid,tid:filecount=20,filesize=5M

Additional Information

More Information can be found at the below Sites.

https://docs.oracle.com/en/java/javase/11/tools/java.html#GUID-BE93ABDC-999C-4CB5-A88B-1994AAAC74D5

https://stackoverflow.com/questions/54144713/is-there-a-replacement-for-the-garbage-collection-jvm-args-in-java-11

https://blog.jayan.kandathil.ca/gc_logging_in_java11.html