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

_nodes/stats returns failed_node_exception if closed indices exist #91259

Closed
marevol opened this issue Nov 2, 2022 · 3 comments · Fixed by #91334
Closed

_nodes/stats returns failed_node_exception if closed indices exist #91259

marevol opened this issue Nov 2, 2022 · 3 comments · Fixed by #91334
Labels
>bug :Data Management/Stats Statistics tracking and retrieval APIs Team:Data Management Meta label for data/management team

Comments

@marevol
Copy link
Contributor

marevol commented Nov 2, 2022

Elasticsearch Version

8.5.0

Installed Plugins

No response

Java Version

bundled

OS Version

Linux 9b4c50a443c1 5.15.0-52-generic #58-Ubuntu SMP Thu Oct 13 08:03:55 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Problem Description

In 8.5, _nodes/stats returns a failure message if the node has closed indices. In previous versions, it works.
Please see steps to reproduce.

Steps to Reproduce

$ curl -XPUT http://localhost:9200/test_index
$ curl http://localhost:9200/_nodes/stats  # <- it works
$ curl -XPOST http://localhost:9200/test_index/_close
$ curl http://localhost:9200/_nodes/stats
{
  "_nodes": {
    "total": 1,
    "successful": 0,
    "failed": 1,
    "failures": [
      {
        "type": "failed_node_exception",
        "reason": "Failed node [...]",
        "node_id": "...",
        "caused_by": {
          "type": "null_pointer_exception",
          "reason": "Cannot invoke \"org.elasticsearch.index.mapper.MapperService.mappingLookup()\" because the return value of \"org.elasticsearch.index.IndexService.mapperService()\" is null"
        }
      }
    ]
  },
  "cluster_name": "...",
  "nodes": {}
}

Logs (if relevant)

No response

@marevol marevol added >bug needs:triage Requires assignment of a team area label labels Nov 2, 2022
@gwbrown gwbrown added :Data Management/Stats Statistics tracking and retrieval APIs and removed needs:triage Requires assignment of a team area label labels Nov 4, 2022
@elasticsearchmachine elasticsearchmachine added the Team:Data Management Meta label for data/management team label Nov 4, 2022
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@gwbrown
Copy link
Contributor

gwbrown commented Nov 4, 2022

I reproduced this one on an 8.5.0 Cloud cluster using the steps in the issue, looks legit.

@redbaron4
Copy link

redbaron4 commented Nov 17, 2022

+1 I ran into this after upgrading the infrastructure to 8.5 from 8.4.1

I have observed that the API works correctly for few requests after a node restarts but then starts failing with the above message.

Master node API is not affected (probably because it has no closed indices). There are no logs in server.json file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Data Management/Stats Statistics tracking and retrieval APIs Team:Data Management Meta label for data/management team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants