Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monitoring's ClusterStatsCollector should be able to deal with a null license. #52317

Closed
martijnvg opened this issue Feb 13, 2020 · 1 comment · Fixed by #52371
Closed

Monitoring's ClusterStatsCollector should be able to deal with a null license. #52317

martijnvg opened this issue Feb 13, 2020 · 1 comment · Fixed by #52371

Comments

@martijnvg
Copy link
Member

NPE caught in test failures (#52197):

ERROR][o.e.x.m.c.c.ClusterStatsCollector] [integTest-0] collector [cluster_stats] failed to collect data
»  java.lang.NullPointerException: null
»       at org.elasticsearch.xpack.monitoring.collector.cluster.ClusterStatsCollector.doCollect(ClusterStatsCollector.java:108) ~[x-pack-monitoring-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
»       at org.elasticsearch.xpack.monitoring.collector.Collector.collect(Collector.java:88) [x-pack-monitoring-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
»       at org.elasticsearch.xpack.monitoring.MonitoringService$MonitoringExecution$1.doRun(MonitoringService.java:251) [x-pack-monitoring-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
»       at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
»       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:633) [elasticsearch-7.7.0-SNAPSHOT.jar:7.7.0-SNAPSHOT]
»       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
»       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
»       at java.lang.Thread.run(Thread.java:830) [?:?]

The ClusterStatsCollector#doCollect(...) (line 108) method should be able to handle a null License instance.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (:Core/Features/Monitoring)

martijnvg added a commit to martijnvg/elasticsearch that referenced this issue Feb 14, 2020
Take into account a null license may be returned by the license service.

Closes elastic#52317
martijnvg added a commit that referenced this issue Feb 17, 2020
Take into account a null license may be returned by the license service.

Closes #52317
martijnvg added a commit that referenced this issue Feb 17, 2020
Take into account a null license may be returned by the license service.

Closes #52317
martijnvg added a commit that referenced this issue Feb 17, 2020
Take into account a null license may be returned by the license service.

Closes #52317
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants