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

NPE while restarting ES in docker #114818

Closed
shushu992 opened this issue Oct 15, 2024 · 2 comments · Fixed by #115640
Closed

NPE while restarting ES in docker #114818

shushu992 opened this issue Oct 15, 2024 · 2 comments · Fixed by #115640
Labels
>bug :Core/Infra/CLI CLI utilities, scripts, and infrastructure Team:Core/Infra Meta label for core/infra team

Comments

@shushu992
Copy link

Elasticsearch Version

Version: 8.15.2, Build: docker/98adf7bf6bb69b66ab95b761c9e5aadb0bb059a3/2024-09-19T10:06:03.564235954Z, JVM: 22.0.1

Installed Plugins

analysis-icu

Java Version

bundled

OS Version

Linux vm-debian 6.1.0-26-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.112-1 (2024-09-30) x86_64 GNU/Linux

Problem Description

I am running an ES in docker with plugins installed by elasticsearch-plugins.yml.
The first run was working well.
When I restart the container, it'll throw a NullPointerException and stop.

Steps to Reproduce

  1. Prepare elasticsearch-plugins.yml
plugins:
  - id: analysis-icu
  1. Create a container
docker create docker.elastic.co/elasticsearch/elasticsearch:8.15.2
  1. Copy configuration
docker cp elasticsearch-plugins.yml xxx:/usr/share/elasticsearch/config/elasticsearch-plugins.yml
  1. Run initially (It's working properly)
docker start xxx
  1. Restart (It's throwing NPE)
docker restart xxx

Logs (if relevant)

java.lang.NullPointerException
	at java.base/java.util.Objects.requireNonNull(Objects.java:220)
	at java.base/java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Collectors.java:180)
	at java.base/java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1709)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:556)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:546)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:265)
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:702)
	at org.elasticsearch.plugins.cli.SyncPluginsAction.lambda$getPluginsToUpgrade$2(SyncPluginsAction.java:210)
	at java.base/java.util.Optional.map(Optional.java:260)
	at org.elasticsearch.plugins.cli.SyncPluginsAction.getPluginsToUpgrade(SyncPluginsAction.java:209)
	at org.elasticsearch.plugins.cli.SyncPluginsAction.getPluginChanges(SyncPluginsAction.java:133)
	at org.elasticsearch.plugins.cli.SyncPluginsAction.execute(SyncPluginsAction.java:101)
	at org.elasticsearch.plugins.cli.SyncPluginsCliProvider$1.execute(SyncPluginsCliProvider.java:49)
	at org.elasticsearch.server.cli.ServerCli.syncPlugins(ServerCli.java:206)
	at org.elasticsearch.server.cli.ServerCli.execute(ServerCli.java:98)
	at org.elasticsearch.common.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:54)
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:94)
	at org.elasticsearch.cli.Command.main(Command.java:51)
	at org.elasticsearch.launcher.CliToolLauncher.main(CliToolLauncher.java:64)
@shushu992 shushu992 added >bug needs:triage Requires assignment of a team area label labels Oct 15, 2024
@gwbrown gwbrown added :Core/Infra/CLI CLI utilities, scripts, and infrastructure and removed needs:triage Requires assignment of a team area label labels Oct 15, 2024
@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine elasticsearchmachine added the Team:Core/Infra Meta label for core/infra team label Oct 15, 2024
@ldematte
Copy link
Contributor

I have investigated this a little bit. It is reproducible.
I think it can be a simple fix, but I'll have an expert opinion to see if it's OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Core/Infra/CLI CLI utilities, scripts, and infrastructure Team:Core/Infra Meta label for core/infra team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants