Support Questions

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

NiFi: Cannot load flow.xml.gz

avatar
Super Guru

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.

1 ACCEPTED SOLUTION

avatar

@Steven Matison

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.

View solution in original post

2 REPLIES 2

avatar

@Steven Matison

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.

avatar
Super Guru

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.