Skip to main content
Jagapriyan
Silver ⭐️⭐️⭐️
May 23, 2024 1:04 PM UTC
Solved

MiniFi - nifi.sensitive.props.key is not set

I'm trying to run  miniFi  in ubuntu. When I try to start miniFi, I got following error in bootstrap and app log. 

App.log

2024-05-23 08:49:45,416 WARN [main] org.apache.nifi.util.FlowParser Schema validation error parsing Flow Configuration at line 22, col 29: cvc-complex-type.2.4.a: Invalid content was found starting with element 'maxConcurrentTasks'. One of '{bundle}' is expected.
2024-05-23 08:49:45,439 WARN [main] org.apache.nifi.util.FlowParser Schema validation error parsing Flow Configuration at line 99, col 28: cvc-complex-type.2.4.a: Invalid content was found starting with element 'networkInterface'. One of '{inputPort, outputPort}' is expected.
2024-05-23 08:49:45,833 INFO [main] o.a.nifi.headless.HeadlessNiFiServer Loading Flow...
2024-05-23 08:49:45,864 WARN [main] o.a.nifi.headless.HeadlessNiFiServer Failed to start headless server... shutting down.
java.lang.Exception: Unable to load flow due to: java.lang.IllegalArgumentException: NiFi Sensitive Properties Key [nifi.sensitive.props.key] is required
at org.apache.nifi.headless.HeadlessNiFiServer.start(HeadlessNiFiServer.java:176)
at org.apache.nifi.minifi.MiNiFi.<init>(MiNiFi.java:163)
at org.apache.nifi.minifi.MiNiFi.<init>(MiNiFi.java:64)
at org.apache.nifi.minifi.MiNiFi.main(MiNiFi.java:265)
Caused by: java.lang.IllegalArgumentException: NiFi Sensitive Properties Key [nifi.sensitive.props.key] is required
at org.apache.nifi.encrypt.PropertyEncryptorFactory.getPropertyEncryptor(PropertyEncryptorFactory.java:42)
at org.apache.nifi.headless.HeadlessNiFiServer.start(HeadlessNiFiServer.java:129)
... 3 common frames omitted
2024-05-23 08:49:45,864 INFO [Thread-0] org.apache.nifi.minifi.MiNiFi Initiating shutdown of MiNiFi server...
2024-05-23 08:49:45,883 WARN [Thread-0] o.a.nifi.headless.HeadlessNiFiServer Problem occurred ensuring flow controller or repository was properly terminated due to java.lang.NullPointerException
2024-05-23 08:49:45,896 ERROR [Thread-0] org.apache.nifi.BootstrapListener Failed to communicate with Bootstrap. Bootstrap may be unable to issue or receive commands from MiNiFi
2024-05-23 08:49:45,896 INFO [Thread-0] org.apache.nifi.minifi.MiNiFi MiNiFi server shutdown completed (nicely or otherwise).

 

Bootstrap  log

 

2024-05-23 08:49:45,416 WARN [main] org.apache.nifi.util.FlowParser Schema validation error parsing Flow Configuration at line 22, col 29: cvc-complex-type.2.4.a: Invalid content was found starting with element 'maxConcurrentTasks'. One of '{bundle}' is expected.
2024-05-23 08:49:45,439 WARN [main] org.apache.nifi.util.FlowParser Schema validation error parsing Flow Configuration at line 99, col 28: cvc-complex-type.2.4.a: Invalid content was found starting with element 'networkInterface'. One of '{inputPort, outputPort}' is expected.
2024-05-23 08:49:45,833 INFO [main] o.a.nifi.headless.HeadlessNiFiServer Loading Flow...
2024-05-23 08:49:45,864 WARN [main] o.a.nifi.headless.HeadlessNiFiServer Failed to start headless server... shutting down.
java.lang.Exception: Unable to load flow due to: java.lang.IllegalArgumentException: NiFi Sensitive Properties Key [nifi.sensitive.props.key] is required
at org.apache.nifi.headless.HeadlessNiFiServer.start(HeadlessNiFiServer.java:176)
at org.apache.nifi.minifi.MiNiFi.<init>(MiNiFi.java:163)
at org.apache.nifi.minifi.MiNiFi.<init>(MiNiFi.java:64)
at org.apache.nifi.minifi.MiNiFi.main(MiNiFi.java:265)
Caused by: java.lang.IllegalArgumentException: NiFi Sensitive Properties Key [nifi.sensitive.props.key] is required
at org.apache.nifi.encrypt.PropertyEncryptorFactory.getPropertyEncryptor(PropertyEncryptorFactory.java:42)
at org.apache.nifi.headless.HeadlessNiFiServer.start(HeadlessNiFiServer.java:129)
... 3 common frames omitted
2024-05-23 08:49:45,864 INFO [Thread-0] org.apache.nifi.minifi.MiNiFi Initiating shutdown of MiNiFi server...
2024-05-23 08:49:45,883 WARN [Thread-0] o.a.nifi.headless.HeadlessNiFiServer Problem occurred ensuring flow controller or repository was properly terminated due to java.lang.NullPointerException
2024-05-23 08:49:45,896 ERROR [Thread-0] org.apache.nifi.BootstrapListener Failed to communicate with Bootstrap. Bootstrap may be unable to issue or receive commands from MiNiFi
2024-05-23 08:49:45,896 INFO [Thread-0] org.apache.nifi.minifi.MiNiFi MiNiFi server shutdown completed (nicely or otherwise).

 

WayneF11
WayneF11Answer
Gold ⭐️
May 25, 2024 10:28 AM UTC

Hi,

The errors indicate that your miniFi configuration has some issues. Specifically, you need to set a value for nifi.sensitive.props.key in your nifi.properties file. Also, check the flow configuration file for any misplaced elements like ‘maxConcurrentTasks’ and ‘networkInterface’, and correct them according to the schema.

2 replies

MattWho
Titanium ⭐️⭐️
Titanium ⭐️⭐️
May 23, 2024 6:35 PM UTC

@Jagapriyan 

The exception is telling you that the following properties were not configured in the bootstrap.conf file for your MiNiFi:

nifi.minifi.sensitive.props.key= 
nifi.minifi.sensitive.props.algorithm=

 

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

Translate
WayneF11
WayneF11Answer
Gold ⭐️
May 25, 2024 10:28 AM UTC

Hi,

The errors indicate that your miniFi configuration has some issues. Specifically, you need to set a value for nifi.sensitive.props.key in your nifi.properties file. Also, check the flow configuration file for any misplaced elements like ‘maxConcurrentTasks’ and ‘networkInterface’, and correct them according to the schema.

Translate