Created 11-01-2017 08:20 PM
Hi,
When i initially setup NiFi instance i missed setting this property nifi.sensitive.props.key
Can i change it to have some value now..? If yes , Can i go ahead and put some value.?? Will my existing flows work or What is the best way to do it without loosing existing flows.
Regards,
Sai
Created 11-02-2017 09:10 PM
i found it in the documentation and successfully able to update my nifi.sensitive.props.key
https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#existing-flow-migration
Created 02-25-2022 12:24 PM
My nifi services are running on windows. Do we know how to set the nifi.sensitive.props.key.value since nish.sh can't be run on windows.
Also, according to https://cwiki.apache.org/confluence/display/NIFI/Migration+Guidance, it seems nifi.sensitive.props.key should be automatically generated upon first nifi start, which didn't happen for my 1.15.3 installation on windows.
Instead, I got following stack trace in nifi-app.log:
2022-02-25 15:13:11,748 ERROR [main] o.a.nifi.properties.NiFiPropertiesLoader Flow Configuration [.\conf\flow.xml.gz] Found: Migration Required for blank Sensitive Properties Key [nifi.sensitive.props.key]
2022-02-25 15:13:11,748 ERROR [main] org.apache.nifi.NiFi Failure to launch NiFi
java.lang.IllegalArgumentException: There was an issue decrypting protected properties
at org.apache.nifi.NiFi.initializeProperties(NiFi.java:373)
at org.apache.nifi.NiFi.convertArgumentsToValidatedNiFiProperties(NiFi.java:341)
at org.apache.nifi.NiFi.convertArgumentsToValidatedNiFiProperties(NiFi.java:337)
at org.apache.nifi.NiFi.main(NiFi.java:329)
Caused by: org.apache.nifi.properties.SensitivePropertyProtectionException: Sensitive Properties Key [nifi.sensitive.props.key] not found: See Admin Guide section [Updating the Sensitive Properties Key]
at org.apache.nifi.properties.NiFiPropertiesLoader.getDefaultProperties(NiFiPropertiesLoader.java:231)
at org.apache.nifi.properties.NiFiPropertiesLoader.get(NiFiPropertiesLoader.java:214)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.nifi.NiFi.initializeProperties(NiFi.java:368)
... 3 common frames omitted
Does anyone have any previous experience generating the key for a nifi migration on windows server?
Ming
Created 02-26-2022 05:21 PM
The NiFi binaries come with a run-nifi.bat in addition of nifi.sh.
André
Created 02-28-2022 06:03 AM
Hi! Thanks for responding to my question. But it doesn't seem run-nifi.bat supports switch set-sensitive-properties-key.
If you read run-status.bat, it has no logic to support switch "set-sensitive-properties-key".
Created 02-28-2022 03:45 PM
Good point! I hadn't noticed that.
Alternatively, you can download the NiFi Toolkit and use the encrypt-config.bat to perform the key migration.
Check this out: https://nifi.apache.org/docs/nifi-docs/html/toolkit-guide.html#sensitive-property-key-migration
The toolkit contains a Windows version of the script (encrypt-config.bat).
HTH,
André