Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

NiFi startup Exception.

avatar

I am getting following exception while starting the NiFi instance. Any insight will be helpful.

016-10-14 17:38:12,152 ERROR [NiFi logging handler] org.apache.nifi.StdErr Failed to start web server: Error creating bean with name 'niFiWebApiSecurityConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void org.apache.nifi.web.NiFiWebApiSecurityConfiguration.setUserDetailsService(org.springframework.security.core.userdetails.AuthenticationUserDetailsService); nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDetailsService' defined in class path resource [nifi-web-security-context.xml]: Cannot resolve reference to bean 'userService' while setting bean property 'userService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService' defined in class path resource [nifi-administration-context.xml]: Cannot resolve reference to bean 'userTransactionBuilder' while setting bean property 'transactionBuilder'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userTransactionBuilder' defined in class path resource [nifi-administration-context.xml]: Cannot resolve reference to bean 'authorityProvider' while setting bean property 'authorityProvider'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'clusterManager' defined in class path resource [nifi-cluster-manager-context.xml]: Cannot resolve reference to bean 'stringEncryptor' while setting bean property 'encryptor'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'stringEncryptor' defined in class path resource [nifi-context.xml]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.nifi.encrypt.StringEncryptor]: Factory method 'createEncryptor' threw exception; nested exception is org.apache.nifi.encrypt.EncryptionException: Cannot initialize sensitive property encryptor 2016-10-14 17:38:12,152 ERROR [NiFi logging handler] org.apache.nifi.StdErr Shutting down...

1 ACCEPTED SOLUTION

avatar
Super Mentor
@milind pandit

Is this a flow.xml.gz you copied from another instance of NiFi? All the sensitive properties inside the flow.xml.gz file are encrypted using the sensitive property defined in the nifi.properties file (If blank NiFi uses and internal default). If you move your flow.xml.gz file to another NiFi, the sensitive property value used must be the same or NiFi will fail to start because it cannot decrypt the sensitive properties in the file.

Matt

View solution in original post

2 REPLIES 2

avatar
Super Mentor
@milind pandit

Is this a flow.xml.gz you copied from another instance of NiFi? All the sensitive properties inside the flow.xml.gz file are encrypted using the sensitive property defined in the nifi.properties file (If blank NiFi uses and internal default). If you move your flow.xml.gz file to another NiFi, the sensitive property value used must be the same or NiFi will fail to start because it cannot decrypt the sensitive properties in the file.

Matt

avatar

I didnt copy the flow.xml.gz but imported some templates which must have updated the flow.xml. Whats the fix to restart the NiFi instance?