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 in AsyncSearch with unhealthy/missing replica #66862

Closed
slider opened this issue Dec 29, 2020 · 2 comments
Closed

NPE in AsyncSearch with unhealthy/missing replica #66862

slider opened this issue Dec 29, 2020 · 2 comments
Labels
>bug needs:triage Requires assignment of a team area label :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team

Comments

@slider
Copy link

slider commented Dec 29, 2020

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

Plugins installed: [None]

JVM version (java -version): -

OS version (uname -a if on a Unix-like system): -

Description of the problem including expected versus actual behavior:

After an index became unhealthy due to having only one replica and the corresponding node leaving, we were seeing the following NPE in the logs with a Failed to execute progress listener on query failure exception.

Provide logs (if relevant):

[SearchShard{clusterAlias='null', shardId=[XXXXXX][2]}] Failed to execute progress listener on query failure
java.lang.NullPointerException: Cannot invoke "org.elasticsearch.search.SearchShardTarget.getNodeId()" because "shardTarget" is null
	at org.elasticsearch.xpack.search.AsyncSearchTask$Listener.onQueryFailure(AsyncSearchTask.java:367) ~[?:?]
	at org.elasticsearch.action.search.SearchProgressListener.notifyQueryFailure(SearchProgressListener.java:131) [elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.action.search.SearchQueryThenFetchAsyncAction.onShardGroupFailure(SearchQueryThenFetchAsyncAction.java:88) [elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.action.search.AbstractSearchAsyncAction.onShardFailure(AbstractSearchAsyncAction.java:396) [elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.action.search.AbstractSearchAsyncAction.lambda$performPhaseOnShard$0(AbstractSearchAsyncAction.java:236) [elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.action.search.AbstractSearchAsyncAction$2.doRun(AbstractSearchAsyncAction.java:303) [elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:44) [elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:737) [elasticsearch-7.10.1.jar:7.10.1]
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-7.10.1.jar:7.10.1]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) [?:?]
	at java.lang.Thread.run(Thread.java:832) [?:?]
@slider slider added >bug needs:triage Requires assignment of a team area label labels Dec 29, 2020
@henningandersen henningandersen added the :Search/Search Search-related issues that do not fall into other categories label Dec 29, 2020
@elasticmachine elasticmachine added the Team:Search Meta label for search team label Dec 29, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

@jimczi
Copy link
Contributor

jimczi commented Jan 4, 2021

This bug is already fixed by #64337 so I am closing the issue.
Thanks for reporting @slider.

@jimczi jimczi closed this as completed Jan 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug needs:triage Requires assignment of a team area label :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team
Projects
None yet
Development

No branches or pull requests

4 participants