- 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: Cannot load flow.xml.gz
- Labels:
-
Apache NiFi
Created ‎08-27-2018 11:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Recently had some disk issues with a NIFI node. Around the same time the cluster was yum updated causing additional issues. Once the cluster was back online all the services are restarted accept for NiFi. Within the nifi log i was able to find:
Cannot load flow.xml.gz
Moving the file (mv /var/lib/nifi/conf/flow.xml.gz to /var/lib/nifi/conf/flow.xml.gz.off) I was able to restart NiFi. Of course now my workflow has now been reset.
When I attempt to unpack the flowfile I get the following error:
gzip: flow.xml.gz: unexpected end of file
When I attempt to force the output(gunzip -c flow.xml.gz) I can see valid XML up to the point of error including the processor group I want to recover.
Is it possible to extract the xml objects from the output and rebuild the flow.xml.gz? I have most of my major work backed up with a template, but there is at least one processor group I was working on that was not saved as a template.
Created ‎08-27-2018 12:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Seems your flow.xml.gz got corrupted, perhaps as result of disk issues you mentioned. This file can be unzipped when not corrupted.
Maybe one of the cluster nodes has a non corrupted copy of this file? Also there is an archive directory with the previous flow.xml.gz files, perhaps you can use one of these to recover from this problem. (nifi.flow.configuration.archive.dir*)
HTH
*** If you found this answer addressed your question, please take a moment to login and click the "accept" link on the answer.
Created ‎08-27-2018 12:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Seems your flow.xml.gz got corrupted, perhaps as result of disk issues you mentioned. This file can be unzipped when not corrupted.
Maybe one of the cluster nodes has a non corrupted copy of this file? Also there is an archive directory with the previous flow.xml.gz files, perhaps you can use one of these to recover from this problem. (nifi.flow.configuration.archive.dir*)
HTH
*** If you found this answer addressed your question, please take a moment to login and click the "accept" link on the answer.
Created ‎08-27-2018 12:15 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Excellent Answer!! Thank you I had forgotten about the archive history.
I was able to restore the file too. It appears only the last 7 lines of xml were missing. After fixing the xml, making a new flow.xml.gz, copying that back into /var/lib/nifi/conf, and restarting NiFi my workflow is restored.
Was not really able to find a lot of matches here or online for "Cannot load flow.xml.gz" so I wanted to create this thread for anyone having these issues in the future.
