Unable to reconstruct object Total counts for shards couldn t be parsed – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 7.16-7.17

Briefly, this error occurs when Elasticsearch is unable to parse the shard count data during an object reconstruction process. This could be due to data corruption, incorrect data format, or a bug in the software. To resolve this issue, you can try the following: 1) Check the data format and ensure it’s correct. 2) Try to rebuild the index if possible. 3) Update or patch your Elasticsearch software to the latest version to fix any potential bugs. 4) If the problem persists, consider seeking help from the Elasticsearch community or support.

This guide will help you check for common problems that cause the log ” Unable to reconstruct object. Total counts for shards couldn’t be parsed. ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: client, rest-high-level.

Log Context

Log “Unable to reconstruct object. Total counts for shards couldn’t be parsed.” class name is SyncedFlushResponse.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 if (totalCounts != null) {
 return new SyncedFlushResponse(totalCounts; indexResults);
 } else {
 throw new ParsingException(startLoc; "Unable to reconstruct object. Total counts for shards couldn't be parsed.");
 }  /**
 * Encapsulates the number of total successful and failed shard copies


How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?