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 detects an older trial license and automatically enables security features. This could cause issues if your applications aren’t configured to handle Elasticsearch’s security features. To resolve this, you can either configure your applications to work with Elasticsearch’s security features, or you can disable security in Elasticsearch by setting “xpack.security.enabled” to false in the elasticsearch.yml configuration file. Alternatively, you can upgrade your Elasticsearch license to a newer version that doesn’t automatically enable security.
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 ” Automatically enabling security for older trial license ({}) ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin, license.
Log Context
Log “Automatically enabling security for older trial license ({})” classname is XPackLicenseState.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :
if (isSecurityEnabled == true && isSecurityExplicitlyEnabled == false && mode == OperationMode.TRIAL && isSecurityEnabledByTrialVersion == false) { // Before 6.3; Trial licenses would default having security enabled. // If this license was generated before that version; then treat it as if security is explicitly enabled if (mostRecentTrialVersion == null || mostRecentTrialVersion.before(Version.V_6_3_0)) { logger.info("Automatically enabling security for older trial license ({})"; mostRecentTrialVersion == null ? "[pre 6.1.0]" : mostRecentTrialVersion.toString()); deprecationLogger.deprecated( "Automatically enabling security because the current trial license was generated before 6.3.0. " + "This behaviour will be removed in a future version of Elasticsearch. " + "Please set [{}] to true"; XPackSettings.SECURITY_ENABLED.getKey());