apache / cloudstack

Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform
https://cloudstack.apache.org/
Apache License 2.0
2.11k stars 1.11k forks source link

Prometheus Exporter Nullpointer exception 2 #9901

Closed hulucc closed 2 weeks ago

hulucc commented 2 weeks ago

ISSUE TYPE

Bug Report

COMPONENT NAME

Prometheus Exporter

CLOUDSTACK VERSION

4.18

After the fix of #8024, get anothoer NullPointerException in prometheus exporter

cloudstack-0 cloudstack WARN  [o.a.c.m.PrometheusExporterImpl] (HTTP-Dispatcher:null) (logid:) Getting metrics failed
cloudstack-0 cloudstack java.lang.NullPointerException
cloudstack-0 cloudstack         at org.apache.cloudstack.metrics.PrometheusExporterImpl.addHostMetrics(PrometheusExporterImpl.java:164)
cloudstack-0 cloudstack         at org.apache.cloudstack.metrics.PrometheusExporterImpl.updateMetrics(PrometheusExporterImpl.java:458)
cloudstack-0 cloudstack         at org.apache.cloudstack.metrics.PrometheusExporterServerImpl$ExporterHandler.handle(PrometheusExporterServerImpl.java:57)
cloudstack-0 cloudstack         at jdk.httpserver/com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:77)
cloudstack-0 cloudstack         at jdk.httpserver/sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:82)
cloudstack-0 cloudstack         at jdk.httpserver/com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:80)
cloudstack-0 cloudstack         at jdk.httpserver/sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:848)
cloudstack-0 cloudstack         at jdk.httpserver/com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:77)
cloudstack-0 cloudstack         at jdk.httpserver/sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:817)
cloudstack-0 cloudstack         at jdk.httpserver/sun.net.httpserver.ServerImpl$DefaultExecutor.execute(ServerImpl.java:201)
cloudstack-0 cloudstack         at jdk.httpserver/sun.net.httpserver.ServerImpl$Dispatcher.handle(ServerImpl.java:560)
cloudstack-0 cloudstack         at jdk.httpserver/sun.net.httpserver.ServerImpl$Dispatcher.run(ServerImpl.java:526)
cloudstack-0 cloudstack         at java.base/java.lang.Thread.run(Thread.java:829)
hulucc commented 2 weeks ago

already fixed in 4.19.0