声纳抛出错误BadDatabaseVersion(Sonar throwing error BadD

2019-07-03 17:55发布

我已经安装在服务器A和服务器B上的我试图用声纳亚军,但每次我得到以下错误的时间运行声纳分析声纳和MySQL数据库:

Caused by: java.lang.RuntimeException: wrapper
    at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.monitorAndThrowReflectionLifecycleException(ReflectionLifecycleStrategy.java:130)
    ... 22 more
Caused by: org.sonar.core.persistence.BadDatabaseVersion: The current batch process and the configured remote server do not share the same DB configuration.
    - Batch side: jdbc:mysql://xx.xx.xx.xx:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true (sonar / *****)
    - Server side: check the configuration at http://xx.xx.xx.xx:9000/system

服务器B是从访问服务器A DB我已经检查批次和服务器端的一切所有的配置似乎是确定。

我也用Google搜索,发现下面的链接 ,但我不明白,为解决这一问题做的。

任何指针?

Answer 1:

如果你有2在同一个数据库指向声纳情况下也会出现这种错误。 你只能有每个数据库都有一个声纳实例。

声纳将更新的行properties表,其中prop_key = 'sonar.core.id'每次它启动,然后将缓存值针对所述一个在每当执行的分析的数据库进行比较。 如果两者不匹配,那么你的错误。

为了解决这个问题,关闭这两个实例,然后重新启动只是要保持实例。 声纳将重置sonar.core.id价值,事情应该重新工作。

:您可以通过REST获取服务器的缓存ID http://server:port/sonar/api/server

它匹配一个数据库中的声纳工作。 select * from properties where prop_key = 'sonar.core.id'



Answer 2:

你确定由声纳服务器所使用的数据库设置:

  • HTTP://xx.xx.xx.xx:9000 /系统

匹配您的构建使用的数据库凭据?

该错误信息显示他们不这样做。 该JIRA问题SONAR-3685用“不是一个错误”解析代码关闭。



文章来源: Sonar throwing error BadDatabaseVersion
标签: sonarqube