可能有点晚了,但基本上 Hawkbit 服务器有数据库迁移脚本(Flyway)。在 HawkBit 数据库中,保留了一个表用于跟踪这些迁移以实现向后兼容性。这是schema_version
桌子。
您在此处看到的问题是 Flyway 正在尝试迁移数据库的状态,但由于检测到先前的迁移失败而失败。
Caused by: org.flywaydb.core.api.FlywayException: Validate failed: Detected failed migration to version 1.0.1 (init )
at org.flywaydb.core.Flyway.doValidate(Flyway.java:1482)
at org.flywaydb.core.Flyway.access$100(Flyway.java:85)
at org.flywaydb.core.Flyway$1.execute(Flyway.java:1364)
at org.flywaydb.core.Flyway$1.execute(Flyway.java:1356)
at org.flywaydb.core.Flyway.execute(Flyway.java:1711)
at org.flywaydb.core.Flyway.migrate(Flyway.java:1356)
at org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer.afterPropertiesSet(FlywayMigrationInitializer.java:66)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1837)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1774)
... 98 common frames omitted
最简单的解决方案是从一个新的数据库开始。但如果您在数据库中有重要数据,您也可以截断schema_version
表并重新运行 Hawkbit 服务器。