Unable to start elasticsearch 6.2.0 in windows 10


(Bikkina Venkata Naga Uma Mahesh) #1

My java version is :
java version "1.8.0_151"
Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
Java HotSpot(TM) Client VM (build 25.151-b12, mixed mode)
and JAVA_HOME is set correctly

and when i am running the elastic search i am getting this below error

C:\Users\venkatan\MySoftwares\elasticsearch-6.2.0\bin>elasticsearch

\Java\jdk1.8.0_151\bin\java.exe" -cp "C:\Users\venkatan\MySoftwares\elasticsearch-6.2.0\lib*" "org.elasticsearch.tools.launchers.JvmOptionsParser" "C:\Users\venkatan\MySoftwares\elasticsearch-6.2.0\config\jvm.options" || echo jvm_options_parser_failed"`) was unexpected at this time.

Can anyone please help. i am stuck with this.
Quick reply would be very helpful.


#2

same issue here, with java version "1.8.0_161".
Please help!
thanks a lot


(Russ Cam) #3

Can you show exactly what the JAVA_HOME environment variable value is, using either

Command Prompt

echo %JAVA_HOME%

PowerShell

gci env:JAVA_HOME

Please copy the output exactly as is, including any surrounding quotes. For example, for me, running the PowerShell version yields

Name                           Value
----                           -----
JAVA_HOME                      C:\Program Files\Java\jdk1.8.0_162

(Krunal Kalaria) #4

hi @bikkina_mahesh,

Can you change in environment variable

variable name = JAVA_HOME
variable value = C:\Program Files\Java\jdk1.8.0_144

then restart your cluster it may be work.

Thanks & Regards,
Krunal.


#5

Hello,

Thanks for your help.
I checked my install of java jdk 1.8.0_161 and noticed that it was stored in program Files x86 folder although it was the 64 bit version - I don’t understand why since I only ran the java exe install.
But anyway I unistalled it and installed the 1.8.0_162 and now elasticsearch works perfectly.

Thanks and regards


(Russ Cam) #6

glad you got it sorted :smile: I suspect the original JAVA_HOME environment variable value may have contained surrounding quotes.


(A M) #7

HI,
if your java is installed under C:\Program Files (x86) then set the JAVA_HOME like will below

set JAVA_HOME=C:\Progra~2\Java\jre1.8.0_131

if your java is installed under C:\Program Files then set the JAVA_HOME like will below
set JAVA_HOME=C:\Progra~1\Java\jre1.8.0_131

After that try to start the elastic search, it should start then.


(Russ Cam) #8

@A_M As an alternative to using short paths, you can also set a value with spaces and parentheses by quoting the whole assignment

set "JAVA_HOME=C:\Program Files (x86)\Java\jre1.8.0_131"

You can also use setx to set it as a Machine Environment variable (the value will not be reflected in the current process though, unlike using set)

setx -m JAVA_HOME "C:\Program Files (x86)\Java\jre1.8.0_131"

or with PowerShell

[Environment]::SetEnvironmentVariable("JAVA_HOME", "C:\Program Files (x86)\Java\jre1.8.0_131", "Machine")

(Jason Tedor) #9

This is a bug, the problem is the () ruin the statement that tries to launch the JVM parser. See https://github.com/elastic/elasticsearch/pull/28753 for the explanation and the fix. This will be fixed in the next release. For now, you can workaround this by not locating Java nor Elasticsearch under a directory with () in the name.


(system) #10

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.