ES7的X-pack许可证是提供免费一个月的试用,但是到期之后,就会隔一段时间报这个错误

elasticsearch_1  | {"type": "server", "timestamp": "2020-09-09T04:14:51,347Z", "level": "ERROR", "component": "o.e.x.s.a.f.SecurityActionFilter", "cluster.name": "docker-cluster", "node.name": "elasticsearch", "message": "blocking [indices:monitor/stats] operation due to expired license. Cluster health, cluster stats and indices stats \noperations are blocked on license expiration. All data operations (read and write) continue to work. \nIf you have a new license, please update it. Otherwise, please reach out to your support contact.", "cluster.uuid": "DuYMwh_2QnawcB8hqXVCAw", "node.id": "pYqaV54GTa-k8k66vIfuig"  }
elasticsearch_1  | {"type": "server", "timestamp": "2020-09-09T04:14:51,348Z", "level": "WARN", "component": "o.e.c.InternalClusterInfoService", "cluster.name": "docker-cluster", "node.name": "elasticsearch", "message": "Failed to execute IndicesStatsAction for ClusterInfoUpdateJob", "cluster.uuid": "DuYMwh_2QnawcB8hqXVCAw", "node.id": "pYqaV54GTa-k8k66vIfuig" , 
elasticsearch_1  | "stacktrace": ["org.elasticsearch.ElasticsearchSecurityException: current license is non-compliant for [security]",
elasticsearch_1  | "at org.elasticsearch.license.LicenseUtils.newComplianceException(LicenseUtils.java:26) ~[?:?]",
elasticsearch_1  | "at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.apply(SecurityActionFilter.java:79) ~[?:?]",
elasticsearch_1  | "at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:151) [elasticsearch-7.6.1.jar:7.6.1]",
elasticsearch_1  | "at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:129) [elasticsearch-7.6.1.jar:7.6.1]",
elasticsearch_1  | "at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:64) [elasticsearch-7.6.1.jar:7.6.1]",
elasticsearch_1  | "at org.elasticsearch.client.node.NodeClient.executeLocally(NodeClient.java:94) [elasticsearch-7.6.1.jar:7.6.1]",
elasticsearch_1  | "at org.elasticsearch.client.node.NodeClient.doExecute(NodeClient.java:83) [elasticsearch-7.6.1.jar:7.6.1]",
elasticsearch_1  | "at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:396) [elasticsearch-7.6.1.jar:7.6.1]",
elasticsearch_1  | "at org.elasticsearch.client.support.AbstractClient$IndicesAdmin.execute(AbstractClient.java:1231) [elasticsearch-7.6.1.jar:7.6.1]",
elasticsearch_1  | "at org.elasticsearch.client.support.AbstractClient$IndicesAdmin.stats(AbstractClient.java:1547) [elasticsearch-7.6.1.jar:7.6.1]",
elasticsearch_1  | "at org.elasticsearch.cluster.InternalClusterInfoService.updateIndicesStats(InternalClusterInfoService.java:264) [elasticsearch-7.6.1.jar:7.6.1]",
elasticsearch_1  | "at org.elasticsearch.cluster.InternalClusterInfoService.refresh(InternalClusterInfoService.java:321) [elasticsearch-7.6.1.jar:7.6.1]",
elasticsearch_1  | "at org.elasticsearch.cluster.InternalClusterInfoService.maybeRefresh(InternalClusterInfoService.java:271) [elasticsearch-7.6.1.jar:7.6.1]",
elasticsearch_1  | "at org.elasticsearch.cluster.InternalClusterInfoService.access$200(InternalClusterInfoService.java:68) [elasticsearch-7.6.1.jar:7.6.1]",
elasticsearch_1  | "at org.elasticsearch.cluster.InternalClusterInfoService$SubmitReschedulingClusterInfoUpdatedJob.lambda$run$0(InternalClusterInfoService.java:221) [elasticsearch-7.6.1.jar:7.6.1]",
elasticsearch_1  | "at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:633) [elasticsearch-7.6.1.jar:7.6.1]",
elasticsearch_1  | "at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]",
elasticsearch_1  | "at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]",
elasticsearch_1  | "at java.lang.Thread.run(Thread.java:830) [?:?]"] }

搜索了一遍,发现大多数博客都是说去es官网注册个账号,然后申请一个新的license,

在这里插入图片描述
但是注册license 页面上面写着,6.3版本以后,Elastic Stack的默认发行版中包含基本(免费)层功能。无需许可证注册。

也就是说,我现在用的7.6版本并不需要更新,只需要降级到基础版本即可

可以在kibana执行

POST /_license/start_basic?acknowledge=true

或者

curl -XPOST "http://elasticsearch:9200/_license/start_basic?acknowledge=true"
Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐