Sorry for not metioning. It's 7.5.0, deployed via docker.
When enabling security and the basic license, these are the two errors (which print the exception above):
blocking [cluster:monitor/stats] operation due to expired license.
collector [cluster_stats] failed to collect data
More specific, this is the log message:
{"type": "server", "timestamp": "2020-11-02T19:22:21,592Z", "level": "ERROR", "component": "o.e.x.s.a.f.SecurityActionFilter", "cluster.name": "docker-cluster", "node.name": "redacted", "message": "blocking [cluster: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": "redacted", "node.id": "redacted" }
{"type": "server", "timestamp": "2020-11-02T19:22:21,592Z", "level": "ERROR", "component": "o.e.x.m.c.c.ClusterStatsCollector", "cluster.name": "docker-cluster", "node.name": "redacted", "message": "collector [cluster_stats] failed to collect data", "cluster.uuid": "redacted", "node.id": "redacted" ,
"stacktrace": ["org.elasticsearch.ElasticsearchSecurityException: current license is non-compliant for [security]",
"at org.elasticsearch.license.LicenseUtils.newComplianceException(LicenseUtils.java:27) ~[?:?]",
"at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.apply(SecurityActionFilter.java:79) ~[?:?]",
"at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:151) ~[elasticsearch-7.5.0.jar:7.5.0]",
"at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:129) ~[elasticsearch-7.5.0.jar:7.5.0]",
"at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:64) ~[elasticsearch-7.5.0.jar:7.5.0]",
"at org.elasticsearch.client.node.NodeClient.executeLocally(NodeClient.java:83) ~[elasticsearch-7.5.0.jar:7.5.0]",
"at org.elasticsearch.client.node.NodeClient.doExecute(NodeClient.java:72) ~[elasticsearch-7.5.0.jar:7.5.0]",
"at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:396) ~[elasticsearch-7.5.0.jar:7.5.0]",
"at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:385) ~[elasticsearch-7.5.0.jar:7.5.0]",
"at org.elasticsearch.client.support.AbstractClient$ClusterAdmin.execute(AbstractClient.java:679) ~[elasticsearch-7.5.0.jar:7.5.0]",
"at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:45) ~[elasticsearch-7.5.0.jar:7.5.0]",
"at org.elasticsearch.action.ActionRequestBuilder.get(ActionRequestBuilder.java:59) ~[elasticsearch-7.5.0.jar:7.5.0]",
"at org.elasticsearch.xpack.monitoring.collector.cluster.ClusterStatsCollector.lambda$doCollect$0(ClusterStatsCollector.java:95) ~[x-pack-monitoring-7.5.0.jar:7.5.0]",
"at org.elasticsearch.xpack.monitoring.collector.cluster.ClusterStatsCollector.doCollect(ClusterStatsCollector.java:99) ~[x-pack-monitoring-7.5.0.jar:7.5.0]",
"at org.elasticsearch.xpack.monitoring.collector.Collector.collect(Collector.java:88) [x-pack-monitoring-7.5.0.jar:7.5.0]",
"at org.elasticsearch.xpack.monitoring.MonitoringService$MonitoringExecution$1.doRun(MonitoringService.java:242) [x-pack-monitoring-7.5.0.jar:7.5.0]",
"at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-7.5.0.jar:7.5.0]",
"at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]",
"at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]",
"at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:703) [elasticsearch-7.5.0.jar:7.5.0]",
"at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]",
"at java.util.concurrent.ThreadPoolExecutor$Worker.run(Th
The env var xpack.license.self_generated.type
of elasticsearch is set to basic
.
Edit:
Turns out that the env var mentioned above alone doesn't do anything. One has to start a basic license: