Security must be explicitly enabled when using a trial license – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 7-7

Briefly, this error occurs when you’re using a trial license of Elasticsearch and you haven’t explicitly enabled security. Elasticsearch requires security to be enabled for trial licenses to ensure data protection. To resolve this issue, you can enable security by setting “xpack.security.enabled” to true in the elasticsearch.yml configuration file. Also, ensure to configure the built-in users (like elastic, kibana etc.) and TLS/SSL for inter-node communication for a secure setup.

This guide will help you check for common problems that cause the log ” Security must be explicitly enabled when using a trial license. ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: filter, license, plugin.

Log Context

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

 } catch (Exception e) {
 listener.onFailure(e);
 }
 } else if (SECURITY_ACTION_MATCHER.test(action)) {
 if (licenseState.isSecurityDisabledByTrialLicense()) {
 listener.onFailure(new ElasticsearchException("Security must be explicitly enabled when using a trial license. " +
 "Enable security by setting [xpack.security.enabled] to [true] in the elasticsearch.yml file " +
 "and restart the node."));
 } else {
 listener.onFailure(LicenseUtils.newComplianceException(XPackField.SECURITY));
 }

 

 [ratemypost]