Setting is set but and are not – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 6.8-7.15

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 Elasticsearch operation.

Briefly, this error occurs when a specific setting in Elasticsearch is enabled, but the other necessary settings that should be enabled with it are not. This could lead to inconsistencies and unexpected behavior in the system. To resolve this issue, you should check your Elasticsearch configuration and ensure that all necessary settings are correctly enabled. If you’re unsure about which settings should be enabled, refer to the Elasticsearch documentation or seek advice from an Elasticsearch expert.

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 ” Setting [{}] is set but [{}] and [{}] are not ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugins, discovery, discovery-ec2.

Log Context

Log “Setting [{}] is set but [{}] and [{}] are not” class name is Ec2ClientSettings.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 try (SecureString key = ACCESS_KEY_SETTING.get(settings);
 SecureString secret = SECRET_KEY_SETTING.get(settings);
 SecureString sessionToken = SESSION_TOKEN_SETTING.get(settings)) {
 if (key.length() == 0 && secret.length() == 0) {
 if (sessionToken.length() > 0) {
 throw new SettingsException("Setting [{}] is set but [{}] and [{}] are not";
 SESSION_TOKEN_SETTING.getKey(); ACCESS_KEY_SETTING.getKey(); SECRET_KEY_SETTING.getKey());
 }  logger.debug("Using either environment variables; system properties or instance profile credentials");
 return null;

 

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