I just installed elasticsearch and logstash on a Windows 10 (Java 1.8). The problem occourses when i try to run elasticsearch from terminal with: bin\elasticsearch.bat
it returns "\Common not expected".
i was following the official tutorial "getting started with elasticsearch" and I managed to install the 'x-pack' plugin but i can't run elasticsearch.
Does anyone have any ideas?
We started having the same issue sometime in the last few releases of the JRE. The root cause seems to be the elasticsearch.bat files not handling spaces in paths when executing the java.exe to set the JVM options. I am trying to find a fix for the .bat file, but not having much luck. Another developer on our team said he added the java.exe location to his PATH environment variable, as a work around.
It turns out the root cause is actually related to how the elasticsearch.bat tries to use FOR to set the options and that command not handling parenthesis in the command. The 32-bit java.exe path, with (x86) in the path, is set first. The elasticsearch-env.bat will use the first resolved PATH for java.exe and the calling elasticsearch.bat FOR does not handle the mentioned parenthesis in that path. The two workarounds we have found are to re-order your PATH environment variable so that the x64 bit version comes first or set JAVA_HOME to the JRE folder where the bin folder exists e.g. C:\Program Files\Java\jre1.8.0_171
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.