Support Questions

Find answers, ask questions, and share your expertise

Nifi registry 1.24 is not starting

avatar
Master Collaborator

Hello experts,

I have downloaded and trying to run nifi registry 1.24 with meta data db as mysql and Git flow persistence.

Getting below error and unable to start the service - 

hegdemahendra_0-1708535950042.png

log in text : 

2024-02-21 16:11:13,716 INFO [main] o.a.n.registry.bootstrap.RunNiFiRegistry Runtime Java version: 11.0.14
2024-02-21 16:11:13,725 INFO [main] o.apache.nifi.registry.bootstrap.Command Starting Apache NiFi Registry...
2024-02-21 16:11:13,725 INFO [main] o.apache.nifi.registry.bootstrap.Command Working Directory: /usr/independent_nifi/nifi-registry-1.24.0
2024-02-21 16:11:13,726 INFO [main] o.apache.nifi.registry.bootstrap.Command Command: java -classpath /usr/independent_ni.............................
2024-02-21 16:11:13,743 INFO [main] o.apache.nifi.registry.bootstrap.Command Launched Apache NiFi Registry with Process ID 19099
2024-02-21 16:11:14,447 INFO [NiFi Registry Bootstrap Command Listener] o.a.n.registry.bootstrap.RunNiFiRegistry Apache NiFi Registry now running and listening for Bootstrap requests on port 37730
2024-02-21 16:11:17,712 INFO [NiFi logging handler] org.apache.nifi.registry.StdOut
2024-02-21 16:11:17,712 INFO [NiFi logging handler] org.apache.nifi.registry.StdOut Apache NiFi _ _
2024-02-21 16:11:17,712 INFO [NiFi logging handler] org.apache.nifi.registry.StdOut _ __ ___ __ _(_)___| |_ _ __ _ _
2024-02-21 16:11:17,712 INFO [NiFi logging handler] org.apache.nifi.registry.StdOut | '__/ _ \/ _` | / __| __| '__| | | |
2024-02-21 16:11:17,712 INFO [NiFi logging handler] org.apache.nifi.registry.StdOut | | | __/ (_| | \__ \ |_| | | |_| |
2024-02-21 16:11:17,713 INFO [NiFi logging handler] org.apache.nifi.registry.StdOut |_| \___|\__, |_|___/\__|_| \__, |
2024-02-21 16:11:17,713 INFO [NiFi logging handler] org.apache.nifi.registry.StdOut ==========|___/================|___/=
2024-02-21 16:11:17,713 INFO [NiFi logging handler] org.apache.nifi.registry.StdOut v
2024-02-21 16:11:17,713 INFO [NiFi logging handler] org.apache.nifi.registry.StdOut
2024-02-21 16:11:20,550 ERROR [NiFi logging handler] org.apache.nifi.registry.StdErr Wed Feb 21 16:11:20 UTC 2024 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
2024-02-21 16:11:21,763 ERROR [NiFi logging handler] org.apache.nifi.registry.StdErr Server start failed: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'accessPolicyResource' defined in file [/usr/independent_nifi/nifi-registry-1.24.0/work/jetty/nifi-registry-web-api-1.24.0.war/webapp/WEB-INF/classes/org/apache/nifi/registry/web/api/AccessPolicyResource.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'standardServiceFacade' defined in file [/usr/independent_nifi/nifi-registry-1.24.0/work/jetty/nifi-registry-web-api-1.24.0.war/webapp/WEB-INF/classes/org/apache/nifi/registry/web/service/StandardServiceFacade.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'registryService' defined in URL [jar:file:/usr/independent_nifi/nifi-registry-1.24.0/work/jetty/nifi-registry-web-api-1.24.0.war/webapp/WEB-INF/lib/nifi-registry-framework-1.24.0.jar!/org/apache/nifi/registry/service/RegistryService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'databaseMetadataService' defined in URL [jar:file:/usr/independent_nifi/nifi-registry-1.24.0/work/jetty/nifi-registry-web-api-1.24.0.war/webapp/WEB-INF/lib/nifi-registry-framework-1.24.0.jar!/org/apache/nifi/registry/db/DatabaseMetadataService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flyway' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.flywaydb.core.Flyway]: Factory method 'flyway' threw exception; nested exception is org.flywaydb.core.api.FlywayException: Unable to obtain connection from Flyway DataSource
2024-02-21 16:11:22,745 INFO [main] o.a.n.registry.bootstrap.RunNiFiRegistry NiFi Registry never started. Will not restart NiFi Registry

 

nifi-registry.properties:

nifi.registry.web.war.directory=./lib
nifi.registry.web.http.host=nifi12-dev.xyz.com
nifi.registry.web.http.port=61080
nifi.registry.web.https.host=
nifi.registry.web.https.port=
nifi.registry.web.https.application.protocols=http/1.1
nifi.registry.web.jetty.working.directory=./work/jetty
nifi.registry.web.jetty.threads=200
nifi.registry.web.should.send.server.version=true
nifi.registry.security.keystore=
nifi.registry.security.keystoreType=jks
nifi.registry.security.keystorePasswd=
nifi.registry.security.keyPasswd=
nifi.registry.security.truststore=
nifi.registry.security.truststoreType=jks
nifi.registry.security.truststorePasswd=
nifi.registry.security.needClientAuth=True
nifi.registry.security.authorizers.configuration.file=./conf/authorizers.xml
nifi.registry.security.authorizer=managed-authorizer
nifi.registry.security.identity.providers.configuration.file=./conf/identity-providers.xml
nifi.registry.security.identity.provider=
nifi.registry.sensitive.props.additional.keys=
nifi.registry.providers.configuration.file=./conf/providers.xml
nifi.registry.registry.alias.configuration.file=./conf/registry-aliases.xml
nifi.registry.extensions.working.directory=./work/extensions
nifi.registry.db.directory=
nifi.registry.db.url.append=;LOCK_TIMEOUT=25000;WRITE_DELAY=0;AUTO_SERVER=FALSE;useSSL=false
# database properties
nifi.registry.db.url=jdbc:mysql://localhost:3306/nifi24_registry
nifi.registry.db.driver.class=com.mysql.jdbc.Driver
nifi.registry.db.driver.directory=/usr/share/java/
nifi.registry.db.username=registry
nifi.registry.db.password=PasswordSample1234
nifi.registry.db.maxConnections=5
nifi.registry.db.sql.debug=false

Any suggestion / solution is much appreciated.

Thanks

Mahendra

3 REPLIES 3

avatar

@hegdemahendra , try removing the "jks" string from the properties nifi.registry.security.keystoreType and nifi.registry.security.truststoreType and restart your NiFi Registry Instance. As well as for nifi.registry.security.needClientAuth=True,  which should have no value.

As I see you are using HTTP and not HTTPS, whereas you defined some properties relevant to HTTPS. My suggestion is either to go with full HTTP or with full HTTPS and not combine the properties. 

avatar
Master Mentor

@hegdemahendra 

A couple things you may want to try here.
1.  As @cotopaul stated, clear the keystoreType and truststoreType properties.
2. Set needClientAuth=false (just clearing this may not work as NiFi defaults here to true).
3. The exception shared  indicates that a tls exchange is being attempted with your MySQL server.  You should modify your nifi.registry.db.url to explicitly not use ssl if that is not what you want to happen here.  (for example: change "jdbc:mysql://localhost:3306/nifi24_registry" to "jdbc:mysql://localhost:3306/nifi24_registry?useSSL=false"

If you want to use SSL with your MySQL, the exception is telling you that it wants to perform server certificate verification fo which you have no truststore defined to do so.
You might try this url in that case:
jdbc:mysql://localhost:3306/nifi24_registry?verifyServerCertificate=false&useSSL=true"

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

Thank you,
Matt

avatar
Master Collaborator

Thank you very much for the quick reply @cotopaul @MattWho .

 

2024-02-22 14:44:24,319 INFO [main] o.apache.nifi.registry.bootstrap.Command Launched Apache NiFi Registry with Process ID 4290
2024-02-22 14:44:25,086 INFO [NiFi Registry Bootstrap Command Listener] o.a.n.registry.bootstrap.RunNiFiRegistry Apache NiFi Registry now running and listening for Bootstrap requests on port 44846
2024-02-22 14:44:28,308 INFO [NiFi logging handler] org.apache.nifi.registry.StdOut
2024-02-22 14:44:28,308 INFO [NiFi logging handler] org.apache.nifi.registry.StdOut Apache NiFi _ _
2024-02-22 14:44:28,308 INFO [NiFi logging handler] org.apache.nifi.registry.StdOut _ __ ___ __ _(_)___| |_ _ __ _ _
2024-02-22 14:44:28,308 INFO [NiFi logging handler] org.apache.nifi.registry.StdOut | '__/ _ \/ _` | / __| __| '__| | | |
2024-02-22 14:44:28,308 INFO [NiFi logging handler] org.apache.nifi.registry.StdOut | | | __/ (_| | \__ \ |_| | | |_| |
2024-02-22 14:44:28,308 INFO [NiFi logging handler] org.apache.nifi.registry.StdOut |_| \___|\__, |_|___/\__|_| \__, |
2024-02-22 14:44:28,308 INFO [NiFi logging handler] org.apache.nifi.registry.StdOut ==========|___/================|___/=
2024-02-22 14:44:28,308 INFO [NiFi logging handler] org.apache.nifi.registry.StdOut v
2024-02-22 14:44:28,308 INFO [NiFi logging handler] org.apache.nifi.registry.StdOut
2024-02-22 14:44:31,494 ERROR [NiFi logging handler] org.apache.nifi.registry.StdErr Server start failed: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'accessPolicyResource' defined in file [/usr/independent_nifi/nifi-registry-1.24.0/work/jetty/nifi-registry-web-api-1.24.0.war/webapp/WEB-INF/classes/org/apache/nifi/registry/web/api/AccessPolicyResource.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'standardServiceFacade' defined in file [/usr/independent_nifi/nifi-registry-1.24.0/work/jetty/nifi-registry-web-api-1.24.0.war/webapp/WEB-INF/classes/org/apache/nifi/registry/web/service/StandardServiceFacade.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'registryService' defined in URL [jar:file:/usr/independent_nifi/nifi-registry-1.24.0/work/jetty/nifi-registry-web-api-1.24.0.war/webapp/WEB-INF/lib/nifi-registry-framework-1.24.0.jar!/org/apache/nifi/registry/service/RegistryService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'databaseMetadataService' defined in URL [jar:file:/usr/independent_nifi/nifi-registry-1.24.0/work/jetty/nifi-registry-web-api-1.24.0.war/webapp/WEB-INF/lib/nifi-registry-framework-1.24.0.jar!/org/apache/nifi/registry/db/DatabaseMetadataService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.license.FlywayEditionUpgradeRequiredException: Flyway Teams Edition or MySQL upgrade required: MySQL 5.7 is no longer supported by Flyway Community Edition, but still supported by Flyway Teams Edition.
2024-02-22 14:44:32,331 INFO [main] o.a.n.registry.bootstrap.RunNiFiRegistry NiFi Registry never started. Will not restart NiFi Registry
^C
root@nifi12-dev:/usr/independent_nifi/nifi-registry-1.24.0/logs#
root@nifi12-dev:/usr/independent_nifi/nifi-registry-1.24.0/logs# mysql --version
mysql Ver 14.14 Distrib 5.7.33, for Linux (x86_64) using EditLine wrapper
root@nifi12-dev:/usr/independent_nifi/nifi-registry-1.24.0/logs#

 

I see above logs in bootstrap, Is the issue because my mysql version is 5.7?

In another server I am running nifi 1.16 registry with this mysql 5.7 version and its working there from 2 years.

 

Thanks

Mahendra