Sonarqube 8.6 didn't startup due to IllegalArgumentException: Repository must be set

  • versions used : Sonarqube 8.6.1
  • error observed : The WebServer don’t start due to a IllegalArgumentException: Repository must be set
  • steps to reproduce ??
  • potential workaround ??

Hello,
I have install a Sonarqube 8.6.1 instance a few weeks ago. No special config, no special plugin, it’s fresh install with only two modifications

  • a rule has been actived (spring autowired)
  • a rule has been modified (test class name pattern)

The service has been rebooted and after that the issue occured.
I have try to enabled DEBUG/TRACE log without more details.
How can I identify the rule which fail ?
Thanks

Here the full stacktrace

2021.03.15 10:06:27 INFO  web[][o.s.s.s.RegisterPlugins] Register plugins
2021.03.15 10:06:27 INFO  web[][o.s.s.s.RegisterMetrics] Register metrics
2021.03.15 10:06:27 INFO  web[][o.s.s.r.RegisterRules] Register rules
2021.03.15 10:06:29 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
java.lang.IllegalArgumentException: Repository must be set
        at org.sonar.api.utils.Preconditions.checkArgument(Preconditions.java:31)
        at org.sonar.api.rule.RuleKey.of(RuleKey.java:53)
        at org.sonar.server.rule.SingleDeprecatedRuleKey.getNewRuleKeyAsRuleKey(SingleDeprecatedRuleKey.java:81)
        at org.sonar.server.rule.RegisterRules.lambda$filterInvalidDeprecatedRuleKeys$14(RegisterRules.java:806)
        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
        at java.base/java.util.TreeMap$KeySpliterator.forEachRemaining(TreeMap.java:2739)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
        at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
        at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:274)
        at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
        at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
        at org.sonar.server.rule.RegisterRules.verifyRuleKeyConsistency(RegisterRules.java:791)
        at org.sonar.server.rule.RegisterRules.start(RegisterRules.java:121)
        at org.sonar.core.platform.StartableCloseableSafeLifecyleStrategy.start(StartableCloseableSafeLifecyleStrategy.java:40)
        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:136)
        at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:90)
        at org.sonar.server.platform.platformlevel.PlatformLevelStartup.access$001(PlatformLevelStartup.java:49)
        at org.sonar.server.platform.platformlevel.PlatformLevelStartup$1.doPrivileged(PlatformLevelStartup.java:87)
        at org.sonar.server.user.DoPrivileged.execute(DoPrivileged.java:45)
        at org.sonar.server.platform.platformlevel.PlatformLevelStartup.start(PlatformLevelStartup.java:84)
        at org.sonar.server.platform.PlatformImpl.executeStartupTasks(PlatformImpl.java:198)
        at org.sonar.server.platform.PlatformImpl.access$400(PlatformImpl.java:46)
        at org.sonar.server.platform.PlatformImpl$1.lambda$doRun$1(PlatformImpl.java:122)
        at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.runIfNotAborted(PlatformImpl.java:370)
        at org.sonar.server.platform.PlatformImpl$1.doRun(PlatformImpl.java:122)
        at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.run(PlatformImpl.java:354)
        at java.base/java.lang.Thread.run(Thread.java:834)
2021.03.15 10:06:29 INFO  web[][o.s.p.ProcessEntryPoint] Hard stopping process
2021.03.15 10:06:29 INFO  web[][o.s.s.n.NotificationDaemon] Notification service stopped

Hi,

Welcome to the community!

Can you expand on this?

Are you talking about a custom rule implemented in Java via a SonarQube plugin, or are you talking about updating the parameter values of a rule via the UI. (Or something else?)

It’s probably one of the two rules you mentioned modifications to. Have you tried backing those modifications out?

 
Ann