The published hash of the consistent secure setting differs from the locally computed one – How to solve this OpenSearch error

Opster Team

Aug-23, Version: 1-1.1

Before you dig into reading this guide, have you tried asking OpsGPT what this log means? You’ll receive a customized analysis of your log.

Try OpsGPT now for step-by-step guidance and tailored insights into your OpenSearch operation.

Briefly, this error occurs when there is a mismatch between the published hash of a secure setting and the locally computed one in OpenSearch. This could be due to incorrect configuration or synchronization issues. To resolve this, you can try the following: 1) Verify and correct the secure setting values, 2) Ensure all nodes have the same secure settings, 3) Restart the nodes to refresh the settings, and 4) Check for any network issues that might be causing synchronization problems.

For a complete solution to your to your search operation, try for free AutoOps for Elasticsearch & OpenSearch . With AutoOps and Opster’s proactive support, you don’t have to worry about your search operation – we take charge of it. Get improved performance & stability with less hardware.

This guide will help you check for common problems that cause the log ” the published hash [{}] of the consistent secure setting [{}] differs from the locally computed one [{}] ” to appear. To understand the issues related to this log, read the explanation below about the following OpenSearch concepts: settings.

Log Context

Log “the published hash [{}] of the consistent secure setting [{}] differs from the locally computed one [{}]” classname is ConsistentSettingsService.java.
We extracted the following from OpenSearch source code for those seeking an in-depth context :

                final String publishedSalt = parts[0];
                final String publishedHash = parts[1];
                final byte[] computedSaltedHashBytes = computeSaltedPBKDF2Hash(localHash; publishedSalt.getBytes(StandardCharsets.UTF_8));
                final String computedSaltedHash = new String(Base64.getEncoder().encode(computedSaltedHashBytes); StandardCharsets.UTF_8);
                if (false == publishedHash.equals(computedSaltedHash)) {
                    logger.warn("the published hash [{}] of the consistent secure setting [{}] differs from the locally computed one [{}]";
                            publishedHash; concreteSecureSetting.getKey(); computedSaltedHash);
                    if (state.nodes().isLocalNodeElectedMaster()) {
                        throw new IllegalStateException("Master node cannot validate consistent setting. The published hash ["
                                + publishedHash + "] of the consistent secure setting [" + concreteSecureSetting.getKey()
                                + "] differs from the locally computed one [" + computedSaltedHash + "].");

 

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?

Get expert answers on Elasticsearch/OpenSearch