Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Nifi Failed while executing one of processor's OnScheduled task

avatar
Contributor

2017-07-04 13:10:15,329 ERROR [StandardProcessScheduler Thread-1] o.a.n.controller.StandardProcessorNode Failed to invoke @OnScheduled method due to java.lang.RuntimeException: Failed while executing one of processor's OnScheduled task. java.lang.RuntimeException: Failed while executing one of processor's OnScheduled task. at org.apache.nifi.controller.StandardProcessorNode.invokeTaskAsCancelableFuture(StandardProcessorNode.java:1482) at org.apache.nifi.controller.StandardProcessorNode.access$000(StandardProcessorNode.java:102) at org.apache.nifi.controller.StandardProcessorNode$1.run(StandardProcessorNode.java:1303) 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:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.util.concurrent.ExecutionException: java.lang.reflect.InvocationTargetException at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:206) at org.apache.nifi.controller.StandardProcessorNode.invokeTaskAsCancelableFuture(StandardProcessorNode.java:1465) ... 9 common frames omitted Caused by: java.lang.reflect.InvocationTargetException: null at sun.reflect.GeneratedMethodAccessor498.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:137) at org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:125) at org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:70) at org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotation(ReflectionUtils.java:47) at org.apache.nifi.controller.StandardProcessorNode$1$1.call(StandardProcessorNode.java:1307) at org.apache.nifi.controller.StandardProcessorNode$1$1.call(StandardProcessorNode.java:1303) ... 6 common frames omitted Caused by: java.io.IOException: Failed to properly migrate state to State Manager at org.apache.nifi.processor.util.list.AbstractListProcessor.updateState(AbstractListProcessor.java:206) ... 15 common frames omitted Caused by: java.net.ConnectException: Connection refused at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:111) at org.apache.nifi.distributed.cache.client.StandardCommsSession.<init>(StandardCommsSession.java:52) at org.apache.nifi.distributed.cache.client.DistributedMapCacheClientService.createCommsSession(DistributedMapCacheClientService.java:306) at org.apache.nifi.distributed.cache.client.DistributedMapCacheClientService.leaseCommsSession(DistributedMapCacheClientService.java:321) at org.apache.nifi.distributed.cache.client.DistributedMapCacheClientService.withCommsSession(DistributedMapCacheClientService.java:376) at org.apache.nifi.distributed.cache.client.DistributedMapCacheClientService.get(DistributedMapCacheClientService.java:190) at sun.reflect.GeneratedMethodAccessor499.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.nifi.controller.service.StandardControllerServiceInvocationHandler.invoke(StandardControllerServiceInvocationHandler.java:89) at com.sun.proxy.$Proxy114.get(Unknown Source) at org.apache.nifi.processor.util.list.AbstractListProcessor.migrateState(AbstractListProcessor.java:239) at org.apache.nifi.processor.util.list.AbstractListProcessor.updateState(AbstractListProcessor.java:204) ... 15 common frames omitted

1 REPLY 1

avatar
Master Guru

This error is showing that one of your "List" processors is starting and its attempting to migrate the state information from the old way of storing state in the DistributedMapCache, to the new way in the StateManager (ZK or local WAL).

The error is because the processor has a DistributedMapCacheClient configured and the client can't connect to the DistributedMapCacheServer.

If you have state that you believe needs to be migrated, then ensure that the DistributedCachServer is correctly configured and running, and ensure the DistributedCacheClient is configured with the correct host and port for where the server is running.

If you don't have old state that needs to be migrated, just change your "List" processor so that it doesn't use a DistributedMapCacheClient and then it will skip over this migration. The cache client was only required in older versions of NiFi before the internal StateManager was introduced.