Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Elastic Search startup error - "\Common was unexpected at this time."

I have downloaded and extracted elasticsearch and when I run the batch file "elasticsearch.bat' I am getting the following error.

"\Common was unexpected at this time." 

Solved:

By editing line 46 of the 'bat' file

'%JAVA%' ==> '!JAVA!'

like image 866
gd vigneshwar Avatar asked Jul 02 '18 07:07

gd vigneshwar


2 Answers

I also encountered the same issue while running the batch file "elasticsearch.bat" in windows 10. I set JAVA_HOME using below command and it worked for me.

set "JAVA_HOME=C:\Program Files\Java\your_jdk_version"

like image 190
Shailesh Vikram Singh Avatar answered Sep 27 '22 17:09

Shailesh Vikram Singh


I placed SET "JAVA_HOME=C:\Program Files\Java\jdk1.8.0_191" just under SET params='%*' inside "bin\elasticsearch.bat" and that made it work

@echo off  setlocal enabledelayedexpansion setlocal enableextensions  SET params='%*' SET "JAVA_HOME=C:\Program Files\Java\jdk1.8.0_191"  :loop ...... 
like image 30
Joshua Waurich Avatar answered Sep 27 '22 16:09

Joshua Waurich