从6.0迁移后无法启动SonarQube - > 6.7 LTS

时间:2017-11-21 10:24:13

标签: sonarqube

我尝试将SonarQube实例从SonarQube 6.0安装升级到SonarQube 6.7。

当我启动SonarQube时,它失败并出现以下异常:

2017.11.21 05:22:43 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
java.lang.IllegalArgumentException: There is already a quality profile with name 'Sonar way' for language 'java'
    at org.sonar.api.internal.google.common.base.Preconditions.checkArgument(Preconditions.java:145)
    at org.sonar.api.server.profile.BuiltInQualityProfilesDefinition$Context.registerProfile(BuiltInQualityProfilesDefinition.java:78)
    at org.sonar.api.server.profile.BuiltInQualityProfilesDefinition$Context.access$300(BuiltInQualityProfilesDefinition.java:62)
    at org.sonar.api.server.profile.BuiltInQualityProfilesDefinition$NewBuiltInQualityProfileImpl.done(BuiltInQualityProfilesDefinition.java:170)
    at org.sonar.server.qualityprofile.BuiltInQProfileDefinitionsBridge.define(BuiltInQProfileDefinitionsBridge.java:88)
    at org.sonar.server.qualityprofile.BuiltInQProfileDefinitionsBridge.define(BuiltInQProfileDefinitionsBridge.java:67)
    at org.sonar.server.qualityprofile.BuiltInQProfileRepositoryImpl.initialize(BuiltInQProfileRepositoryImpl.java:68)
    at org.sonar.server.qualityprofile.BuiltInQProfileLoader.start(BuiltInQProfileLoader.java:37)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110)
    at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89)
    at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
    at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
    at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
    at org.picocontainer.behaviors.Stored.start(Stored.java:110)
    at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
    at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
    at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:134)
    at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:90)
    at org.sonar.server.platform.platformlevel.PlatformLevelStartup.access$001(PlatformLevelStartup.java:45)
    at org.sonar.server.platform.platformlevel.PlatformLevelStartup$1.doPrivileged(PlatformLevelStartup.java:83)
    at org.sonar.server.user.DoPrivileged.execute(DoPrivileged.java:45)
    at org.sonar.server.platform.platformlevel.PlatformLevelStartup.start(PlatformLevelStartup.java:80)
    at org.sonar.server.platform.Platform.executeStartupTasks(Platform.java:196)
    at org.sonar.server.platform.Platform.access$400(Platform.java:46)
    at org.sonar.server.platform.Platform$1.lambda$doRun$1(Platform.java:121)
    at org.sonar.server.platform.Platform$AutoStarterRunnable.runIfNotAborted(Platform.java:371)
    at org.sonar.server.platform.Platform$1.doRun(Platform.java:121)
    at org.sonar.server.platform.Platform$AutoStarterRunnable.run(Platform.java:355)
    at java.lang.Thread.run(Thread.java:745)
2017.11.21 05:22:43 INFO  web[][o.s.p.StopWatcher] Stopping process

有没有办法解决这个问题?

我没有大量编辑质量档案,所以我很乐意将其恢复为默认值。

1 个答案:

答案 0 :(得分:4)

正如评论中所提到的,这可能是过时插件的问题。以下是我为解决问题所做的工作:

  1. 从extensions / plugins /文件夹中删除sonar-java插件文件。 (如果在ce.log中看到错误消息,也可以删除所有插件,具体取决于java。)
  2. 如果您在conf / sonar.properties中为代理设置Marketplace的代理设置。请注意,Marketplace没有声明连接错误(至少在当前版本中)只是没有显示可用的插件。 (但是将连接错误记录到web.log。)
  3. 停止,然后启动SonarQube。
  4. 以管理员身份登录,并从Marketplace安装最新版本的SonarJava插件。