Support Questions

Find answers, ask questions, and share your expertise

There was an issue loading properties (nifi-2.0.0-M4)

avatar
New Contributor

I am facing an issue with my Nifi as I am unable to access the Nifi anymore. I think this maybe because I have modified and replaced the nifi.properties file from the original downloaded version of the file.

When I try to run Nifi as a service using sudo service nifi start it does not start the service.

Here are the nifi-app.log that I can see... 

 

 ERROR [main] org.apache.nifi.NiFi Failure to launch NiFi
java.lang.IllegalArgumentException: There was an issue loading properties
        at org.apache.nifi.NiFi.initializeProperties(NiFi.java:361)
        at org.apache.nifi.NiFi.convertArgumentsToValidatedNiFiProperties(NiFi.java:343)
        at org.apache.nifi.NiFi.convertArgumentsToValidatedNiFiProperties(NiFi.java:339)
        at org.apache.nifi.NiFi.main(NiFi.java:331)
Caused by: java.lang.IllegalStateException: Sensitive Properties Key [nifi.sensitive.props.key] not found: See Admin Guide section [Updating t
        at org.apache.nifi.properties.NiFiPropertiesLoader.getDefaultProperties(NiFiPropertiesLoader.java:159)
        at org.apache.nifi.properties.NiFiPropertiesLoader.get(NiFiPropertiesLoader.java:138)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at org.apache.nifi.NiFi.initializeProperties(NiFi.java:356)
        ... 3 common frames omitted
2024-09-01 16:47:45,266 INFO [main] org.apache.nifi.NiFi Launching NiFi...
2024-09-01 16:47:45,306 INFO [main] o.a.nifi.properties.NiFiPropertiesLoader Loading Application Properties [/opt/nifi/./conf/nifi.properties]
2024-09-01 16:47:45,310 ERROR [main] o.a.nifi.properties.NiFiPropertiesLoader Flow Configuration [./conf/flow.json.gz] Found: Migration Requirrops.key]
2024-09-01 16:47:45,311 ERROR [main] org.apache.nifi.NiFi Failure to launch NiFi
java.lang.IllegalArgumentException: There was an issue loading properties
        at org.apache.nifi.NiFi.initializeProperties(NiFi.java:361)
        at org.apache.nifi.NiFi.convertArgumentsToValidatedNiFiProperties(NiFi.java:343)
        at org.apache.nifi.NiFi.convertArgumentsToValidatedNiFiProperties(NiFi.java:339)
        at org.apache.nifi.NiFi.main(NiFi.java:331)
Caused by: java.lang.IllegalStateException: Sensitive Properties Key [nifi.sensitive.props.key] not found: See Admin Guide section [Updating t
        at org.apache.nifi.properties.NiFiPropertiesLoader.getDefaultProperties(NiFiPropertiesLoader.java:159)
        at org.apache.nifi.properties.NiFiPropertiesLoader.get(NiFiPropertiesLoader.java:138)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at org.apache.nifi.NiFi.initializeProperties(NiFi.java:356)
        ... 3 common frames omitted

 

 I think the problematic area is this in the nifi.properties file.

 

nifi.security.autoreload.enabled=false
nifi.security.autoreload.interval=10 secs
nifi.security.keystore=./conf/keystore.p12
nifi.security.keystoreType=PKCS12
nifi.security.keystorePasswd=
nifi.security.keyPasswd=

 

 The keystorePasswd and keyPasswd properties are empty, while I am trying to run this on https with default settings.

Can someone please help me here ?

1 ACCEPTED SOLUTION

avatar
Master Mentor

@NaveedButt 

The exception you shared is complaining about the nifi.sensitive.props.key property not being set in the nifi.properties file at startup:

MattWho_0-1725896161791.png

This pops key value is used to encrypt all sensitive component properties created in the flow.json.gz as you build your dataflows via the NiFi canvas.

If you have not built any dataflows that utilize sensitive properties in the component configurations, you can just set some value and start your NiFi.  

If you have already existing dataflows on your NiFi canvas containing sensitive values set (passwords) in the configurtion(s), you'll need to retrieve the exact password from the original nifi.properties and use that.  If original props key is not set, NiFi will fail to start when it tries to load the flow.json.gz since it will not be able to decrypt those passwords using the new props key.

If you get stuck, you can carefully manually edit the flow.json.gz and remove all "enc{.....}" values.  This will allow you to start your NiFi using a new sensitive props key value; however, all your configured passwords will be cleared and you will need to enter them again into your various component configurations.

Please help our community thrive. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, 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

3 REPLIES 3

avatar
New Contributor

I tried creating the certificates using TinyCert.org and placing the corresponding files and properties in place.
I used this YouTube tutorial for generating the certificates and keys: https://www.youtube.com/watch?v=LanpbWR7Gv8
I am not sure how to generate and add the nifi.sensitive.props.key property. Can you point me to an article please ?

avatar
Master Mentor

@NaveedButt 

The exception you shared is complaining about the nifi.sensitive.props.key property not being set in the nifi.properties file at startup:

MattWho_0-1725896161791.png

This pops key value is used to encrypt all sensitive component properties created in the flow.json.gz as you build your dataflows via the NiFi canvas.

If you have not built any dataflows that utilize sensitive properties in the component configurations, you can just set some value and start your NiFi.  

If you have already existing dataflows on your NiFi canvas containing sensitive values set (passwords) in the configurtion(s), you'll need to retrieve the exact password from the original nifi.properties and use that.  If original props key is not set, NiFi will fail to start when it tries to load the flow.json.gz since it will not be able to decrypt those passwords using the new props key.

If you get stuck, you can carefully manually edit the flow.json.gz and remove all "enc{.....}" values.  This will allow you to start your NiFi using a new sensitive props key value; however, all your configured passwords will be cleared and you will need to enter them again into your various component configurations.

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

Thank you,
Matt

avatar
New Contributor

Thanks for the detailed reply. I added a new value in the nifi.properties and it worked as my installation was brand new, but did not know that the exact value needs to be copied over from the previous installation if we are configuring an old installation.

Thanks again.