Automatically enabling security for older trial license – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-6.8

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 “” 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.

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
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)) {
          "Automatically enabling security for older trial license ({})";
                        mostRecentTrialVersion == null ? "[pre 6.1.0]" : mostRecentTrialVersion.toString());
                        "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());