[ 
https://issues.apache.org/jira/browse/NIFI-9948?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pierre Villard resolved NIFI-9948.
----------------------------------
    Resolution: Feedback Received

Apache NiFi 1.x is no longer maintained and no new release is planned on the 
1.x release line. Marking as resolved as part of a cleanup operation. Please 
open a new one with an updated description if this is still relevant for NiFi 
2.x.

> Upgrading Nifi Registry from 1.15.3 to 1.16.0 keeps failing with Flyway 
> migration errors
> ----------------------------------------------------------------------------------------
>
>                 Key: NIFI-9948
>                 URL: https://issues.apache.org/jira/browse/NIFI-9948
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: NiFi Registry
>    Affects Versions: 1.16.0
>            Reporter: Andreas Adamides
>            Priority: Major
>
> When upgrading from version 1.15.3 to 1.16.0, the upgrade keeps failing. 
> Looking at the logs the issue seems to be related with Flyway(database is 
> Postgres 12.8) migration failures and checksum mismatches. The suggestion to 
> fix this is to run the flyway.repair() commands, but flyway is embedded as 
> Java code in the Nifi registry code itself.
> *Error logs:*
> {code:java}
> 2022-04-21 16:03:48,445 INFO [NiFi logging handler] 
> org.apache.nifi.registry.StdOut 
> 2022-04-21 16:03:48,445 INFO [NiFi logging handler] 
> org.apache.nifi.registry.StdOut   Apache NiFi   _     _
> 2022-04-21 16:03:48,445 INFO [NiFi logging handler] 
> org.apache.nifi.registry.StdOut  _ __ ___  __ _(_)___| |_ _ __ _   _
> 2022-04-21 16:03:48,446 INFO [NiFi logging handler] 
> org.apache.nifi.registry.StdOut | '__/ _ \/ _` | / __| __| '__| | | |
> 2022-04-21 16:03:48,450 INFO [NiFi logging handler] 
> org.apache.nifi.registry.StdOut | | |  __/ (_| | \__ \ |_| |  | |_| |
> 2022-04-21 16:03:48,450 INFO [NiFi logging handler] 
> org.apache.nifi.registry.StdOut |_|  \___|\__, |_|___/\__|_|   \__, |
> 2022-04-21 16:03:48,450 INFO [NiFi logging handler] 
> org.apache.nifi.registry.StdOut ==========|___/================|___/=
> 2022-04-21 16:03:48,450 INFO [NiFi logging handler] 
> org.apache.nifi.registry.StdOut                v1.16.0
> 2022-04-21 16:03:48,532 INFO [NiFi logging handler] 
> org.apache.nifi.registry.StdOut 
> 2022-04-21 16:04:09,064 ERROR [NiFi logging handler] 
> org.apache.nifi.registry.StdErr Failed to start web server: 
> org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
> creating bean with name 'accessPolicyResource' defined in file 
> [/opt/nifi/nifi-registry-1.16.0/work/jetty/nifi-registry-web-api-1.16.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 
> [/opt/nifi/nifi-registry-1.16.0/work/jetty/nifi-registry-web-api-1.16.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:/opt/nifi/nifi-registry-1.16.0/work/jetty/nifi-registry-web-api-1.16.0.war/webapp/WEB-INF/lib/nifi-registry-framework-1.16.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:/opt/nifi/nifi-registry-1.16.0/work/jetty/nifi-registry-web-api-1.16.0.war/webapp/WEB-INF/lib/nifi-registry-framework-1.16.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.api.exception.FlywayValidateException: Validate failed: 
> Migrations have failed validation
> 2022-04-21 16:04:09,065 ERROR [NiFi logging handler] 
> org.apache.nifi.registry.StdErr Migration checksum mismatch for migration 
> version 6
> 2022-04-21 16:04:09,065 ERROR [NiFi logging handler] 
> org.apache.nifi.registry.StdErr -> Applied to database : -260833722
> 2022-04-21 16:04:09,065 ERROR [NiFi logging handler] 
> org.apache.nifi.registry.StdErr -> Resolved locally    : -1218242517. Either 
> revert the changes to the migration, or run repair to update the schema 
> history.
> 2022-04-21 16:04:09,065 ERROR [NiFi logging handler] 
> org.apache.nifi.registry.StdErr Migration checksum mismatch for migration 
> version 8
> 2022-04-21 16:04:09,065 ERROR [NiFi logging handler] 
> org.apache.nifi.registry.StdErr -> Applied to database : -2057645592
> 2022-04-21 16:04:09,065 ERROR [NiFi logging handler] 
> org.apache.nifi.registry.StdErr -> Resolved locally    : -1726468007. Either 
> revert the changes to the migration, or run repair to update the schema 
> history.
> 2022-04-21 16:04:09,065 ERROR [NiFi logging handler] 
> org.apache.nifi.registry.StdErr Need more flexibility with validation rules? 
> Learn more: https://rd.gt/3AbJUZE
> 2022-04-21 16:04:09,065 ERROR [NiFi logging handler] 
> org.apache.nifi.registry.StdErr Shutting down...
> 2022-04-21 16:04:09,738 INFO [main] o.a.n.registry.bootstrap.RunNiFiRegistry 
> NiFi Registry never started. Will not restart NiFi Registry 
>  {code}
> I spotted this issue(https://issues.apache.org/jira/browse/NIFI-9836) which 
> in the title seems similar, but not sure if related.
> Can you suggest any way I could fix this or if its an actual bug? 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to