Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to start solr with Java 9

I am unable to start solr on Java 9, getting following error.

[shahid@host172 logs]$ tail -20 solr-8983-console.log 
Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Java HotSpot(TM) 64-Bit Server VM warning: Option UseParNewGC was deprecated in version 9.0 and will likely be removed in a future release.
Unrecognized VM option 'PrintHeapAtGC'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
like image 885
Zahid Shah Avatar asked Jul 03 '17 06:07

Zahid Shah


1 Answers

This is a consequence of the switch to the Unified Logging system for logging of GC related messages. There are quite a few -XX options that have disappeared, more detail can be found here:

https://bugs.openjdk.java.net/browse/JDK-8145092

You will need to remove the -XX:+PrintHeapAtGC flag. There is a bug on the Solr JIRA for this:

https://issues.apache.org/jira/browse/SOLR-10184

like image 140
Speakjava Avatar answered Sep 23 '22 10:09

Speakjava