Installing and Upgrading NiFi
Also available as:
PDF

Update the Configuration Files for Your New NiFi Installation

Use the configuration files from your existing NiFi installation to manually update the corresponding properties your new NiFi deployment.

Do not copy configuration files from your existing NiFi version to the new NiFi version. The newer configuration files may introduce new properties that would be lost if you copy and paste configuration files.

  1. Use the following table to update the configuration files located in <installation-directory>/conf.
  2. Double check all configured properties for typos.
Table 1. Configuration File Changes
Configuration file Necessary changes
state-management.xml

For the “local-provider” value, verify the location of “state/local” directory.

If you have retained the default location (./state/local), copy complete directory tree to new NiFi. The existing NiFi should be stopped if you are copying this directory because it may be constantly writing to this directory while running.

Configuration best practices recommend that you move the state to an external directory like /opt/nifi/configuration-resources/ to facilitate future upgrades.

If this is a NiFi cluster, the “cluster-provider” ZooKeeper “Connect String" should be using the same external ZooKeeper as the existing NiFi installation.

Hortonworks does not support using the NiFi embedded ZooKeeper.

If you are using a NiFi cluster, ensure that the new “cluster-provider” ZooKeeper "Root Node" values exactly match your previous values.

login-identity-providers.xml

If you used a provider value in your existing the NiFi installation, copy the <provider> … </provider> configuration from the existing NiFi installation to this file in your new NiFi installation.

logback.xml

If you added any custom logging modification to the existing NiFi, make those same changes to the new NiFi installation.

bootstrap.conf

Use the existing NiFi bootstrap.conf file to update properties in new NiFi.

If you are upgrading to HDF 3.0.x, you should add the following line:

java.arg.100=-Djavax.security.auth.useSubjectCredsOnly=true

bootstrap-notification-services.xml

Update the values based on values from the existing NiFi file.

authorizers.xml

Copy the <authorizer> …. </authorizer> configured in the current NiFi to new the NiFi file.

If you are using “file-provider”, ensure that you copy the users.xml and authorizations.xml files from the current to the new NiFi.

Configuration best practices recommend creating a separate location outside of he NiFi base directory for storing such configuration files: for example, /opt/nifi/configuration-resources/. If you are storing these files in a separate directory, you do not need to move them. Instead, ensure that the new NiFi is pointing to the same files.

nifi.properties

Use the current file to populate the same properties in the new NiFi nifi.properties file.

This file contains the majority of NiFi configuration settings, so ensure that you have copied the values correctly.

If you followed NiFi best practices, the following properties should be pointing to external directories outside of the base NiFi installation path.

If the properties point to directories inside the NiFi base installation path, you must copy the target directories to the new NiFi. Stop your current NiFi installation before you do this.

nifi.flow.configuration.file=

If you have retained the default value, (./conf/flow.xml.gz), copy flow.xml.gz from the current to the new NiFi base install conf directory.

Alternately, you can copy to an external location and update the property value to point there.

nifi.flow.configuration.archive.dir=

Same applies as above if you want to retain archived copies of the flow.xml.gz.

nifi.database.directory=

Best practices recommends that you use an external location for each repository. Point new NiFi at same external database repository location.

nifi.flowfile.repository.directory=

Best practices recommends that you use an external location for each repository. Point new NiFi at same external database repository location.

Note
Note

You may experience data loss if flowfile repositories are not accessible to new NiFi.

nifi.content.repository.directory.default=

Best practices recommends that you use an external location for each repository. Point new NiFi at same external database repository location.

Your current NiFi may have multiple content repos defined. Make sure exact same property names are used and point to appropriate matching content repo locations. For example:

nifi.content.repository.directory.content1=
nifi.content.repository.directory.conten2=
Note
Note

You may experience data loss if content repositories are not accessible to new NiFi.

Note
Note

You may experience data loss may if property names are wrong or the property points to wrong content repository.

nifi.provenance.repository.directory.default=

Best practices recommends that you use an external location for each repository. Point new NiFi at same external database repository location.

Your current NiFi might define multiple content repositories. . Ensure that your new installation uses the same property names and point to appropriate matching content repository locations.

For example:

nifi.provenance.repository.directory.provenance1=
nifi.provenance.repository.directory.provenance2=
Note
Note

You may not be able to query old events if you have not moved the provenance repositories or did not update the properties correctly.