Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ES Won't Start on Win x64 Java SE 8 u 171/2

I have Win 10 x64. I updated to Java 8 Update 171. Attempting to run ES up with this command line

cd bin

elasticsearch.bat -Ecluster.name=ABTest_Cluster_00 -Enode.name=ABTest_Node_00

resulted in failure to start with this rather cryptic error

Common was unexpected at this time

I upgraded to 172 and it was the same. (Disclaimer: It might have been "not expected" rather than "unexpected" but I'm not re-installing 172 to check it and then downgrading again.)

I had a look in jvm.options and the only place I could find "common" was in a comment

# turn off a JDK optimization that throws away stack traces for common
# exceptions because stack traces are important for debugging
-XX:-OmitStackTraceInFastThrow

Downgrading to je 8 U 162 fixed the issue and all was well. My local DynamoDB ran up OK under the latest Java. Is this an issue with how I'm starting ES (don't think so - it's been working for ages)? Is an issue with ES or Java? Is there a work around that anyone knows of as I'd rather run the latest Java.

like image 885
Adam Benson Avatar asked Apr 25 '18 10:04

Adam Benson


2 Answers

For me helped to change in elasticsearch.bat from %JAVA% to !JAVA! in line 47

like image 112
Adrian Stanisławski Avatar answered Oct 20 '22 11:10

Adrian Stanisławski


With elastic 6.6.2

  • change line 46 of elasticsearch.bat - from %JAVA% to !JAVA!
  • change line 60 of elasticsearch-env.bat - from %JAVA% to !JAVA!
like image 45
Pavel Bazika Avatar answered Oct 20 '22 09:10

Pavel Bazika