Failed to add items – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 8.4-8.9

Briefly, this error occurs when Elasticsearch is unable to index the documents due to issues like insufficient disk space, incorrect document format, or network connectivity issues. To resolve this, ensure there’s enough disk space and the document format is correct. Also, check the network connectivity between the Elasticsearch client and server. If the issue persists, check the Elasticsearch logs for more detailed error information.

This guide will help you check for common problems that cause the log ” Failed to add items ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin.

Log Context

Log “Failed to add items” class name is HashBasedTransactionStore.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 ++totalItemCount;
 scratchTransactionBytesStreamOutput.writeVLong(id);
 // unreachable: BytesRefStreamOutput does not throw an IOException;
 // the catch is required because StreamOutput defines it
 } catch (IOException e) {
 throw new AggregationExecutionException("Failed to add items"; e);
 }
 });  });
 long id = transactions.add(scratchTransactionBytesStreamOutput.get());

 

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?