Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsupported setting in keystore preventing elasticsearch to start #43328

Closed
eedugon opened this issue Jun 18, 2019 · 2 comments · Fixed by #43454
Closed

Unsupported setting in keystore preventing elasticsearch to start #43328

eedugon opened this issue Jun 18, 2019 · 2 comments · Fixed by #43454
Labels
:Core/Infra/Settings Settings infrastructure and APIs

Comments

@eedugon
Copy link
Contributor

eedugon commented Jun 18, 2019

Elasticsearch version (bin/elasticsearch --version): 6.7

Plugins installed: [N/A]

JVM version (java -version): 1.8

Description of the problem including expected versus actual behavior:
A user who was trying to configure a remote xpack monitoring exporter added the setting xpack.monitoring.exporters.shared.auth.password to the keystore.

The setting, together with the rest of the exporter setting in elasticsearch.yml didn't work, as the setting is not supported for a keystore. That's clearly identified in this doc:

Only some settings are designed to be read from the keystore. See documentation for each setting to see if it is supported as part of the keystore.

However, when the user cleaned the settings from elasticsearch.yml, elasticsearch did not start with this exception:

org.elasticsearch.common.settings.SettingsException: missing exporter type for [shared] exporter 

As there wasn't any track of the exporter in the cluster settings API, neither in elasticsearch.yml file, it took some time to the user to realize that the "unsupported" setting from the keystore was causing this (elasticsearch is internally receiving the setting and hence having an exporter defined with missing mandatory settings).

Once the setting was removed from the keystore, elasticsearch started without any issue.

From the document description the expectation could be that if the setting is not supported (cannot be read from the keystore) it shouldn't affect the system, so maybe adding a note in the doc might be helpful, as I don't think this is really a bug.

The note could be:
even if a setting is not designed to be read from a keystore, if added, it will be populated to elasticsearch when starting, which might cause unexpected issues. Avoid adding unsupported settings to the keystore

@eedugon eedugon added the :Core/Infra/Settings Settings infrastructure and APIs label Jun 18, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

rjernst added a commit to rjernst/elasticsearch that referenced this issue Jun 20, 2019
This commit tweaks the docs for secure settings to ensure the user is
aware adding non secure settings to the keystore will result in
elasticsearch not starting.

fixes elastic#43328
@rjernst
Copy link
Member

rjernst commented Jun 20, 2019

I've opened #43454 to clarify in the docs a bit, to make it a little more clear what behavior to expect.

@rjernst rjernst added discuss and removed discuss labels Jun 20, 2019
rjernst added a commit that referenced this issue Jun 20, 2019
This commit tweaks the docs for secure settings to ensure the user is
aware adding non secure settings to the keystore will result in
elasticsearch not starting.

fixes #43328

Co-Authored-By: James Rodewig <[email protected]>
rjernst added a commit that referenced this issue Jun 20, 2019
This commit tweaks the docs for secure settings to ensure the user is
aware adding non secure settings to the keystore will result in
elasticsearch not starting.

fixes #43328

Co-Authored-By: James Rodewig <[email protected]>
rjernst added a commit that referenced this issue Jun 20, 2019
This commit tweaks the docs for secure settings to ensure the user is
aware adding non secure settings to the keystore will result in
elasticsearch not starting.

fixes #43328

Co-Authored-By: James Rodewig <[email protected]>
rjernst added a commit that referenced this issue Jun 20, 2019
This commit tweaks the docs for secure settings to ensure the user is
aware adding non secure settings to the keystore will result in
elasticsearch not starting.

fixes #43328

Co-Authored-By: James Rodewig <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Settings Settings infrastructure and APIs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants