You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by shweta julur <ju...@gmail.com> on 2022/03/09 13:49:09 UTC

Getting java.util.concurrent.RejectedExecutionException upon nifi restart

Hi,

Once I deployed nars for the custom processors and custom controller
services and restarted nifi I got the below exception-

2022-03-09 06:38:19,759 INFO [Shutdown Cluster Coordinator]
o.a.n.c.c.node.NodeClusterCoordinator Successfully notified other nodes
that I am shutting down
2022-03-09 06:38:19,761 INFO [Curator-Framework-0]
o.a.c.f.imps.CuratorFrameworkImpl backgroundOperationsLoop exiting
2022-03-09 06:38:19,865 INFO [main]
o.a.n.c.l.e.CuratorLeaderElectionManager
CuratorLeaderElectionManager[stopped=true] stopped and closed
2022-03-09 06:38:19,865 INFO [main] o.a.n.c.c.h.AbstractHeartbeatMonitor
Heartbeat Monitor stopped
2022-03-09 06:38:19,866 INFO [main] o.apache.nifi.controller.FlowController
Initiated graceful shutdown of flow controller...waiting up to 10 seconds
2022-03-09 06:38:19,869 INFO [main] o.a.zookeeper.server.ZooKeeperServer
Shutting down
2022-03-09 06:38:19,870 INFO [main] o.a.zookeeper.server.ZooKeeperServer
shutting down
2022-03-09 06:38:19,871 INFO [main] o.a.z.server.FinalRequestProcessor
shutdown of request processor complete
2022-03-09 06:38:19,874 INFO [main] o.a.z.server.SyncRequestProcessor
Shutting down
2022-03-09 06:38:19,876 INFO [SyncThread:1]
o.a.z.server.SyncRequestProcessor SyncRequestProcessor exited!
2022-03-09 06:38:19,878 INFO [main] o.a.z.server.DatadirCleanupManager
Shutting down purge task.
2022-03-09 06:38:20,049 ERROR [Timer-Driven Process Thread-8]
org.apache.nifi.engine.FlowEngine Uncaught Exception in Runnable task
java.util.concurrent.RejectedExecutionException: Task
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@8ad2a80
rejected from org.apache.nifi.engine.FlowEngine@66ad5e5[Shutting down, pool
size = 36, active threads = 1, queued tasks = 6, completed tasks = 75]
        at
java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2063)
        at
java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:830)
        at
java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:326)
        at
java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoolExecutor.java:533)
        at org.apache.nifi.engine.FlowEngine.schedule(FlowEngine.java:87)
        at
org.apache.nifi.controller.service.StandardControllerServiceNode$2.run(StandardControllerServiceNode.java:431)
        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)

Any help would be appreciated.

Thanks,

Shweta

Re: Getting java.util.concurrent.RejectedExecutionException upon nifi restart

Posted by Mark Payne <ma...@hotmail.com>.
Hi Shweta,

The exception that you see here is rather harmless - it’s indicating that there was an attempt to enable a Controller Service while NiFi
was in the middle of shutting down. Recommend you look higher up in the logs to understand why NiFi was shutting down, if this was
not intentional.

Thanks
-Mark


> On Mar 9, 2022, at 8:49 AM, shweta julur <ju...@gmail.com> wrote:
> 
> Hi,
> 
> Once I deployed nars for the custom processors and custom controller services and restarted nifi I got the below exception-
> 
> 2022-03-09 06:38:19,759 INFO [Shutdown Cluster Coordinator] o.a.n.c.c.node.NodeClusterCoordinator Successfully notified other nodes that I am shutting down
> 2022-03-09 06:38:19,761 INFO [Curator-Framework-0] o.a.c.f.imps.CuratorFrameworkImpl backgroundOperationsLoop exiting
> 2022-03-09 06:38:19,865 INFO [main] o.a.n.c.l.e.CuratorLeaderElectionManager CuratorLeaderElectionManager[stopped=true] stopped and closed
> 2022-03-09 06:38:19,865 INFO [main] o.a.n.c.c.h.AbstractHeartbeatMonitor Heartbeat Monitor stopped
> 2022-03-09 06:38:19,866 INFO [main] o.apache.nifi.controller.FlowController Initiated graceful shutdown of flow controller...waiting up to 10 seconds
> 2022-03-09 06:38:19,869 INFO [main] o.a.zookeeper.server.ZooKeeperServer Shutting down
> 2022-03-09 06:38:19,870 INFO [main] o.a.zookeeper.server.ZooKeeperServer shutting down
> 2022-03-09 06:38:19,871 INFO [main] o.a.z.server.FinalRequestProcessor shutdown of request processor complete
> 2022-03-09 06:38:19,874 INFO [main] o.a.z.server.SyncRequestProcessor Shutting down
> 2022-03-09 06:38:19,876 INFO [SyncThread:1] o.a.z.server.SyncRequestProcessor SyncRequestProcessor exited!
> 2022-03-09 06:38:19,878 INFO [main] o.a.z.server.DatadirCleanupManager Shutting down purge task.
> 2022-03-09 06:38:20,049 ERROR [Timer-Driven Process Thread-8] org.apache.nifi.engine.FlowEngine Uncaught Exception in Runnable task
> java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@8ad2a80 rejected from org.apache.nifi.engine.FlowEngine@66ad5e5[Shutting down, pool size = 36, active threads = 1, queued tasks = 6, completed tasks = 75]
>         at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2063)
>         at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:830)
>         at java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:326)
>         at java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoolExecutor.java:533)
>         at org.apache.nifi.engine.FlowEngine.schedule(FlowEngine.java:87)
>         at org.apache.nifi.controller.service.StandardControllerServiceNode$2.run(StandardControllerServiceNode.java:431)
>         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)
> 
> Any help would be appreciated.
> 
> Thanks,
> 
> Shweta