When I installed x-pack start elasticsearch get java.lang.NullPointerException

[2018-03-26T16:27:27,351][INFO ][o.e.n.Node               ] initialized
[2018-03-26T16:27:27,351][INFO ][o.e.n.Node               ] [H31VBPK] starting ...
[2018-03-26T16:27:37,362][ERROR][o.e.x.m.c.s.ShardsCollector] [H31VBPK] collector [shards] failed to collect data
java.lang.NullPointerException: null
	at org.elasticsearch.xpack.monitoring.collector.Collector.collect(Collector.java:96) [x-pack-monitoring-6.2.3.jar:6.2.3]
	at org.elasticsearch.xpack.monitoring.MonitoringService$MonitoringExecution$1.doRun(MonitoringService.java:221) [x-pack-monitoring-6.2.3.jar:6.2.3]
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-6.2.3.jar:6.2.3]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_151]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_151]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:573) [elasticsearch-6.2.3.jar:6.2.3]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_151]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_151]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
[2018-03-26T16:27:37,368][ERROR][o.e.x.m.c.i.IndexStatsCollector] [H31VBPK] collector [index-stats] failed to collect data
java.lang.NullPointerException: null
	at org.elasticsearch.xpack.monitoring.collector.Collector.collect(Collector.java:96) [x-pack-monitoring-6.2.3.jar:6.2.3]
	at org.elasticsearch.xpack.monitoring.MonitoringService$MonitoringExecution$1.doRun(MonitoringService.java:221) [x-pack-monitoring-6.2.3.jar:6.2.3]
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-6.2.3.jar:6.2.3]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_151]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_151]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:573) [elasticsearch-6.2.3.jar:6.2.3]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_151]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_151]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
[2018-03-26T16:27:37,368][ERROR][o.e.x.m.c.c.ClusterStatsCollector] [H31VBPK] collector [cluster_stats] failed to collect data
java.lang.NullPointerException: null
	at org.elasticsearch.xpack.monitoring.collector.Collector.collect(Collector.java:96) [x-pack-monitoring-6.2.3.jar:6.2.3]
	at org.elasticsearch.xpack.monitoring.MonitoringService$MonitoringExecution$1.doRun(MonitoringService.java:221) [x-pack-monitoring-6.2.3.jar:6.2.3]
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-6.2.3.jar:6.2.3]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_151]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_151]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:573) [elasticsearch-6.2.3.jar:6.2.3]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_151]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_151]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
[2018-03-26T16:27:37,369][ERROR][o.e.x.m.c.n.NodeStatsCollector] [H31VBPK] collector [node_stats] failed to collect data
java.lang.NullPointerException: null
	at org.elasticsearch.xpack.monitoring.collector.Collector.collect(Collector.java:96) [x-pack-monitoring-6.2.3.jar:6.2.3]
	at org.elasticsearch.xpack.monitoring.MonitoringService$MonitoringExecution$1.doRun(MonitoringService.java:221) [x-pack-monitoring-6.2.3.jar:6.2.3]
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-6.2.3.jar:6.2.3]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_151]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_151]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:573) [elasticsearch-6.2.3.jar:6.2.3]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_151]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_151]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
[2018-03-26T16:27:37,369][ERROR][o.e.x.m.c.m.JobStatsCollector] [H31VBPK] collector [job_stats] failed to collect data
java.lang.NullPointerException: null
	at org.elasticsearch.xpack.monitoring.collector.Collector.collect(Collector.java:96) [x-pack-monitoring-6.2.3.jar:6.2.3]
	at org.elasticsearch.xpack.monitoring.MonitoringService$MonitoringExecution$1.doRun(MonitoringService.java:221) [x-pack-monitoring-6.2.3.jar:6.2.3]
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-6.2.3.jar:6.2.3]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_151]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_151]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:573) [elasticsearch-6.2.3.jar:6.2.3]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_151]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_151]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
[2018-03-26T16:27:37,370][ERROR][o.e.x.m.c.i.IndexRecoveryCollector] [H31VBPK] collector [index_recovery] failed to collect data
java.lang.NullPointerException: null
	at org.elasticsearch.xpack.monitoring.collector.Collector.collect(Collector.java:96) [x-pack-monitoring-6.2.3.jar:6.2.3]
	at org.elasticsearch.xpack.monitoring.MonitoringService$MonitoringExecution$1.doRun(MonitoringService.java:221) [x-pack-monitoring-6.2.3.jar:6.2.3]
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-6.2.3.jar:6.2.3]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_151]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_151]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:573) [elasticsearch-6.2.3.jar:6.2.3]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_151]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_151]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]

What should I do. please help me Thx

[2018-03-26T16:27:37,538][INFO ][o.e.t.TransportService   ] [H31VBPK] publish_address {192.168.0.241:9300}, bound_addresses {192.168.0.241:9300}
[2018-03-26T16:27:37,570][INFO ][o.e.b.BootstrapChecks    ] [H31VBPK] bound or publishing to a non-loopback address, enforcing bootstrap checks
[2018-03-26T16:27:40,652][INFO ][o.e.c.s.MasterService    ] [H31VBPK] zen-disco-elected-as-master ([0] nodes joined), reason: new_master {H31VBPK}{H31VBPK0TKyoeas3xpxkLg}{9VRZF0UmRL6ilttrAFlUNQ}{192.168.0.241}{192.168.0.241:9300}{ml.machine_memory=1912107008, ml.max_open_jobs=20, ml.enabled=true}
[2018-03-26T16:27:40,657][INFO ][o.e.c.s.ClusterApplierService] [H31VBPK] new_master {H31VBPK}{H31VBPK0TKyoeas3xpxkLg}{9VRZF0UmRL6ilttrAFlUNQ}{192.168.0.241}{192.168.0.241:9300}{ml.machine_memory=1912107008, ml.max_open_jobs=20, ml.enabled=true}, reason: apply cluster state (from master [master {H31VBPK}{H31VBPK0TKyoeas3xpxkLg}{9VRZF0UmRL6ilttrAFlUNQ}{192.168.0.241}{192.168.0.241:9300}{ml.machine_memory=1912107008, ml.max_open_jobs=20, ml.enabled=true} committed version [1] source [zen-disco-elected-as-master ([0] nodes joined)]])
[2018-03-26T16:27:40,694][INFO ][o.e.x.s.t.n.SecurityNetty4HttpServerTransport] [H31VBPK] publish_address {192.168.0.241:9200}, bound_addresses {192.168.0.241:9200}
[2018-03-26T16:27:40,694][INFO ][o.e.n.Node               ] [H31VBPK] started
[2018-03-26T16:27:41,251][INFO ][o.e.l.LicenseService     ] [H31VBPK] license [6f4a009f-22d1-4e0d-97ea-46983c0a106d] mode [trial] - valid
[2018-03-26T16:27:41,259][INFO ][o.e.g.GatewayService     ] [H31VBPK] recovered [5] indices into cluster_state
[2018-03-26T16:27:41,671][INFO ][o.e.c.r.a.AllocationService] [H31VBPK] Cluster health status changed from [RED] to [GREEN] (reason: [shards started [[.monitoring-es-6-2018.03.26][0]] ...]).

From your logs, it looks like this might have been a temporary condition during the first startup of the node. I don't have the first log of 6.2.3 handy to check.

Did the NPE stop after 2018-03-26T16:27:41 ? If not, I could start up 6.2.3 to see if I can reproduce your issue.

If you're using Kibana does Monitoring work in Kibana?

Regards,
Lee

Thank you LeeDR. I'm still not know what happened. I have reinstall my system, then seem look ok from the log. Thank you again.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.