We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug curl localhost:9200/_nodes/stats?pretty fails with following exception
curl localhost:9200/_nodes/stats?pretty
{ "error" : { "root_cause" : [ { "type" : "illegal_argument_exception", "reason" : "Field name cannot be null" } ], "type" : "illegal_argument_exception", "reason" : "Field name cannot be null", "suppressed" : [ { "type" : "illegal_state_exception", "reason" : "Failed to close the XContentBuilder", "caused_by" : { "type" : "i_o_exception", "reason" : "Unclosed object or array found" } } ] }, "status" : 400 }
To Reproduce Steps to reproduce the behavior:
Expected behavior _nodes/stats should always work fine for single node or multi node clusters
Additional context Recently cluster state stats were added #10670 which is causing this issue.
The text was updated successfully, but these errors were encountered:
Root cause : It was happening as statsName field is not being written on stream and while creating PersistedStateStats object it's not being set.
Resolution : Write statsName field on stream and read it to set it in the object.
Stack trace
[2023-10-27T15:57:11,821][INFO ][o.o.c.c.PersistedStateStats] [clusterManager2] stats name null [2023-10-27T15:57:11,821][WARN ][stderr ] [clusterManager2] java.lang.IllegalArgumentException: Field name cannot be null [2023-10-27T15:57:11,822][WARN ][stderr ] [clusterManager2] at org.opensearch.core.xcontent.XContentBuilder.ensureNotNull(XContentBuilder.java:1058) [2023-10-27T15:57:11,822][WARN ][stderr ] [clusterManager2] at org.opensearch.core.xcontent.XContentBuilder.ensureNameNotNull(XContentBuilder.java:1053) [2023-10-27T15:57:11,822][WARN ][stderr ] [clusterManager2] at org.opensearch.core.xcontent.XContentBuilder.field(XContentBuilder.java:314) [2023-10-27T15:57:11,822][WARN ][stderr ] [clusterManager2] at org.opensearch.core.xcontent.XContentBuilder.startObject(XContentBuilder.java:291) [2023-10-27T15:57:11,822][WARN ][stderr ] [clusterManager2] at org.opensearch.cluster.coordination.PersistedStateStats.toXContent(PersistedStateStats.java:76) [2023-10-27T15:57:11,822][WARN ][stderr ] [clusterManager2] at org.opensearch.cluster.service.ClusterStateStats.toXContent(ClusterStateStats.java:107) [2023-10-27T15:57:11,822][WARN ][stderr ] [clusterManager2] at org.opensearch.discovery.DiscoveryStats.toXContent(DiscoveryStats.java:93) [2023-10-27T15:57:11,823][WARN ][stderr ] [clusterManager2] at org.opensearch.action.admin.cluster.node.stats.NodeStats.toXContent(NodeStats.java:545) [2023-10-27T15:57:11,823][WARN ][stderr ] [clusterManager2] at org.opensearch.action.admin.cluster.node.stats.NodesStatsResponse.toXContent(NodesStatsResponse.java:78) [2023-10-27T15:57:11,823][WARN ][stderr ] [clusterManager2] at org.opensearch.rest.action.RestActions.nodesResponse(RestActions.java:223)
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Describe the bug
curl localhost:9200/_nodes/stats?pretty
fails with following exceptionTo Reproduce
Steps to reproduce the behavior:
Expected behavior
_nodes/stats should always work fine for single node or multi node clusters
Additional context
Recently cluster state stats were added #10670 which is causing this issue.
The text was updated successfully, but these errors were encountered: