[
https://issues.apache.org/jira/browse/NIFI-11297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stephanie Ambrose resolved NIFI-11297.
--------------------------------------
Assignee: Stephanie Ambrose
Resolution: Not A Problem
[https://github.com/apache/nifi/tree/main/nifi-stateless/nifi-stateless-assembly#reporting-tasks]
^ This could use some verbiage on required properties for specific reporting
tasks.... The
nifi.stateless.reporting.task.prometheus.frequency=10 sec
...property sets the getSchedulingPeriod method on the ReportingTaskNode class,
which throws a NullPointerException without it.
> Prometheus Reporting Task throws a NullPointerException for Stateless NiFi
> --------------------------------------------------------------------------
>
> Key: NIFI-11297
> URL: https://issues.apache.org/jira/browse/NIFI-11297
> Project: Apache NiFi
> Issue Type: Bug
> Reporter: Stephanie Ambrose
> Assignee: Stephanie Ambrose
> Priority: Critical
>
> When configuring the Prometheus reporting task for Stateless NiFi, a
> NullPointerException is thown and it does not work.
> Here are my config properties:
> nifi.stateless.reporting.task.prometheus.name=Prometheus
> nifi.stateless.reporting.task.prometheus.type=PrometheusReportingTask
> nifi.stateless.reporting.task.prometheus.bundle=org.apache.nifi:nifi-prometheus-nar:1.12.1
> nifi.stateless.reporting.task.prometheus.properties.prometheus-reporting-task-metrics-endpoint-port=9100
> nifi.stateless.reporting.task.prometheus.properties.prometheus-reporting-task-instance-id=statelessNiFi1
> nifi.stateless.reporting.task.prometheus.properties.prometheus-reporting-task-metrics-strategy=All
> Components
> nifi.stateless.reporting.task.prometheus.properties.prometheus-reporting-task-metrics-send-jvm=false
> nifi.stateless.reporting.task.prometheus.properties.prometheus-reporting-task-client-auth=No
> Authentication
> And here is the error that is thrown to my Prometheus server:
> HTTP ERROR 500 java.lang.NullPointerException
> URI: /metrics/
> STATUS: 500
> MESSAGE: java.lang.NullPointerException
> SERVLET:
> org.apache.nifi.reporting.prometheus.PrometheusServer$MetricsServlet-6d1c2fd6
> CAUSED BY: java.lang.NullPointerException
> Caused by:
> java.lang.NullPointerException
> at
> org.apache.nifi.reporting.prometheus.PrometheusReportingTask.lambda$onScheduled$0(PrometheusReportingTask.java:133)
> at
> org.apache.nifi.reporting.prometheus.PrometheusServer$MetricsServlet.doGet(PrometheusServer.java:69)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> at
> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)
> at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:554)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
> at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> at org.eclipse.jetty.server.Server.handle(Server.java:516)
> at
> org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487)
> at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)
> at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)
> at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
> at
> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
> at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
> at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
> at java.base/java.lang.Thread.run(Thread.java:829)
>
> We intend to use the Prometheus reporting task in Stateless NiFi for HPA and
> pod health, so for us this would be a critical bug fix.
>
> Thanks!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)