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

Elasticsearch in docker container crashes after restart when elasticsearch-plugins.yml is used #97702

Open
jawmn opened this issue Jul 14, 2023 · 2 comments
Labels
>bug :Core/Infra/Plugins Plugin API and infrastructure Team:Core/Infra Meta label for core/infra team

Comments

@jawmn
Copy link

jawmn commented Jul 14, 2023

Elasticsearch Version

7.17.11

Installed Plugins

repository-s3, analysis-icu

Java Version

bundled

OS Version

Linux 5.15.0-76-generic #83-Ubuntu SMP Thu Jun 15 19:16:32 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Problem Description

When desired plugins listed in file elasticsearch-plugins.yml, elasticsearch at start creates file plugins/.elasticsearch-plugins.yml.cache. Once container restarts, this file prevents elasticsearch from starting.

Steps to Reproduce

Define plugins in config/elasticsearch-plugins.yml, for example:

plugins:
  - id: analysis-icu
  - id: repository-s3

Start docker container, then restart it.

Logs (if relevant)

Exception in thread "main" java.nio.file.NotDirectoryException: /usr/share/elasticsearch/plugins/.elasticsearch-plugins.yml.cache
	at java.base/sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(UnixFileSystemProvider.java:476)
	at java.base/java.nio.file.Files.newDirectoryStream(Files.java:481)
	at java.base/java.nio.file.Files.list(Files.java:3767)
	at org.elasticsearch.tools.launchers.BootstrapJvmOptions.getPluginInfo(BootstrapJvmOptions.java:49)
	at org.elasticsearch.tools.launchers.BootstrapJvmOptions.bootstrapJvmOptions(BootstrapJvmOptions.java:34)
	at org.elasticsearch.tools.launchers.JvmOptionsParser.jvmOptions(JvmOptionsParser.java:137)
	at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:86)
@jawmn jawmn added >bug needs:triage Requires assignment of a team area label labels Jul 14, 2023
@thecoop thecoop added :Core/Infra/Plugins Plugin API and infrastructure and removed needs:triage Requires assignment of a team area label labels Jul 17, 2023
@elasticsearchmachine elasticsearchmachine added the Team:Core/Infra Meta label for core/infra team label Jul 17, 2023
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

rjernst added a commit to rjernst/elasticsearch that referenced this issue May 28, 2024
This commit guards iteration over plugin infos from mistakenly trying to
inspect the plugins cache file as a plugin.

closes elastic#97702
@rjernst
Copy link
Member

rjernst commented May 28, 2024

BootstrapJvmOptions only existed in 7.x, so the scope of this issue is limited. I opened #109116 to fix.

rjernst added a commit that referenced this issue May 29, 2024
This commit guards iteration over plugin infos from mistakenly trying to
inspect the plugins cache file as a plugin.

closes #97702
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Core/Infra/Plugins Plugin API and infrastructure Team:Core/Infra Meta label for core/infra team
Projects
None yet
Development

No branches or pull requests

4 participants