Elasticsearch Reporter plugin error: [float] supports only finite values, but got [NaN]

Article ID:360051049971
1 minute readKnowledge base

Issue

You are using the Elasticsearch Reporter plugin with FINEST level loggers enabled, and you see the following error in your operations center logs:

2020-04-28 17:57:44.587+0000 [id=634193]        FINEST  com.cloudbees.esr.Feeder#asHttpResponse: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.lang.String` out of START_OBJECT token
 at [Source: (String)"{"took":4,"errors":true,"items":[{"index":{"_index":"metrics-20200428","_type":"report","_id":"8rHwwXEBhlV8vkH7A_j-","status":400,"error":{"type":"mapper_parsing_exception","reason":"failed to parse field [vm.memory.pools.G1-Survivor-Space.usage.value] of type [float] in document with id '8rHwwXEBhlV8vkH7A_j-'","caused_by":{"type":"illegal_argument_exception","reason":"[float] supports only finite values, but got [NaN]"}}}}]}"; line: 1, column: 139] (through reference chain: com.cloudbees.esr.es.model.BulkResponse["items"]->java.util.ArrayList[0]->com.cloudbees.esr.es.model.BulkResponse$BulkIndexResponse["error"])
com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.lang.String` out of START_OBJECT token
 at [Source: (String)"{"took":4,"errors":true,"items":[{"index":{"_index":"metrics-20200428","_type":"report","_id":"8rHwwXEBhlV8vkH7A_j-","status":400,"error":{"type":"mapper_parsing_exception","reason":"failed to parse field [vm.memory.pools.G1-Survivor-Space.usage.value] of type [float] in document with id '8rHwwXEBhlV8vkH7A_j-'","caused_by":{"type":"illegal_argument_exception","reason":"[float] supports only finite values, but got [NaN]"}}}}]}"; line: 1, column: 139] (through reference chain: com.cloudbees.esr.es.model.BulkResponse["items"]->java.util.ArrayList[0]->com.cloudbees.esr.es.model.BulkResponse$BulkIndexResponse["error"])
        at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)
...
        at com.cloudbees.esr.es.AsyncHttpElasticsearchClient$2.onCompleted(AsyncHttpElasticsearchClient.java:185)
...

Resolution

Resolved issues CloudBees Internal Ticket: [CPLT2-6540] Fix handling of non-finite double gauge.

Please reach to CloudBees support for help updating your instance to the latest version using our Assisted Upgrade process.

Tested product/plugin versions

Elasticsearch Reporter version 2.121.0.2 had the issue, 2.235.0.2 has the fix

This article is part of our Knowledge Base and is provided for guidance-based purposes only. The solutions or workarounds described here are not officially supported by CloudBees and may not be applicable in all environments. Use at your own discretion, and test changes in a safe environment before applying them to production systems.