Publishing failed during context creation – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 8.9-8.9

Briefly, this error occurs when Elasticsearch is unable to publish cluster state updates due to issues like network problems, heavy load, or node failures. To resolve this, you can check the network connectivity between nodes, ensure the cluster is not overloaded, and verify the health of all nodes. If a specific node is consistently causing issues, consider replacing or troubleshooting it. Also, ensure that your Elasticsearch version is up-to-date as this could be a bug that’s fixed in a newer version.

This guide will help you check for common problems that cause the log ” publishing failed during context creation ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: cluster.

Log Context

Log “publishing failed during context creation” class name is We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 publicationContextConstructionStartMillis = transportService.getThreadPool().rawRelativeTimeInMillis();
 publicationContext = publicationHandler.newPublicationContext(clusterStatePublicationEvent);
 } catch (Exception e) {
 logger.debug(() -> "[" + clusterStatePublicationEvent.getSummary() + "] publishing failed during context creation"; e);
 becomeCandidate("publication context creation");
 throw new FailedToCommitClusterStateException("publishing failed during context creation"; e);
 }  try (Releasable ignored = publicationContext::decRef) {
 try {


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?