Skip to content

windows elasticsearch.bat file has problems with certains paths #30606

@Dobatymo

Description

@Dobatymo

Bug report:

Elasticsearch version: 6.2.4
Plugins installed: None
JVM version: 1.8.0_171
OS version: Windows 10 (1511)

Description of the problem including expected versus actual behavior:

I cannot start elastic search using elasticsearch.bat.
The error message is: \Common was unexpected at this time.

Fix

%JAVA% is assigned C:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exe in elasticsearch-env.bat.
This breaks the last for loop in elasticsearch.bat. This can be fixed be changing it to

for /F "usebackq" %%a in (`CALL %JAVA% -cp "!ES_CLASSPATH!" "org.elasticsearch.tools.launchers.JvmOptionsParser" "!ES_JVM_OPTIONS!" ^|^| echo jvm_options_parser_failed`) do set JVM_OPTIONS=%%a

See also https://stackoverflow.com/a/30139757/

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Delivery/PackagingRPM and deb packaging, tar and zip archives, shell and batch scripts>bugTeam:DeliveryMeta label for Delivery team

    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