Created on 03-25-2017 10:34 PM - edited 08-18-2019 03:22 AM
NiFi UI shows that there are ~47k FlowFiles pending, but when I try to list the files in queue, I get the message "The queue has no FlowFiles". Looking at the logs, I see the below. Any way to fix the issue without clearing repository files?
Error:
2017-03-15 15:43:44,165 WARN [Timer-Driven Process Thread-10] o.a.n.processors.standard.MergeContent MergeContent[id=015a1000-e3f5-15e4-c526-439d8b4f2216] Processor Administratively Yielded for 1 sec due to processing failure 2017-03-15 15:43:44,165 WARN [Timer-Driven Process Thread-10] o.a.n.c.t.ContinuallyRunProcessorTask Administratively Yielding MergeContent[id=015a1000-e3f5-15e4-c526-439d8b4f2216] due to uncaught Exception: org.apache.nifi.processor.exception.FlowFileHandlingException: StandardFlowFileRecord[uuid=eb725d22-3e02-4283-a0ed-9b2d4c92cbb9,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1489605322168-114661, container=default, section=997], offset=237240, length=217],offset=0,name=1379541586731942,size=217] is not the most recent version of this FlowFile within this session (StandardProcessSession[id=125718]) 2017-03-15 15:43:44,170 WARN [Timer-Driven Process Thread-10] o.a.n.c.t.ContinuallyRunProcessorTask org.apache.nifi.processor.exception.FlowFileHandlingException: StandardFlowFileRecord[uuid=eb725d22-3e02-4283-a0ed-9b2d4c92cbb9,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1489605322168-114661, container=default, section=997], offset=237240, length=217],offset=0,name=1379541586731942,size=217] is not the most recent version of this FlowFile within this session (StandardProcessSession[id=125718]) at org.apache.nifi.controller.repository.StandardProcessSession.migrate(StandardProcessSession.java:1121) ~[nifi-framework-core-1.1.2.jar:1.1.2] at org.apache.nifi.controller.repository.StandardProcessSession.migrate(StandardProcessSession.java:1102) ~[nifi-framework-core-1.1.2.jar:1.1.2] at org.apache.nifi.processor.util.bin.Bin.offer(Bin.java:142) ~[na:na] at org.apache.nifi.processor.util.bin.BinManager.offer(BinManager.java:194) ~[na:na] at org.apache.nifi.processor.util.bin.BinFiles.binFlowFiles(BinFiles.java:279) ~[na:na] at org.apache.nifi.processor.util.bin.BinFiles.onTrigger(BinFiles.java:178) ~[na:na] at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1099) ~[nifi-framework-core-1.1.2.jar:1.1.2] at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:136) [nifi-framework-core-1.1.2.jar:1.1.2] at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47) [nifi-framework-core-1.1.2.jar:1.1.2] at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:132) [nifi-framework-core-1.1.2.jar:1.1.2] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_121] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_121] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_121] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_121] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_121] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_121] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] 2017-03-15 15:43:45,185 ERROR [Timer-Driven Process Thread-9] o.a.n.processors.standard.MergeContent MergeContent[id=015a1000-e3f5-15e4-c526-439d8b4f2216] MergeContent[id=015a1000-e3f5-15e4-c526-439d8b4f2216] failed to process session due to org.apache.nifi.processor.exception.FlowFileHandlingException: StandardFlowFileRecord[uuid=8ffd891d-baa5-46d2-8ddd-733518c2aa94,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1489606333097-5, container=default, section=5], offset=19170, length=216],offset=0,name=844025400925,size=216] is not the most recent version of this FlowFile within this session (StandardProcessSession[id=125721]): org.apache.nifi.processor.exception.FlowFileHandlingException: StandardFlowFileRecord[uuid=8ffd891d-baa5-46d2-8ddd-733518c2aa94,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1489606333097-5, container=default, section=5], offset=19170, length=216],offset=0,name=844025400925,size=216] is not the most recent version of this FlowFile within this session (StandardProcessSession[id=125721])
Created 03-26-2017 01:27 AM
This looks like a bug in the processor, which processor is the "split" relationship going to? If a custom processor, can you share part/all of the relevant code? If it is a built-in processor please feel free to file a Jira as this should be handled better, if it is a custom processor, make sure you are keeping a reference to the latest version of the flow file (new versions are returned by various ProcessSession methods) and only transfer the latest version. A common error is when a custom processor/script forgets to save off the latest flow file reference from a call to ProcessSession.putAttribute() for example.
Created 03-26-2017 03:51 PM
MergeContent is the next processor in the flow. Is there sample code of what saving a reference to the latest flow file version looks like?
Created 07-18-2017 10:33 AM
We have a similar problem. A MergeContent processor giving out 'is not the most recent version of thisFlowFile within this session' and 'is not known in this session' errors.
Also we have the 'phantom' queue that you describe. A large queue that the processor does not process. But when we restart NiFi the queue drops the zero.