I run into the below error when creating a paramater. This is NiFi version 1.11.4. Any thoughts?
Unable to complete parameter context update request: Failed to update Parameter Context due to org.apache.nifi.web.util.LifecycleManagementException: Failed while waiting for components to transition to state of STOPPED
What the ERROR is telling you is that some component the references the parameter context failed to transition to a stopped state.
When a parameter context is defined in a component (NiFi processor for example), and change to the value assigned to that parameter would require the restart of those components so that the new parameter value is read in by the component.
When a component like a NiFi processor is asked to stop, it first transitions into a state of "Stopping". Once any active threads on that component complete the processor transitions to a "Stopped" state. It as this point the component could be started again.
So there are two possible scenarios that can happen here Since NiFi will not interrupt an active thread: 1. A component had a ling running thread that the restart process timed out waiting for it to transition to stopped (thread to complete and exit). It is quite possible that this component did finally finish its thread execution post this timeout and another attempt to apply the parameter context change would not be successful. 2. A component has a hung thread. Meaning the active thread on the component is making no progress because it is either waiting indefinitely on some response action or it being blocked by some other thread. In this case it would never complete its execution and transition to the "Stopped"state. First you need to identify the processor with the hung thread (Processors show a small number in t he upper right corner when a thread is active). Then you can take a series of thread dumps (./nifi.sh dump <dump-file-01>) and compare those thread dumps to see if the you have a thread stuck in the same state in every dump (shows no thread progress). The only way to kill a hung thread is via a NiFi restart. NiFi processors offer a terminate option, but that does not kill the tread. It simply disassociates that thread with the processor (think of putting in an isolation box). The flowfile that was being processed by that thread is rolled back on to the incoming connection. Should that terminated thread ever return anything (lets say it was not hung, but just a very long running thread), it output is just sent to null since it was terminated. But again that thread if truly hung will not go away until NiFi restart even if you selected terminate on the component.
You many also inspect the nifi-app.log for the ERROR exception to see if it is followed with a stack trace that may give more insight.