bejancsaba commented on a change in pull request #5762:
URL: https://github.com/apache/nifi/pull/5762#discussion_r814133223
##########
File path:
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-headless-server/src/main/java/org/apache/nifi/headless/HeadlessNiFiServer.java
##########
@@ -215,6 +228,14 @@ public StatusHistoryDumpFactory
getStatusHistoryDumpFactory() {
public void stop() {
try {
flowService.stop(false);
+
+ try {
+ if (narAutoLoader != null) {
+ narAutoLoader.stop();
Review comment:
It looks like narAutoLoader is being stopped twice which results in a
logged exception. As discussed could you please take a look?
```
2022-02-24 18:54:37,969 INFO [pool-2-thread-2]
org.apache.nifi.BootstrapListener Received SHUTDOWN request from Bootstrap
2022-02-24 18:54:37,970 INFO [pool-2-thread-2] org.apache.nifi.minifi.MiNiFi
Initiating shutdown of MiNiFi server...
2022-02-24 18:54:37,971 INFO [pool-2-thread-2]
o.apache.nifi.controller.FlowController Initiated graceful shutdown of flow
controller...waiting up to 10 seconds
2022-02-24 18:54:38,780 INFO [pool-2-thread-2]
o.apache.nifi.controller.FlowController Controller has been terminated
successfully.
2022-02-24 18:54:38,792 INFO [pool-2-thread-2]
org.apache.nifi.nar.NarAutoLoaderTask Stopping NAR Auto-loader
2022-02-24 18:54:38,794 INFO [pool-2-thread-2]
org.apache.nifi.nar.NarAutoLoader NAR Auto-Loader stopped
2022-02-24 18:54:38,796 INFO [pool-2-thread-2]
org.apache.nifi.BootstrapListener Successfully initiated communication with
Bootstrap
2022-02-24 18:54:38,796 INFO [pool-2-thread-2] org.apache.nifi.minifi.MiNiFi
MiNiFi server shutdown completed (nicely or otherwise).
2022-02-24 18:54:38,797 INFO [Thread-1] org.apache.nifi.minifi.MiNiFi
Initiating shutdown of MiNiFi server...
2022-02-24 18:54:38,799 WARN [Thread-1] o.a.nifi.headless.HeadlessNiFiServer
Failed to stop NAR auto-loader
java.lang.NullPointerException: null
at org.apache.nifi.nar.NarAutoLoader.stop(NarAutoLoader.java:113)
at
org.apache.nifi.headless.HeadlessNiFiServer.stop(HeadlessNiFiServer.java:234)
at org.apache.nifi.minifi.MiNiFi.shutdownHook(MiNiFi.java:183)
at org.apache.nifi.minifi.MiNiFi.lambda$new$1(MiNiFi.java:88)
at java.lang.Thread.run(Thread.java:748)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]