Support Questions

Find answers, ask questions, and share your expertise

Error while trying to upgrade nifi-registry from 1.25.0 to 2.0.0M1

avatar
New Contributor

Error while trying to upgrade nifi-registry from 1.25.0 to 2.0.0M1
-------------------------------------------------------------------------------------------------------------------
Error :

 ERROR [main] o.springframework.boot.SpringApplication Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'accessResource' defined in file [/opt/nifi-registry/nifi-registry-current/work/jetty/nifi-registry-web-api-2.0.0-M1.war/webapp/WEB-INF/classes/org/apache/nifi/registry/web/api/AccessResource.class]: Unsatisfied dependency expressed through constructor parameter 5: Error creating bean with name 'getIdentityProvider' defined in class path resource [org/apache/nifi/registry/security/authentication/IdentityProviderFactory.class]: Failed to instantiate [org.apache.nifi.registry.security.authentication.IdentityProvider]: Factory method 'getIdentityProvider' threw exception with message: Identity Provider configuration XML was protected using aes/gcm/256, which is not supported. Cannot configure this Identity Provider due to failing to decrypt protected configuration properties.
-----------------------------------------------------------------------------------------------------------------
Java home: /usr/lib/jvm/jdk-21.0.1-bellsoft-x86_64
Encrypt config command using nifi toolkit :
./encrypt-config.sh --nifiRegistry -v -r nifi-registry.properties -a authorizers.xml -i identity-providers.xml -p "XXXXXXX" -b bootstrap.conf

Logs after encrypting :

[main] INFO org.apache.nifi.toolkit.config.command.RegistryEncryptConfig - Neither Migration Bootstrap Root Key nor Migration Bootstrap Password specified
[main] INFO org.apache.nifi.toolkit.config.command.RegistryEncryptConfig - Bootstrap Root Key Derivation started
[main] INFO org.apache.nifi.registry.properties.NiFiRegistryPropertiesLoader - Loaded 46 properties from /opt/nifi-registry/nifi-registry-current/conf/nifi-registry.properties
[main] INFO org.apache.nifi.toolkit.config.command.RegistryEncryptConfig - Bootstrap Root Key Derivation started
[main] INFO org.apache.nifi.toolkit.config.command.RegistryEncryptConfig - Started processing Bootstrap Configuration [bootstrap.conf]
[main] INFO org.apache.nifi.toolkit.config.command.RegistryEncryptConfig - Completed processing Bootstrap Configuration [bootstrap.conf]
[main] INFO org.apache.nifi.toolkit.config.command.RegistryEncryptConfig - Started processing Application Properties [nifi-registry.properties]
[main] INFO org.apache.nifi.toolkit.config.command.RegistryEncryptConfig - Bootstrap Root Key Derivation started
[main] INFO org.apache.nifi.toolkit.config.command.RegistryEncryptConfig - Completed processing Application Properties [nifi-registry.properties]
[main] INFO org.apache.nifi.toolkit.config.command.RegistryEncryptConfig - Started processing Authorizers [authorizers.xml]
[main] INFO org.apache.nifi.toolkit.config.command.RegistryEncryptConfig - Bootstrap Root Key Derivation started
[main] INFO org.apache.nifi.toolkit.config.command.RegistryEncryptConfig - Bootstrap Root Key Derivation started
[main] INFO org.apache.nifi.toolkit.config.command.RegistryEncryptConfig - Completed processing Authorizers [authorizers.xml]
[main] INFO org.apache.nifi.toolkit.config.command.RegistryEncryptConfig - Started processing Identity Providers [identity-providers.xml]
[main] INFO org.apache.nifi.toolkit.config.command.RegistryEncryptConfig - Bootstrap Root Key Derivation started
[main] INFO org.apache.nifi.toolkit.config.command.RegistryEncryptConfig - Bootstrap Root Key Derivation started
[main] INFO org.apache.nifi.toolkit.config.command.RegistryEncryptConfig - Completed processing Identity Providers [identity-providers.xml]

1 ACCEPTED SOLUTION

avatar
Master Mentor

@Tiger_Name 

The encrypt-config toolkit was deprecated and removed in the Apache NiFi 2.0.0 release.
https://issues.apache.org/jira/browse/NIFI-13414

It was refactored in 2.0.0-M1 (milestone 1) before it was deprecated and removed completely:
https://issues.apache.org/jira/browse/NIFI-12243

Your exception sounds like something was not set correctly with regards to the master key in the bootstrap.conf.  I'd double check to make sure you set that value correctly.

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

4 REPLIES 4

avatar
Community Manager

@Tiger_Name, Welcome to our community! To help you get the best possible answer, I have tagged our NiFi experts @SAMSAL @MattWho  who may be able to assist you further.

Please feel free to provide any additional information or details about your query, and we hope that you will find a satisfactory solution to your question.



Regards,

Vidya Sargur,
Community Manager


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:

avatar
Master Mentor

@Tiger_Name 

The issue you described matches up very well with https://issues.apache.org/jira/browse/NIFI-10018 which caused by https://issues.apache.org/jira/browse/NIFI-9988.

While these jiras point at an issue in Apache NiFi 1.16.1, you are using the first milestone (M1) releases of Apache NiFi 2.0.0.  So it quite possible that this issue may have been ported into the early milestone release.  

I would recommend downloading the latest milestone release of Apache NiFi 2.0.0-Mx, which at time of writing this is M4, to see if startup issue still presents itself.

Please help our community grow. 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

Hi @MattWho 

Seems the 2.0.0-M4 Nifi toolkit does not have an option to encrypt(encrypt-config).
When compared to lower versions of nifi toolkit -1.0.xx .
Will there be a fix for this issue on any upcoming Milestone versions?


image.png

avatar
Master Mentor

@Tiger_Name 

The encrypt-config toolkit was deprecated and removed in the Apache NiFi 2.0.0 release.
https://issues.apache.org/jira/browse/NIFI-13414

It was refactored in 2.0.0-M1 (milestone 1) before it was deprecated and removed completely:
https://issues.apache.org/jira/browse/NIFI-12243

Your exception sounds like something was not set correctly with regards to the master key in the bootstrap.conf.  I'd double check to make sure you set that value correctly.

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