Running a manual migration precheck for NiFi managed by Cloudera Manager

You can perform a manual migration precheck directly from the command line on your NiFi nodes even if NiFi is managed by Cloudera Manager. This method provides administrators with more control and is useful in scenarios that require or prefer a manual process. Follow the below steps to perform a precheck directly from the command line.

  1. Switch the user to NiFi using su nifi.
  2. Find the location of these files.
    1. pre_upgrade_check.py
    2. CFM4-Deprecated-components.csv
    3. NiFi-1.x-components-with-legacy-Kerberos-properties.csv
  3. Identify the ${NIFI_WORKING_DIRECTORY} environment variable, which can be found in stdout.log during NiFi startup.
  4. Use Python3 to run the script with the following command, replacing the placeholders with the actual paths.
    python3 [***/path/to***]/pre_upgrade_check.py \
    "${NIFI_WORKING_DIRECTORY}/flow.json.gz" \
    "[***/path/to***]/CFM4-Deprecated-components.csv" \
    "[***/path/to***]/NiFi-1.x-components-with-legacy-Kerberos-properties.csv" \
    "[***NIFI_WORKING_DIRECTORY***]/config_backup/bootstrap.conf" \
    "${CUSTOM_JAVA_HOME}"
    
  5. If necessary, specify the ${CUSTOM_JAVA_HOME} argument.
    This should be set if the JAVA_HOME environment variable for the "nifi" user is different from the JAVA_HOME you are using to run the NiFi service.
  6. Once all file paths are updated in the command, run it to start the pre-upgrade check.