Support Questions

Find answers, ask questions, and share your expertise

Nifi flowFile content changes spontaneously

avatar
Contributor

I have a problem like this.I am using ApacheNifi nifi-1.23.0 version.Generate flowFile with GenerateFlowFile processor as follows.When I view the content, I see that it is as I shared below.As far as I understand, it mixes the content I triggered with a different content.What could be the reason for this?

 

plapla_0-1697792116368.png

 

plapla_1-1697792630867.png

 

 

2 ACCEPTED SOLUTIONS

avatar
Master Mentor

@plapla 

It sounds like you may be hitting https://issues.apache.org/jira/browse/NIFI-11971 that affects Apache NiFI 1.23.0 and 1.23.1.  It has been addressed in Apache NiFi 1.23.2, so please upgrade to that latest version:
https://nifi.apache.org/download.html

This bug fix is already included in the CFM 2.1.6 release and was not a bug in earlier CFM releases:
https://docs.cloudera.com/cfm/2.1.6/release-notes/topics/cfm-fixed-issues.html

If you found any of the suggestions/solutions provided helped you with your issue, please take a moment to login and click "Accept as Solution" on one or more of them that helped.

Thank you,
Matt



View solution in original post

avatar
Master Mentor

@plapla 

Apache NiFi does not have any automated upgrade capability.  It is a fully manual process.

A typical installation involves downloading the NiFi <version> tar.gz and unpacking it.  Unplacking it creates a directory based in that NiFi's version.

An upgrade would involve downloading the newer version of NiFi and reading the release notes covering all version between your current version and version you are upgrading to.
You'll be looking for anything that may be impactful to your dataflow or installation. I don;t see anything of concern between 1.23.0 and 1.23.2.

There are also some old documentation related to upgrades here:
https://cwiki.apache.org/confluence/display/NIFI/1.x.0+to+1.x.0+Upgrade
But still relevant.

Bottom line is you are going to configure the same configuration files found in the NiFi conf file of the new version using the same config files from old version.
Make sure that your new NiFi version nifi.properties file configuration related to state, content_repository, provenance_repository, and FlowFile_repository are all pointing to the same directories as the old NiFi version is using.  Default configs point at subdirectories within that versions deployment, so be careful.  Make sure to use same sensitive props key as well.  Somethimes new version introduce new properties in the config files.  If no new properties were added you can continue to use original config file.   You'll also need to copy over your flow.json.gz which holds everything you added/built via the NiFi UI, users.xml and authorizations.xml files (holds all yoru users and groups and their associated authorizations.

Then you can stop the old NiFi and start new.

In your case you are simply upgrading to a new patch version of 1.23.0 to 1.23.2, so it is very unlikely that any configurations changed.  For you, you could just download the new version 1.23.2, unpack it.  On old version:

  1. Stop NiFi
  2. rename lib directory to lib_1.23.0
  3. copy lib directory from NiFi 1.23.2 you just unpacked in to your 1.23.0 installation.
  4. Make sure all file ownership and permissions are correct.
  5. Delete NiFi "work" directory.
  6. start you NiFi

On startup NiFi will recreate the work directory and unpack the new nar versions there. NiFi will then load your flow.json.gz.  For each component class it finds in the flow.json.gz,  it will upgrade the component to the newer version (only works if only one version for a given component exists, so do not copy new lib inside of old lib directory.). 

If you found any of the suggestions/solutions provided helped you with your issue, please take a moment to login and click "Accept as Solution" on one or more of them that helped.

Thank you,
Matt



View solution in original post

7 REPLIES 7

avatar
Master Mentor

@plapla 

It sounds like you may be hitting https://issues.apache.org/jira/browse/NIFI-11971 that affects Apache NiFI 1.23.0 and 1.23.1.  It has been addressed in Apache NiFi 1.23.2, so please upgrade to that latest version:
https://nifi.apache.org/download.html

This bug fix is already included in the CFM 2.1.6 release and was not a bug in earlier CFM releases:
https://docs.cloudera.com/cfm/2.1.6/release-notes/topics/cfm-fixed-issues.html

If you found any of the suggestions/solutions provided helped you with your issue, please take a moment to login and click "Accept as Solution" on one or more of them that helped.

Thank you,
Matt



avatar
Contributor

Thank you for your return.Is there a stable version you can recommend?

Is there a way to update these additionally?

avatar
Master Mentor

@plapla 
As I mentioned in my original response, you will want tp upgrade to Apache NiFi 1.23.2+
https://nifi.apache.org/download.html

I m not clear on this ask?

Is there a way to update these additionally?

Update what additionally?

If you found any of the suggestions/solutions provided helped you with your issue, please take a moment to login and click "Accept as Solution" on one or more of them that helped.

Thank you,
Matt

avatar
Contributor

I wanted to ask if there is a way to upgrade Apache NiFi 1.23.2+

avatar
Master Mentor

@plapla 

Apache NiFi does not have any automated upgrade capability.  It is a fully manual process.

A typical installation involves downloading the NiFi <version> tar.gz and unpacking it.  Unplacking it creates a directory based in that NiFi's version.

An upgrade would involve downloading the newer version of NiFi and reading the release notes covering all version between your current version and version you are upgrading to.
You'll be looking for anything that may be impactful to your dataflow or installation. I don;t see anything of concern between 1.23.0 and 1.23.2.

There are also some old documentation related to upgrades here:
https://cwiki.apache.org/confluence/display/NIFI/1.x.0+to+1.x.0+Upgrade
But still relevant.

Bottom line is you are going to configure the same configuration files found in the NiFi conf file of the new version using the same config files from old version.
Make sure that your new NiFi version nifi.properties file configuration related to state, content_repository, provenance_repository, and FlowFile_repository are all pointing to the same directories as the old NiFi version is using.  Default configs point at subdirectories within that versions deployment, so be careful.  Make sure to use same sensitive props key as well.  Somethimes new version introduce new properties in the config files.  If no new properties were added you can continue to use original config file.   You'll also need to copy over your flow.json.gz which holds everything you added/built via the NiFi UI, users.xml and authorizations.xml files (holds all yoru users and groups and their associated authorizations.

Then you can stop the old NiFi and start new.

In your case you are simply upgrading to a new patch version of 1.23.0 to 1.23.2, so it is very unlikely that any configurations changed.  For you, you could just download the new version 1.23.2, unpack it.  On old version:

  1. Stop NiFi
  2. rename lib directory to lib_1.23.0
  3. copy lib directory from NiFi 1.23.2 you just unpacked in to your 1.23.0 installation.
  4. Make sure all file ownership and permissions are correct.
  5. Delete NiFi "work" directory.
  6. start you NiFi

On startup NiFi will recreate the work directory and unpack the new nar versions there. NiFi will then load your flow.json.gz.  For each component class it finds in the flow.json.gz,  it will upgrade the component to the newer version (only works if only one version for a given component exists, so do not copy new lib inside of old lib directory.). 

If you found any of the suggestions/solutions provided helped you with your issue, please take a moment to login and click "Accept as Solution" on one or more of them that helped.

Thank you,
Matt



avatar
Contributor

@MattWho  Thank you very much for your answers.

I upgraded the 1.23.2 version and I have not seen any problems so far

Only I started DistributedMapCacheClientService on Controller Services.when i try to start FetchDistributedMapCache processor got an error "AnnotatedConnectException: Connection refused".Do you have any comments on this situation?

plapla_0-1698390866741.png

 

plapla_1-1698391119629.png

 

avatar
Master Mentor

@plapla 
This is a completed unrelated issue to the question in this thread.
To avoid confusion within the community we should keep unrelated queries in different posts.
Please start a new community question for this new query.  
Fee free to use @MattWho in your new question so i get notified about it.

Thank you,
Matt