zqr10159 commented on issue #3325:
URL: https://github.com/apache/hertzbeat/issues/3325#issuecomment-2898231087

   > I encountered the same issue while upgrading from v1.6.0 to v1.7.0, but 
there seem to be slight differences in the log contents.我在从 v1.6.0 升级到 v1.7.0 
时遇到了同样的问题,但日志内容似乎略有不同。 Details log are as follows:日志详情如下:
   > 
   > ```
   > 2025-05-21 17:41:10.329 [main] ERROR 
org.springframework.boot.SpringApplication Line:857 - Application run failed
   > org.springframework.beans.factory.BeanCreationException: Error creating 
bean with name 'delayedFlywayInitializer' defined in class path resource 
[org/apache/hertzbeat/manager/config/FlywayConfiguration.class]: Failed to 
instantiate [org.apache.hertzbeat.manager.config.FlywayConfiguration$Dummy]: 
Factory method 'delayedFlywayInitializer' threw exception with message: 
Validate failed: Migrations have failed validation
   > Migration checksum mismatch for migration version 160
   > -> Applied to database : -1015374055
   > -> Resolved locally    : -291822826
   > Either revert the changes to the migration, or run repair to update the 
schema history.
   > Need more flexibility with validation rules? Learn more: 
https://rd.gt/3AbJUZE
   >    at 
org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:657)
   >    at 
org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:645)
   >    at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1361)
   >    at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1191)
   >    at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:563)
   >    at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523)
   >    at 
org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:336)
   >    at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:307)
   >    at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:334)
   >    at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
   >    at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.instantiateSingleton(DefaultListableBeanFactory.java:1122)
   >    at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingleton(DefaultListableBeanFactory.java:1093)
   >    at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:1030)
   >    at 
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:987)
   >    at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:627)
   >    at 
org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
   >    at 
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752)
   >    at 
org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:439)
   >    at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:318)
   >    at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1361)
   >    at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1350)
   >    at org.apache.hertzbeat.manager.Manager.main(Manager.java:46)
   > Caused by: org.springframework.beans.BeanInstantiationException: Failed to 
instantiate [org.apache.hertzbeat.manager.config.FlywayConfiguration$Dummy]: 
Factory method 'delayedFlywayInitializer' threw exception with message: 
Validate failed: Migrations have failed validation
   > Migration checksum mismatch for migration version 160
   > -> Applied to database : -1015374055
   > -> Resolved locally    : -291822826
   > Either revert the changes to the migration, or run repair to update the 
schema history.
   > Need more flexibility with validation rules? Learn more: 
https://rd.gt/3AbJUZE
   >    at 
org.springframework.beans.factory.support.SimpleInstantiationStrategy.lambda$instantiate$0(SimpleInstantiationStrategy.java:199)
   >    at 
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiateWithFactoryMethod(SimpleInstantiationStrategy.java:88)
   >    at 
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:168)
   >    at 
org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
   >    ... 21 common frames omitted
   > Caused by: org.flywaydb.core.api.exception.FlywayValidateException: 
Validate failed: Migrations have failed validation
   > Migration checksum mismatch for migration version 160
   > -> Applied to database : -1015374055
   > -> Resolved locally    : -291822826
   > Either revert the changes to the migration, or run repair to update the 
schema history.
   > Need more flexibility with validation rules? Learn more: 
https://rd.gt/3AbJUZE
   >    at org.flywaydb.core.Flyway.lambda$migrate$0(Flyway.java:164)
   >    at org.flywaydb.core.FlywayExecutor.execute(FlywayExecutor.java:209)
   >    at org.flywaydb.core.Flyway.migrate(Flyway.java:151)
   >    at 
org.apache.hertzbeat.manager.config.FlywayConfiguration.delayedFlywayInitializer(FlywayConfiguration.java:48)
   >    at 
org.apache.hertzbeat.manager.config.FlywayConfiguration$$SpringCGLIB$$0.CGLIB$delayedFlywayInitializer$1(<generated>)
   >    at 
org.apache.hertzbeat.manager.config.FlywayConfiguration$$SpringCGLIB$$FastClass$$1.invoke(<generated>)
   >    at 
org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:258)
   >    at 
org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:348)
   >    at 
org.apache.hertzbeat.manager.config.FlywayConfiguration$$SpringCGLIB$$0.delayedFlywayInitializer(<generated>)
   >    at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   >    at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
   >    at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   >    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
   >    at 
org.springframework.beans.factory.support.SimpleInstantiationStrategy.lambda$instantiate$0(SimpleInstantiationStrategy.java:171)
   >    ... 24 common frames omitted
   > 2025-05-21 17:41:11.107 [Timer-0] ERROR 
org.apache.hertzbeat.push.service.impl.PushServiceImpl Line:73  - periodical 
deletion failed. Error creating bean with name 
'spring.flyway-org.springframework.boot.autoconfigure.flyway.FlywayProperties': 
Could not bind properties to 'FlywayProperties' : prefix=spring.flyway, 
ignoreInvalidFields=false, ignoreUnknownFields=true
   > 2025-05-21 17:41:13.872 [status-page-calculate-0] INFO  
org.apache.hertzbeat.manager.component.status.CalculateStatus Line:93  - start 
to calculate status page state
   > 2025-05-21 17:41:13.897 [status-page-calculate-0] ERROR 
org.apache.hertzbeat.manager.component.status.CalculateStatus Line:157 - status 
page calculate component state error: Error creating bean with name 
'spring.flyway-org.springframework.boot.autoconfigure.flyway.FlywayProperties': 
Could not bind properties to 'FlywayProperties' : prefix=spring.flyway, 
ignoreInvalidFields=false, ignoreUnknownFields=true
   > 
org.springframework.boot.context.properties.ConfigurationPropertiesBindException:
 Error creating bean with name 
'spring.flyway-org.springframework.boot.autoconfigure.flyway.FlywayProperties': 
Could not bind properties to 'FlywayProperties' : prefix=spring.flyway, 
ignoreInvalidFields=false, ignoreUnknownFields=true
   >    at 
org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.bind(ConfigurationPropertiesBindingPostProcessor.java:99)
   >    at 
org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:79)
   >    at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:423)
   >    at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1804)
   >    at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:601)
   >    at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523)
   >    at 
org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:336)
   >    at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:307)
   >    at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:334)
   >    at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
   >    at 
org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254)
   >    at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1631)
   >    at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1519)
   >    at 
org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:913)
   >    at 
org.springframework.beans.factory.support.ConstructorResolver.resolvePreparedArguments(ConstructorResolver.java:845)
   >    at 
org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:161)
   >    at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1381)
   >    at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1207)
   >    at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:563)
   >    at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523)
   >    at 
org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:336)
   >    at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:307)
   >    at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:334)
   >    at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
   >    at 
org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:413)
   >    at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1361)
   >    at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1191)
   >    at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:563)
   >    at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523)
   >    at 
org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:336)
   >    at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:307)
   >    at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:334)
   >    at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
   >    at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:312)
   >    at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
   >    at 
org.springframework.beans.factory.support.DefaultListableBeanFactory$1.orderedStream(DefaultListableBeanFactory.java:503)
   >    at 
org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.detectPersistenceExceptionTranslators(PersistenceExceptionTranslationInterceptor.java:175)
   >    at 
org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:151)
   >    at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
   >    at 
org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:165)
   >    at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
   >    at 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:223)
   >    at jdk.proxy2/jdk.proxy2.$Proxy185.findAll(Unknown Source)
   >    at 
org.apache.hertzbeat.manager.component.status.CalculateStatus.lambda$startCalculate$2(CalculateStatus.java:96)
   >    at 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
   >    at 
java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
   >    at 
java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
   >    at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
   >    at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
   >    at java.base/java.lang.Thread.run(Thread.java:833)
   > Caused by: java.lang.IllegalStateException: 
org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@2c22a348
 has not been refreshed yet
   >    at 
org.springframework.context.support.AbstractApplicationContext.assertBeanFactoryActive(AbstractApplicationContext.java:1259)
   >    at 
org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1277)
   >    at 
org.springframework.boot.context.properties.BoundConfigurationProperties.get(BoundConfigurationProperties.java:76)
   >    at 
org.springframework.boot.context.properties.ConfigurationPropertiesBinder.getHandler(ConfigurationPropertiesBinder.java:144)
   >    at 
org.springframework.boot.context.properties.ConfigurationPropertiesBinder.getBindHandler(ConfigurationPropertiesBinder.java:113)
   >    at 
org.springframework.boot.context.properties.ConfigurationPropertiesBinder.bind(ConfigurationPropertiesBinder.java:93)
   >    at 
org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.bind(ConfigurationPropertiesBindingPostProcessor.java:96)
   >    ... 49 common frames omitted
   > ```
   
   Yours is completely different, if you can, try to manually execute the 
upgrade sql and then turn off flyway in the yml config.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@hertzbeat.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@hertzbeat.apache.org
For additional commands, e-mail: notifications-h...@hertzbeat.apache.org

Reply via email to