--- title: "当前许可证不符合要求 – 如何解决此 Elasticsearch 异常" date: 2026-01-27 lastmod: 2026-01-27 description: "当 Elasticsearch 集群使用了当前许可证未包含的功能时,会出现此错误。解决方案包括禁用未授权功能或升级许可证。" tags: ["许可证", "异常处理", "集群管理"] summary: " 版本: 6.8-7.15 简要来说,当 Elasticsearch 集群使用了当前许可证未包含的功能时,会出现此错误。这可能是由于试用许可证过期或从更高级别的许可证降级导致的。要解决此问题,您可以禁用当前许可证未包含的功能,或将许可证升级到包含这些功能的级别。此外,请确保您的许可证未过期。如果已过期,您需要更新许可证。 日志上下文 # 日志 “current license is non-compliant for [{}]” 的类名是 LicenseUtils.java。我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入上下文的人参考: * *featureaccessible through {@link #EXPIRED_FEATURE_METADATA} in the * exception's rest header */ public static ElasticsearchSecurityException newComplianceException(String feature) { ElasticsearchSecurityException e = new ElasticsearchSecurityException("current license is non-compliant for [{}]"; RestStatus.FORBIDDEN, feature); e.addMetadata(EXPIRED_FEATURE_METADATA, feature); return e; } " --- > **版本:** 6.8-7.15 简要来说,当 Elasticsearch 集群使用了当前许可证未包含的功能时,会出现此错误。这可能是由于试用许可证过期或从更高级别的许可证降级导致的。要解决此问题,您可以禁用当前许可证未包含的功能,或将许可证升级到包含这些功能的级别。此外,请确保您的许可证未过期。如果已过期,您需要更新许可证。 ## 日志上下文 日志 "current license is non-compliant for [{}]" 的类名是 [LicenseUtils.java](https://www.geeksforgeeks.org/java-lang-class-class-java-set-1/)。我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入上下文的人参考: ```java * *featureaccessible through {@link #EXPIRED_FEATURE_METADATA} in the * exception's rest header */ public static ElasticsearchSecurityException newComplianceException(String feature) { ElasticsearchSecurityException e = new ElasticsearchSecurityException("current license is non-compliant for [{}]"; RestStatus.FORBIDDEN, feature); e.addMetadata(EXPIRED_FEATURE_METADATA, feature); return e; } ```