Windows Install Newbie- Installing Elasticsearch using Zip


(Luke) #1

My issue before after extracting was that I kept getting the "\Common was unexpected at this time" in the cmd prompt. I was able to get this to work using the following fix.

\Common was unexpected at this time

I've attached what my environment variable looks like for Java since I set it in Windows for anyone having a similar issue.

PrtScr%20capture

After this I ran the ElasticSearch .bat file. Resulting in some content being displayed, but unfortunately I cannot successfully curl the localhost:9200 port. This is a dump of the current logs. I have removed my name from the file and replaced them with [Redacted]. I actually ran the bat file a few times you can see from the logs repeating, but I still cannot curl the localhost port.

Here's a pastebin with the logs: Paste Bin for Windows Error Logs

Version of Java being used is jre1.8.0_191


(Russ Cam) #2

It looks like the issue now is related to attempting to run the Machine Learning features on 32 bit Windows, looking at the log file; Machine Learning is only available on 64 bit OS, so you should edit the elasticsearch.yml file in the config directory to disable it

xpack.ml.enabled: false

Then try starting Elasticsearch again with the bat file from the command line.


(Luke) #3

Thanks for the assist @forloop
I am running a 64 bit OS currently, but have I grabbed the wrong installer by chance?


(Russ Cam) #4

It may be that you have a 32 bit version of Java installed. If you run the following from the command line

java --version

What does it return?


(Luke) #5

I see what you are getting at @forloop

I did in fact have the latest Java8v191 32-bit client installed. I removed this and now have no variations of Java. I then installed the Java8v191 64-bit JRE and the 64-bit JDK installations.

From here, I updated my Enviormental Path for %JAVA_HOME% to point to the new SDK installation C:\Program Files\Java\jdk1.8.0_191. Windows being Windows, still showed the old environmental path until I rebooted my machine. Now when doing an echo of %JAVA_HOME% I get the correct path.

Expecting this to work, I now ran the elasticsearch.bat file and now I have the following:

F:\ELK\elasticsearch-6.4.2\bin>elasticsearch
'""C:\Program Files\Java\jdk1.8.0_191\\bin\java.exe" -cp "F:\ELK\elasticsearch-6.4.2\lib\*" 
"org.elasticsearch.tools.launchers.JvmOptionsParser" "F:\ELK\elasticsearch-6.4.2\config\jvm.options" 
|| echo jvm_options_parser_failed"' is not recognized as an internal or external command,
operable program or batch file.
Error: Could not find or load main class 
${ES_TMPDIR}=C:\Users\[REDACTED]\AppData\Local\Temp\elasticsearchES_JAVA_OPTS

Any thoughts on how to proceed? It seems from other threads such as this one suggest that this is due to CLASSPATH, but I am unsure how that works out.


(Russ Cam) #6

Looks like the environment variable may end in \ (double \\ before bin)? I'm not sure if this is the cause of the error, but if the environment variable does end in \, it may be worth removing it and trying again first.


(Luke) #7
F:\ELK\elasticsearch-6.4.2\bin>echo %JAVA_HOME%
C:\Program Files\Java\jdk1.8.0_191

Just ran this command for the variable and it returned this, and I didn't see any sign of a double //

And just for giggles, I ran the command again:

'""C:\Program Files\Java\jdk1.8.0_191\bin\java.exe" -cp "F:\ELK\elasticsearch-6.4.2\lib\*" 
"org.elasticsearch.tools.launchers.JvmOptionsParser" "F:\ELK\elasticsearch-6.4.2\config\jvm.options" 
|| echo jvm_options_parser_failed"' is not recognized as an internal or external command,
operable program or batch file.
Error: Could not find or load main class 
${ES_TMPDIR}=C:\Users\[REDACTED]\AppData\Local\Temp\elasticsearchES_JAVA_OPTS

(Russ Cam) #8

What does

java --version

return?


(Luke) #9

@forloop I'm on mobile so I can't redact this one or edit it well, but here is what is delivered.


(system) #10

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