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

后端 未结 6 1858
谎友^
谎友^ 2021-01-31 08:37

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         


        
相关标签:
6条回答
  • 2021-01-31 08:52

    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"

    0 讨论(0)
  • 2021-01-31 08:54

    I solved this by editing my Environment Variables - System variables - variable named CLASSPATH. The variable contained

    ;C:\Program Files (x86)\Common Files\EMC\ExJNIAPIGateway.jar

    I quoted this

    ;"C:\Program Files (x86)\Common Files\EMC\ExJNIAPIGateway.jar"

    Everything ran smoothly afterwards. I don't really know what corporate software that jar file relates to, but I'm not bothered if it stops working on my PC.

    0 讨论(0)
  • 2021-01-31 08:56

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

    type this with your version of jdk above and retry running the bat file

    0 讨论(0)
  • 2021-01-31 08:57

    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
    ......
    
    0 讨论(0)
  • 2021-01-31 09:08

    Remove in path variable like C:\Program Files (x86)\Common Files\Oracle\Java\javapath and go for it.

    https://discuss.elastic.co/t/cannot-start-elasticsearch/129779/10

    0 讨论(0)
  • 2021-01-31 09:08

    Set the java home it works. No need to edit elasticsearch.bat file Refer the image

    0 讨论(0)
提交回复
热议问题