微技术

关注技术领域,分享资讯和经验。

报Nacos Server did not start because dumpservice bean construction failure

nacos无法启动,报Nacos Server did not start because dumpservice bean construction failure :No DataSource set。这个错误,一般来说就是mysql的数据库连接配置错误,或者使用了高版本的数据库导致的。但在window本地启动成功,排查发现,mysql数据库的连接耗时比较久,将近10s。可能是因为公司网络还没弄好,mysql的连接花费太久。

start.out启动日志

  1. org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
  2. at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:81)
  3. at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:371)
  4. at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:523)
  5. at com.alibaba.nacos.config.server.service.BasicDataSourceServiceImpl$SelectMasterTask.run(BasicDataSourceServiceImpl.java:317)
  6. at com.alibaba.nacos.config.server.service.BasicDataSourceServiceImpl.reload(BasicDataSourceServiceImpl.java:213)
  7. at com.alibaba.nacos.config.server.service.BasicDataSourceServiceImpl.init(BasicDataSourceServiceImpl.java:131)
  8. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  9. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  10. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  11. at java.lang.reflect.Method.invoke(Method.java:498)
  12. at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:363)
  13. at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:307)
  14. at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:136)
  15. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:419)
  16. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1737)
  17. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:576)
  18. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498)
  19. at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
  20. at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
  21. at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
  22. at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
  23. at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1083)
  24. at com.alibaba.nacos.config.server.service.DynamicDataSource.getDataSource(DynamicDataSource.java:54)
  25. at com.alibaba.nacos.config.server.service.PersistService.init(PersistService.java:91)
  26. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  27. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  28. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  29. at java.lang.reflect.Method.invoke(Method.java:498)
  30. at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:363)
  31. at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:307)
  32. at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:136)
  33. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:419)
  34. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1737)
  35. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:576)
  36. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498)
  37. at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
  38. at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
  39. at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
  40. at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
  41. at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:273)
  42. at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1237)
  43. at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1164)
  44. at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:593)
  45. at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90)
  46. at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:374)
  47. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1378)
  48. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:575)
  49. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498)
  50. at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
  51. at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
  52. at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
  53. at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
  54. at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:273)
  55. at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1237)
  56. at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1164)
  57. at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:593)
  58. at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90)
  59. at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:374)
  60. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1378)
  61. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:575)
  62. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498)
  63. at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
  64. at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
  65. at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
  66. at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
  67. at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:846)
  68. at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:863)
  69. at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546)
  70. at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142)
  71. at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)
  72. at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
  73. at org.springframework.boot.SpringApplication.run(SpringApplication.java:316)
  74. at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)
  75. at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248)
  76. at com.alibaba.nacos.Nacos.main(Nacos.java:33)
  77. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  78. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  79. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  80. at java.lang.reflect.Method.invoke(Method.java:498)
  81. at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
  82. at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
  83. at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
  84. at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:593)
  85. Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
  86. at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549)
  87. at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
  88. at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
  89. at org.springframework.jdbc.datasource.DataSourceUtils.fetchConnection(DataSourceUtils.java:151)
  90. at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:115)
  91. at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:78)
  92. ... 82 more
  93. Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
  94. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  95. at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
  96. at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  97. at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
  98. at com.mysql.jdbc.Util.handleNewInstance(Util.java:377)
  99. at com.mysql.jdbc.Util.getInstance(Util.java:360)
  100. at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
  101. at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:935)
  102. at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:924)
  103. at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:870)
  104. at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2144)
  105. at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2069)
  106. at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:790)
  107. at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:44)
  108. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  109. at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
  110. at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  111. at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
  112. at com.mysql.jdbc.Util.handleNewInstance(Util.java:377)
  113. at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:395)
  114. at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:325)
  115. at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
  116. at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
  117. at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
  118. at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
  119. ... 87 more
  120. Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
  121. The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
  122. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  123. at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
  124. at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  125. at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
  126. at com.mysql.jdbc.Util.handleNewInstance(Util.java:377)
  127. at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1036)
  128. at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:627)
  129. at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1013)
  130. at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2234)
  131. at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2085)
  132. ... 101 more
  133. Caused by: java.net.SocketTimeoutException: Read timed out
  134. at java.net.SocketInputStream.socketRead0(Native Method)
  135. at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
  136. at java.net.SocketInputStream.read(SocketInputStream.java:171)
  137. at java.net.SocketInputStream.read(SocketInputStream.java:141)
  138. at com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:100)
  139. at com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:143)
  140. at com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:173)
  141. at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2911)
  142. at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:559)
  143. ... 104 more

nacos.log日志

  1. 2020-10-19 14:05:58,421 ERROR Application run failed
  2. org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'opsController' defined in URL [jar:file:/home/usms/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-config-1.1.3.jar!/com/alibaba/nacos/config/server/controller/OpsController.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dumpService': Invocation of init method failed; nested exception is java.lang.RuntimeException: Nacos Server did not start because dumpservice bean construction failure :
  3. No DataSource set
  4. at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:769)
  5. at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:218)
  6. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1308)
  7. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1154)
  8. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:538)
  9. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498)
  10. at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
  11. at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
  12. at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
  13. at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
  14. at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:846)
  15. at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:863)
  16. at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546)
  17. at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142)
  18. at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)
  19. at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
  20. at org.springframework.boot.SpringApplication.run(SpringApplication.java:316)
  21. at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)
  22. at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248)
  23. at com.alibaba.nacos.Nacos.main(Nacos.java:33)
  24. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  25. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  26. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  27. at java.lang.reflect.Method.invoke(Method.java:498)
  28. at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
  29. at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
  30. at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
  31. at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:593)
  32. Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dumpService': Invocation of init method failed; nested exception is java.lang.RuntimeException: Nacos Server did not start because dumpservice bean construction failure :
  33. No DataSource set
  34. at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:139)
  35. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:419)
  36. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1737)
  37. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:576)
  38. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498)
  39. at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
  40. at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
  41. at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
  42. at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
  43. at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:273)
  44. at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1237)
  45. at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1164)
  46. at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:857)
  47. at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:760)
  48. ... 27 common frames omitted
  49. Caused by: java.lang.RuntimeException: Nacos Server did not start because dumpservice bean construction failure :
  50. No DataSource set
  51. at com.alibaba.nacos.config.server.service.dump.DumpService.init(DumpService.java:155)
  52. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  53. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  54. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  55. at java.lang.reflect.Method.invoke(Method.java:498)
  56. at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:363)
  57. at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:307)
  58. at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:136)
  59. ... 40 common frames omitted

最后,修改了数据库url配置参数,解决了问题:

&connectTimeout=10000&socketTimeout=30000

原配置是&connectTimeout=1000&socketTimeout=3000

其他网友解答:

加了&serverTimezone=UTC还是不行,加上&allowPublicKeyRetrieval=true就好了

我跟你们说正解,你用其他的客户端先连一下数据库 随便查询点啥,唤醒他