Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Since NiFi 1.10, a NPE can happen in the code of CuratorLeaderElectionManager.getLeadershipChangeCount when trying to get diagnostic data for a NiFi node:
ERROR org.apache.nifi.diagnostics.bootstrap.BootstrapDiagnosticsFactory: Failed to obtain diagnostics information from class org.apache.nifi.diagnostics.bootstrap.tasks.ClusterDiagnosticTask java.lang.NullPointerException: null at org.apache.nifi.controller.leader.election.CuratorLeaderElectionManager.getLeadershipChangeCount(CuratorLeaderElectionManager.java:241) at org.apache.nifi.diagnostics.bootstrap.tasks.ClusterDiagnosticTask.captureDump(ClusterDiagnosticTask.java:75) at org.apache.nifi.diagnostics.bootstrap.BootstrapDiagnosticsFactory.create(BootstrapDiagnosticsFactory.java:58) at org.apache.nifi.BootstrapListener.writeDiagnostics(BootstrapListener.java:288) at org.apache.nifi.BootstrapListener.access$600(BootstrapListener.java:41) at org.apache.nifi.BootstrapListener$Listener$1.run(BootstrapListener.java:240) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
The problematic line is here:
This problem does not exist in NiFi 2.x as we have a proper null check at
This JIRA is to track the addition of a similar null check in the NiFi 1.x support line.
Attachments
Issue Links
- links to