Skip to content

Cannot install elasticsearch service on Windows 2012 R2 server #20899

@mike-mosher

Description

@mike-mosher

Elasticsearch version: 5.0.0-rc1

Plugins installed: none

JVM version: jdk1.8.0_101

OS version: Windows 2012 R2 64-bit

Description of the problem including expected versus actual behavior:
Cannot install the service.

  • I have the following environment variables set:
    • JAVA_HOME: C:\Program Files\Java\jdk1.8.0_101
    • ES_HEAP_SIZE: 8g
  • I have verified that jvm.options have the following lines commented out:
## -Xms8g
## -Xmx8g

I run the following: .\elasticsearch-service.bat install elasticsearch-5.0.0-rc1

I get the following output:

Error: encountered environment variables that are no longer supported
Use jvm.options or ES_JAVA_OPTS to configure the JVM
ES_HEAP_SIZE=8g: set -Xms8g and -Xmx8g in jvm.options or add "-Xms8g -Xmx8g" to ES_JAVA_OPTS

I delete ES_HEAP_SIZE and add ES_JAVA_OPTS: "-Xms8g and -Xmx8g" (without quotes)

I run the command again and get the following:

Installing service      :  "elasticsearch-5.0.0-rc1"
Using JAVA_HOME (64-bit):  "C:\Program Files\Java\jdk1.8.0_101"
thread stack size not set; configure via C:\elasticsearch-5.0.0-rc1\config\jvm.options or ES_JAVA_OPTS

I delete ES_JAVA_OPTS and edit jvm.options:

-Xms8g
-Xmx8g

Run again and get the following:

Installing service      :  "elasticsearch-5.0.0-rc1"
Using JAVA_HOME (64-bit):  "C:\Program Files\Java\jdk1.8.0_101"
thread stack size not set; configure via C:\elasticsearch-5.0.0-rc1\config\jvm.options or ES_JAVA_OPTS

I leave jvm.options alone and create ES_JAVA_OPTS again. Now it see duplicate settings:

Installing service      :  "elasticsearch-5.0.0-rc1"
Using JAVA_HOME (64-bit):  "C:\Program Files\Java\jdk1.8.0_101"
duplicate min heap size settings found

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions