Mark Payne created NIFI-7944:
--------------------------------
Summary: When importing a flow from registry, Controller Service
may lose track of Referencing Components
Key: NIFI-7944
URL: https://issues.apache.org/jira/browse/NIFI-7944
Project: Apache NiFi
Issue Type: Bug
Components: Core Framework
Reporter: Mark Payne
Assignee: Mark Payne
Consider a flow with a Process Group "A". Within Process Group A is a child
Process Group, B. Process Group B has a Controller Service and has a Processor
that references it.
Save Process Group A into NiFi Registry.
Import Process Group A into NiFi. Step into the Process Group and configure the
child Process Group (Group B). Go to the Controller Services tab and configure
the Controller Service. The service will not show the Processor as a
Referencing component.
This can result in a few different problems:
* The Controller Service can be disabled while it's still being used.
* If the Controller Service is enabled, along with all Referencing Components,
those missing components won't show up.
* The Controller Service can be deleted while it's still being referenced.
This can lead to the following types of logs messages:
{code:java}
2020-10-23 13:43:41,898 ERROR [Timer-Driven Process Thread-7]
o.a.n.processors.standard.ConvertRecord
ConvertRecord[id=b07355c2-8bd7-33a5-35b5-264ade413185] Failed to process
StandardFlowFileRecord[uuid=824f5522-99d9-44cd-a685-eab697bdcf29,claim=StandardContentClaim
[resourceClaim=StandardResourceClaim[id=1603475011829-1, container=default,
section=1], offset=63,
length=14],offset=0,name=824f5522-99d9-44cd-a685-eab697bdcf29,size=14]; will
route to failure:
org.apache.nifi.controller.service.ControllerServiceDisabledException: Cannot
invoke method public abstract org.apache.nifi.serialization.record.RecordSchema
org.apache.nifi.serialization.RecordSetWriterFactory.getSchema(java.util.Map,org.apache.nifi.serialization.record.RecordSchema)
throws
org.apache.nifi.schema.access.SchemaNotFoundException,java.io.IOException on
Controller Service with identifier ca57bde0-517e-306a-ce46-10d6b8d24706 because
the Controller Service's State is currently DISABLED
org.apache.nifi.controller.service.ControllerServiceDisabledException: Cannot
invoke method public abstract org.apache.nifi.serialization.record.RecordSchema
org.apache.nifi.serialization.RecordSetWriterFactory.getSchema(java.util.Map,org.apache.nifi.serialization.record.RecordSchema)
throws
org.apache.nifi.schema.access.SchemaNotFoundException,java.io.IOException on
Controller Service with identifier ca57bde0-517e-306a-ce46-10d6b8d24706 because
the Controller Service's State is currently DISABLED
at
org.apache.nifi.controller.service.StandardControllerServiceInvocationHandler.invoke(StandardControllerServiceInvocationHandler.java:97)
at com.sun.proxy.$Proxy139.getSchema(Unknown Source)
at
org.apache.nifi.processors.standard.AbstractRecordProcessor$1.process(AbstractRecordProcessor.java:149)
at
org.apache.nifi.controller.repository.StandardProcessSession.write(StandardProcessSession.java:2971)
at
org.apache.nifi.processors.standard.AbstractRecordProcessor.onTrigger(AbstractRecordProcessor.java:122)
at
org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
at
org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1173)
at
org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:213)
at
org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:117)
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.runAndReset(FutureTask.java:308)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
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)
2020-10-23 13:43:51,907 ERROR [Timer-Driven Process Thread-6]
o.a.n.processors.standard.ConvertRecord
ConvertRecord[id=b07355c2-8bd7-33a5-35b5-264ade413185] Failed to process
StandardFlowFileRecord[uuid=597d9e36-3926-49d2-8f88-9200a917e29c,claim=StandardContentClaim
[resourceClaim=StandardResourceClaim[id=1603475011829-1, container=default,
section=1], offset=77,
length=14],offset=0,name=597d9e36-3926-49d2-8f88-9200a917e29c,size=14]; will
route to failure:
org.apache.nifi.controller.service.ControllerServiceDisabledException: Cannot
invoke method public abstract org.apache.nifi.serialization.record.RecordSchema
org.apache.nifi.serialization.RecordSetWriterFactory.getSchema(java.util.Map,org.apache.nifi.serialization.record.RecordSchema)
throws
org.apache.nifi.schema.access.SchemaNotFoundException,java.io.IOException on
Controller Service with identifier ca57bde0-517e-306a-ce46-10d6b8d24706 because
the Controller Service's State is currently DISABLED
org.apache.nifi.controller.service.ControllerServiceDisabledException: Cannot
invoke method public abstract org.apache.nifi.serialization.record.RecordSchema
org.apache.nifi.serialization.RecordSetWriterFactory.getSchema(java.util.Map,org.apache.nifi.serialization.record.RecordSchema)
throws
org.apache.nifi.schema.access.SchemaNotFoundException,java.io.IOException on
Controller Service with identifier ca57bde0-517e-306a-ce46-10d6b8d24706 because
the Controller Service's State is currently DISABLED
at
org.apache.nifi.controller.service.StandardControllerServiceInvocationHandler.invoke(StandardControllerServiceInvocationHandler.java:97)
at com.sun.proxy.$Proxy139.getSchema(Unknown Source)
at
org.apache.nifi.processors.standard.AbstractRecordProcessor$1.process(AbstractRecordProcessor.java:149)
at
org.apache.nifi.controller.repository.StandardProcessSession.write(StandardProcessSession.java:2971)
at
org.apache.nifi.processors.standard.AbstractRecordProcessor.onTrigger(AbstractRecordProcessor.java:122)
at
org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
at
org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1173)
at
org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:213)
at
org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:117)
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.runAndReset(FutureTask.java:308)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
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)
2020-10-23 13:44:01,900 ERROR [Timer-Driven Process Thread-3]
o.a.n.processors.standard.ConvertRecord
ConvertRecord[id=b07355c2-8bd7-33a5-35b5-264ade413185] Failed to process
StandardFlowFileRecord[uuid=0d71b72b-db77-4175-9deb-5f9290ea9d60,claim=StandardContentClaim
[resourceClaim=StandardResourceClaim[id=1603475011829-1, container=default,
section=1], offset=91,
length=14],offset=0,name=0d71b72b-db77-4175-9deb-5f9290ea9d60,size=14]; will
route to failure: java.lang.NullPointerException
java.lang.NullPointerException: null
at
org.apache.nifi.processors.standard.AbstractRecordProcessor$1.process(AbstractRecordProcessor.java:149)
at
org.apache.nifi.controller.repository.StandardProcessSession.write(StandardProcessSession.java:2971)
at
org.apache.nifi.processors.standard.AbstractRecordProcessor.onTrigger(AbstractRecordProcessor.java:122)
at
org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
at
org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1173)
at
org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:213)
at
org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:117)
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.runAndReset(FutureTask.java:308)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
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) {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)