Security must be explicitly enabled when using a – 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 Elasticsearch is configured to use a feature that requires security, but security is not explicitly enabled. This could be due to a missing or incorrect configuration in the elasticsearch.yml file. To resolve this issue, you can enable security by setting ‘’ to true in the elasticsearch.yml file. Also, ensure that the license supports security features. If not, you may need to upgrade your Elasticsearch license. Additionally, check if the Elasticsearch version supports security, as older versions may not have this feature.

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 ” Security must be explicitly enabled when using a [ ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin, filter.

Log Context

Log “Security must be explicitly enabled when using a [” class name is We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 } catch (Exception e) {
 } else if (SECURITY_ACTION_MATCHER.test(action)) {
 if (licenseState.isSecurityEnabled() == false) {
 listener.onFailure(new ElasticsearchException("Security must be explicitly enabled when using a [" +
 licenseState.getOperationMode().description() + "] license. " +
 "Enable security by setting [] to [true] in the elasticsearch.yml file " +
 "and restart the node."));
 } else {


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?