Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

NiFi startup Exception.

Solved Go to solution
Highlighted

NiFi startup Exception.

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

Accepted Solutions

Re: NiFi startup Exception.

Master Guru
@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

2 REPLIES 2

Re: NiFi startup Exception.

Master Guru
@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

Re: NiFi startup Exception.

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?

Don't have an account?
Coming from Hortonworks? Activate your account here