Node stats null_pointer_exception error

I am trying to gen nodes stat, because I could not see any of them in Cerebro statistics. I receive this error.

curl -s -X GET "localhost:9201/_cat/nodes?v" | jq .
{
  "error": {
    "root_cause": [
      {
        "type": "null_pointer_exception",
        "reason": null
      }
    ],
    "type": "null_pointer_exception",
    "reason": null
  },
  "status": 500
}

What could cause this problem and how to solve it? My cluster is in green state at the moment.

I am usingElasticsearch v6.2.3.

I've seen this very recently. In that case, it was a partially-failed master, but it's possible that any partially-failed node could cause _cat/nodes to error in this way. The failure can't be complete, otherwise the node would simply be skipped. It has to be a partial failure which leaves the node running but unable to properly return a result to the methods triggered by _cat/nodes.
I suggest taking a support diagnostic via https://github.com/elastic/support-diagnostics and then looking at the "nodes.json" file in the output. That's how I discovered which node was at fault.

1 Like

@nerophon Thank you for your reply.

I find out that one of my data noda registered IO error on disk mounted in /var/lib/elasticsearch. After replacing the disk, everythink start working.

Thank you for advice to use support-diagnostic, I will try it.

No problem. Of course now that you found that one node had a disk problem, you probably don't need to run a diagnostic. If that node is fixed, _cat/nodes should work again.

Yes, when I removed the disk, it starts working.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.