- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Nifi showing blank Canvas How to recover jobs?
- Labels:
-
Apache NiFi
Created 10-05-2021 10:57 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am using nifi 1.14. My entire workflow has been crashed and suddenly Nifi is showing blank canvas. Is there any safe way to recover all the jobs?
Please provide step by step solution. Any help in this issue will be greatly appreciated.
Thank You!
Created 10-06-2021 06:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Everything you do via the NiFi canvas when building out your dataflows is preserved in the flow.xml.gz file written to disk. On NiFi service start, the flow.xml.gz is loaded in to memory and and then FlowFiles from the the flowfile_repository are loaded back in to the dataflow connections they were last in prior to NiFi being stopped.
In order for your your canvas to be blank on NiFi service startup, that flow.xml.gz is missing.
By default NiFi creates an archived copy of the flow.xml.gz each time a change is made.
The following properties from the nifi.properties file control where the flow.xml.gz is written and if/how the archiving is setup:
Recovering the flow from archive is as simple as copying the latest "<timesatmp>_flow.xml.gz" from the configured archive directory to the configured NiFi configuration file location and renaming it to "flow.xml.gz". Make sure proper ownership and permissions are set after you copy and rename (Must be owned and accessible by the NiFi service user).
As a future suggestion:
- Another way to protect against a total loss of your flow is running a NiFi cluster instead of a single NiFi instance. In a NiFi cluster, every NiFi node preserves its own identical copy of the flow.xml.gz file. So should catastrophe strike on one of the nodes, you can simply copy the flow.xml.gz from any one of the other nodes to recover the bad node.
If you found this response assisted with your query, please take a moment to login and click on "Accept as Solution" below this post.
Thank you,
Matt
Created 10-06-2021 06:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Everything you do via the NiFi canvas when building out your dataflows is preserved in the flow.xml.gz file written to disk. On NiFi service start, the flow.xml.gz is loaded in to memory and and then FlowFiles from the the flowfile_repository are loaded back in to the dataflow connections they were last in prior to NiFi being stopped.
In order for your your canvas to be blank on NiFi service startup, that flow.xml.gz is missing.
By default NiFi creates an archived copy of the flow.xml.gz each time a change is made.
The following properties from the nifi.properties file control where the flow.xml.gz is written and if/how the archiving is setup:
Recovering the flow from archive is as simple as copying the latest "<timesatmp>_flow.xml.gz" from the configured archive directory to the configured NiFi configuration file location and renaming it to "flow.xml.gz". Make sure proper ownership and permissions are set after you copy and rename (Must be owned and accessible by the NiFi service user).
As a future suggestion:
- Another way to protect against a total loss of your flow is running a NiFi cluster instead of a single NiFi instance. In a NiFi cluster, every NiFi node preserves its own identical copy of the flow.xml.gz file. So should catastrophe strike on one of the nodes, you can simply copy the flow.xml.gz from any one of the other nodes to recover the bad node.
If you found this response assisted with your query, please take a moment to login and click on "Accept as Solution" below this post.
Thank you,
Matt
Created 10-06-2021 12:53 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Matt,
Thank you for your suggestion I've recovered it by using flow.xml.gz file.