Jenkins / Sonar - 服务器重启后的新错误

时间:2013-05-17 17:51:47

标签: configuration jenkins sonarqube

关于声纳/詹金斯整合的快速提问。

首先,一点背景 - 我们正在努力实现构建管道插件,昨晚我们遇到了一个问题,其中一个管道作业丢失了它的历史。这取消了我们所有的执行者(甚至是奴隶)。我尝试重命名,我尝试弹跳,但没有奏效。最后,我放下了主人,从临时工作中清除了所有东西并在Tomcat中工作,并将其恢复原状。这解决了我的遗嘱执行人的问题。

所以今天早上我运行一个运行Sonar的构建作为构建后的步骤。现在我看到了这个错误:

[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project VendorProduct: Can not execute Sonar: The current batch process and the configured remote server do not share the same DB configuration.
[ERROR] - Batch side: jdbc:oracle:thin:@dansrzl105si.wellsfargo.com:3203/LBLDFRI1 (QMTDO / *****)
[ERROR] - Server side: check the configuration at http://lpwva3279:9000/sonar/system
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project VendorProduct: Can not execute Sonar
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute Sonar
    at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:118)
    at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65)
at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:90)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    ... 19 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:oracle:thin:@dansrzl105si.wellsfargo.com:3203/LBLDFRI1 (QMTDO / *****)
    - Server side: check the configuration at http://lpwva3279:9000/sonar/system

[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

我已经根据声纳配置文件验证了配置,删除并重新创建了构建后步骤,删除并重新创建了Jenkins配置页面上的声纳实例。我在这里不知所措。有人有什么建议吗?

谢谢!

2 个答案:

答案 0 :(得分:1)

当Sonar批次连接到与Sonar Web服务器上配置的数据库不同的数据库时,将打印此消息。

在您的情况下,如果您转到http://lpwva3279:9000/sonar/system,您可能会找到与jdbc:oracle:thin:@dansrzl105si.wellsfargo.com:3203/LBLDFRI1 (QMTDO / *****)不同的数据库配置设置。然后,您应该转到Jenkins设置并更新与Sonar相关的信息以匹配Sonar Web服务器上的信息。

答案 1 :(得分:0)

转到http://host:port/sonar/system

复制值"数据库URL"进入Jenkins配置("数据库URL")

复制值"数据库登录"进入Jenkins配置("数据库登录")

复制值"数据库驱动程序"进入Jenkins配置("数据库驱动程序")

转到SONAR_HOME / conf / sonar.properties:

复制值"数据库密码"进入Jenkins配置("数据库密码")

相关问题