Skip to content

Init scripts reports "OK" when Elasticsearch fails to start from bad YAML #19297

@martinb3

Description

@martinb3

Hello! The Chef cookbook for Elasticsearch has received a bug report regarding the packaging of ES, specifically the init scripts and status reporting. Here's the actual report: sous-chefs/elasticsearch#483

In short, the user is seeing the init script for Ubuntu 14.04 report "OK" when starting Elasticsearch, even though parsing of the YAML configuration file has failed. Perhaps Elasticsearch needs a 'configtest' akin to the way Apache and Nginx have implemented it, or perhaps the init script just needs improvement to catch when Elasticsearch has exited or failed to start.

Elasticsearch version: 2.3.3
JVM version: 1.8.0_91
OS version: ubuntu 14.04

Steps to reproduce:

  1. Add http.cors.allow-origin: * to elasticsearch.yml
  2. Attempt to start the service

Provide logs (if relevant):
The user reporting the issue found this in his logs:

Exception in thread "main" SettingsException[Failed to load settings from [elasticsearch.yml]]; nested: ScannerException[while scanning an alias
 in 'reader', line 41, column 25:
    http.cors.allow-origin: *
                            ^
expected alphabetic or numeric character, but found but found

 in 'reader', line 41, column 26:
    http.cors.allow-origin: *
                             ^
];
Likely root cause: while scanning an alias
 in 'reader', line 41, column 25:
    http.cors.allow-origin: *
                            ^

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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions