Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-8190

NPE enabling controller services on PG when reference doesn't exist

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.13.0
    • None
    • None

    Description

      2021-02-01 13:41:34,538 ERROR [Framework Task Thread Thread-3] org.apache.nifi.engine.FlowEngine Uncaught Exception in Runnable task
      java.lang.NullPointerException: null
      	at org.apache.nifi.controller.service.StandardControllerServiceProvider.enableControllerServices(StandardControllerServiceProvider.java:237)
      	at org.apache.nifi.controller.service.StandardControllerServiceProvider.lambda$enableControllerServicesAsync$0(StandardControllerServiceProvider.java:225)
      	at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
      	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) 

      Steps to reproduce:

      1) Make a flow with CS in root PG, and CS in child PG references the CS in parent

      2) Version control to registry

      3) Delete everything from NiFi side

      4) Import flow from registry, now have single CS in child, referencing missing CS

      5) Issue curl command to enable services on the child PG:

      curl -H "Content-Type: application/json" -X PUT --data "{ \"id\" : \"5eddbdcc-0177-1000-22fe-321b6445813b\", \"state\" : \"ENABLED\" }" http://localhost:8080/nifi-api/flow/process-groups/5eddbdcc-0177-1000-22fe-321b6445813b/controller-services

      Attachments

        Issue Links

          Activity

            People

              bbende Bryan Bende
              bbende Bryan Bende
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h