1

关于声纳/詹金斯集成的快速问题。

首先,有一点背景——我们正在努力实现构建管道插件,昨晚我们遇到了一个问题,我们的一个管道作业失去了它的历史。这淘汰了我们所有的执行者(甚至是奴隶)。我尝试重命名并尝试弹跳,但没有奏效。最后,我关闭了 master,清除了 Tomcat 中的 temp 和 work 中的所有内容,然后将其重新启动。这解决了我的执行人的问题。

所以今天早上我运行了一个运行 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 配置页面上删除并重新创建了声纳实例。我在这里不知所措。有人有什么建议吗?

谢谢!

4

2 回答 2

1

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

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

于 2013-05-20T06:39:59.380 回答
0

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

将值“数据库 URL”复制到 Jenkins 配置中(“数据库 URL”)

将值“数据库登录”复制到 Jenkins 配置中(“数据库登录”)

将值“数据库驱动程序”复制到 Jenkins 配置中(“数据库驱动程序”)

并转到 SONAR_HOME/conf/sonar.properties:

将值“数据库密码”复制到 Jenkins 配置中(“数据库密码”)

于 2015-08-28T10:51:09.867 回答