java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.sensor.DefaultSensorStorage

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    SonarQube 6.7.5 for all of it
  • what are you trying to achieve
    Use the stand alone scanner in TFS 2018 build Job.
  • what have you tried so far to achieve this

I built a test build project in my TFS 2018 update 3 Test instance that just pulls code from a TFS repo and Scans it and sends the results to the SonarQube web portal.

I job runs when I point to our Production SonarQube instance, but it fails when I point to the TEST SonarQube instance. Both environments are running SonarQube 6.7.5… I know it’s old, we are in the process of upgrading. But I need to be able to connect and scan against the TEST instance so we can test after the upgrade before we upgrade Production.

The Build is using the 3 SonarQube tasks for TFS (Prepare, Run, and Publish) It’s failing on the Run Step. It is able to run the prepare step with no problems. I will attach the log section, but remove server names.

13:55:00.821 DEBUG: Start recursive analysis of project modules
13:55:00.821 INFO: -------------  Scan Boomi-Test
13:55:00.946 INFO: Base dir: E:\Dev\Agent-svc\_work\10\s
13:55:00.946 INFO: Working dir: E:\Dev\Agent-svc\_work\10\s\.scannerwork
13:55:00.946 INFO: Source paths: .
13:55:00.946 INFO: Source encoding: windows-1252, default locale: en_US
13:55:00.993 INFO: Load server rules
13:55:01.118 DEBUG: GET 200 https://your.name.com/api/rules/list.protobuf | time=125ms
13:55:01.180 INFO: ------------------------------------------------------------------------
13:55:01.180 INFO: EXECUTION FAILURE
13:55:01.180 INFO: ------------------------------------------------------------------------
13:55:01.180 INFO: Total time: 3.484s
13:55:01.227 INFO: Final Memory: 22M/272M
13:55:01.227 INFO: ------------------------------------------------------------------------
13:55:01.227 ERROR: Error during SonarScanner execution
Processed: ##vso[task.logissue type=error;]13:55:01.227 ERROR: Error during SonarScanner execution
13:55:01.227 ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.sensor.DefaultSensorStorage
Processed: ##vso[task.logissue type=error;]java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.sensor.DefaultSensorStorage%0D%0A at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:64)%0D%0A at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:678)%0D%0A at org.sonar.core.platform.ComponentContainer.getComponentByType(ComponentContainer.java:265)%0D%0A at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:175)
java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.sensor.DefaultSensorStorage
	at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:64)
	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:678)
	at org.sonar.core.platform.ComponentContainer.getComponentByType(ComponentContainer.java:265)
	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:175)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
Processed: ##vso[task.logissue type=error;]at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)%0D%0A at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)%0D%0A at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:291)%0D%0A at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:286)%0D%0A at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:264)%0D%0A at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)%0D%0A at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:291)
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:286)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:264)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48)
Processed: ##vso[task.logissue type=error;]at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48)%0D%0A at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:84)%0D%0A at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)%0D%0A at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)%0D%0A at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:121)%0D%0A at org.sonar.batch.bootstrapper.Batch.doExecuteTask(Batch.java:116)%0D%0A at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:71)%0D%0A at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
	at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48)
	at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:84)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
	at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:121)
	at org.sonar.batch.bootstrapper.Batch.doExecuteTask(Batch.java:116)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:71)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Processed: ##vso[task.logissue type=error;]at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)%0D%0A at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)%0D%0A at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)%0D%0A at java.lang.reflect.Method.invoke(Method.java:498)%0D%0A at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)%0D%0A at com.sun.proxy.$Proxy0.execute(Unknown Source)%0D%0A at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)%0D%0A at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)%0D%0A at org.sonarsource.scanner.cli.Main.execute(Main.java:112)%0D%0A at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
	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:498)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
	at com.sun.proxy.$Proxy0.execute(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Processed: ##vso[task.logissue type=error;]at org.sonarsource.scanner.cli.Main.main(Main.java:61)
	at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.issue.ModuleIssues
Processed: ##vso[task.logissue type=error;]Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.issue.ModuleIssues
Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.issue.ModuleIssues
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:64)
Processed: ##vso[task.logissue type=error;]at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:64)%0D%0A at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:632)%0D%0A at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)%0D%0A at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)%0D%0A at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)
	at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:64)
	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:632)
	at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)
	at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)
at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(ConstructorInjector.java:309)
Processed: at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)##vso[task.logissue type=error;]at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(ConstructorInjector.java:309)%0D%0A at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:335)%0D%0A at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)%0D%0A at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)
	at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(ConstructorInjector.java:309)
	at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:335)
	at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
	at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
Processed: ##vso[task.logissue type=error;]at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)%0D%0A at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)%0D%0A at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)%0D%0A at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)%0D%0A at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)%0D%0A at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:62)
	at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
	at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
	at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
	at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)
	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
	at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:62)
... 29 more
Processed: ##vso[task.logissue type=error;]... 29 more
	... 29 more
Caused by: java.lang.IllegalStateException: Unable to load component interface org.sonar.api.batch.rule.Rules
Processed: ##vso[task.logissue type=error;]Caused by: java.lang.IllegalStateException: Unable to load component interface org.sonar.api.batch.rule.Rules%0D%0A at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:64)%0D%0A at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:632)
Caused by: java.lang.IllegalStateException: Unable to load component interface org.sonar.api.batch.rule.Rules
	at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:64)
	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:632)
at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)
Processed: ##vso[task.logissue type=error;]at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)%0D%0A at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)%0D%0A at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)%0D%0A at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(ConstructorInjector.java:309)%0D%0A at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:335)
	at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)
	at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)
	at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)
	at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(ConstructorInjector.java:309)
	at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:335)
at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
Processed: ##vso[task.logissue type=error;]at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)%0D%0A at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)%0D%0A at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)%0D%0A at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)%0D%0A at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)%0D%0A at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)%0D%0A at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)%0D%0A at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:62)%0D%0A ... 43 more
	at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
	at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)
	at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
	at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
	at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
	at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)
	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
	at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:62)
	... 43 more
Caused by: java.lang.IllegalStateException: Unable to load component interface org.sonar.api.batch.rule.Rules
Processed: ##vso[task.logissue type=error;]Caused by: java.lang.IllegalStateException: Unable to load component interface org.sonar.api.batch.rule.Rules%0D%0A at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:64)%0D%0A at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:621)%0D%0A at org.picocontainer.containers.ImmutablePicoContainer.getComponent(ImmutablePicoContainer.java:40)%0D%0A at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:718)%0D%0A at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)%0D%0A at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:62)%0D%0A ... 57 more
Caused by: java.lang.IllegalStateException: Unable to load component interface org.sonar.api.batch.rule.Rules
	at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:64)
	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:621)
	at org.picocontainer.containers.ImmutablePicoContainer.getComponent(ImmutablePicoContainer.java:40)
	at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:718)
	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
	at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:62)
	... 57 more
Caused by: java.lang.IllegalStateException: Unable to get rules
Processed: ##vso[task.logissue type=error;]Caused by: java.lang.IllegalStateException: Unable to get rules%0D%0A at org.sonar.scanner.rule.DefaultRulesLoader.loadFromStream(DefaultRulesLoader.java:51)
Caused by: java.lang.IllegalStateException: Unable to get rules
	at org.sonar.scanner.rule.DefaultRulesLoader.loadFromStream(DefaultRulesLoader.java:51)
at org.sonar.scanner.rule.DefaultRulesLoader.load(DefaultRulesLoader.java:43)
Processed: ##vso[task.logissue type=error;]at org.sonar.scanner.rule.DefaultRulesLoader.load(DefaultRulesLoader.java:43)%0D%0A at org.sonar.scanner.rule.RulesProvider.load(RulesProvider.java:47)%0D%0A at org.sonar.scanner.rule.RulesProvider.provide(RulesProvider.java:40)%0D%0A at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)%0D%0A at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at org.sonar.scanner.rule.DefaultRulesLoader.load(DefaultRulesLoader.java:43)
	at org.sonar.scanner.rule.RulesProvider.load(RulesProvider.java:47)
	at org.sonar.scanner.rule.RulesProvider.provide(RulesProvider.java:40)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Processed: ##vso[task.logissue type=error;]at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)%0D%0A at java.lang.reflect.Method.invoke(Method.java:498)%0D%0A at org.picocontainer.injectors.MethodInjector.invokeMethod(MethodInjector.java:129)%0D%0A at org.picocontainer.injectors.MethodInjector.access$000(MethodInjector.java:39)%0D%0A at org.picocontainer.injectors.MethodInjector$2.run(MethodInjector.java:113)%0D%0A at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.picocontainer.injectors.MethodInjector.invokeMethod(MethodInjector.java:129)
	at org.picocontainer.injectors.MethodInjector.access$000(MethodInjector.java:39)
	at org.picocontainer.injectors.MethodInjector$2.run(MethodInjector.java:113)
	at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
at org.picocontainer.injectors.MethodInjector.decorateComponentInstance(MethodInjector.java:120)
Processed: ##vso[task.logissue type=error;]at org.picocontainer.injectors.MethodInjector.decorateComponentInstance(MethodInjector.java:120)%0D%0A at org.picocontainer.injectors.CompositeInjector.decorateComponentInstance(CompositeInjector.java:58)%0D%0A at org.picocontainer.injectors.Reinjector.reinject(Reinjector.java:142)%0D%0A at org.picocontainer.injectors.ProviderAdapter.getComponentInstance(ProviderAdapter.java:96)%0D%0A at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)%0D%0A at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
	at org.picocontainer.injectors.MethodInjector.decorateComponentInstance(MethodInjector.java:120)
	at org.picocontainer.injectors.CompositeInjector.decorateComponentInstance(CompositeInjector.java:58)
	at org.picocontainer.injectors.Reinjector.reinject(Reinjector.java:142)
	at org.picocontainer.injectors.ProviderAdapter.getComponentInstance(ProviderAdapter.java:96)
	at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)
	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:62)
Processed: ##vso[task.logissue type=error;]at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:62)%0D%0A ... 62 more
	at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:62)
	... 62 more
Caused by: com.google.protobuf.InvalidProtocolBufferException: unexpected end of stream
Processed: ##vso[task.logissue type=error;]Caused by: com.google.protobuf.InvalidProtocolBufferException: unexpected end of stream%0D%0A at org.sonarqube.ws.Rules$ListResponse$Rule.<init>(Rules.java:257)%0D%0A at org.sonarqube.ws.Rules$ListResponse$Rule.<init>(Rules.java:184)%0D%0A at org.sonarqube.ws.Rules$ListResponse$Rule$1.parsePartialFrom(Rules.java:1036)%0D%0A at org.sonarqube.ws.Rules$ListResponse$Rule$1.parsePartialFrom(Rules.java:1030)
Caused by: com.google.protobuf.InvalidProtocolBufferException: unexpected end of stream
	at org.sonarqube.ws.Rules$ListResponse$Rule.<init>(Rules.java:257)
	at org.sonarqube.ws.Rules$ListResponse$Rule.<init>(Rules.java:184)
	at org.sonarqube.ws.Rules$ListResponse$Rule$1.parsePartialFrom(Rules.java:1036)
	at org.sonarqube.ws.Rules$ListResponse$Rule$1.parsePartialFrom(Rules.java:1030)
at com.google.protobuf.CodedInputStream.readMessage(CodedInputStream.java:495)
Processed: ##vso[task.logissue type=error;]at com.google.protobuf.CodedInputStream.readMessage(CodedInputStream.java:495)%0D%0A at org.sonarqube.ws.Rules$ListResponse.<init>(Rules.java:90)%0D%0A at org.sonarqube.ws.Rules$ListResponse.<init>(Rules.java:46)%0D%0A at org.sonarqube.ws.Rules$ListResponse$1.parsePartialFrom(Rules.java:1609)%0D%0A at org.sonarqube.ws.Rules$ListResponse$1.parsePartialFrom(Rules.java:1603)%0D%0A at com.google.protobuf.AbstractParser.parsePartialFrom(AbstractParser.java:192)%0D%0A at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:210)%0D%0A at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:215)%0D%0A at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:49)%0D%0A at org.sonarqube.ws.Rules$ListResponse.parseFrom(Rules.java:1154)%0D%0A at org.sonar.scanner.rule.DefaultRulesLoader.loadFromStream(DefaultRulesLoader.java:49)%0D%0A ... 80 more
	at com.google.protobuf.CodedInputStream.readMessage(CodedInputStream.java:495)
	at org.sonarqube.ws.Rules$ListResponse.<init>(Rules.java:90)
	at org.sonarqube.ws.Rules$ListResponse.<init>(Rules.java:46)
	at org.sonarqube.ws.Rules$ListResponse$1.parsePartialFrom(Rules.java:1609)
	at org.sonarqube.ws.Rules$ListResponse$1.parsePartialFrom(Rules.java:1603)
	at com.google.protobuf.AbstractParser.parsePartialFrom(AbstractParser.java:192)
	at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:210)
	at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:215)
	at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:49)
	at org.sonarqube.ws.Rules$ListResponse.parseFrom(Rules.java:1154)
	at org.sonar.scanner.rule.DefaultRulesLoader.loadFromStream(DefaultRulesLoader.java:49)
Processed: ... 80 more##vso[task.logissue type=error;]
Exit code 1 received from tool 'E:\Dev\Agent-svc\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.11.0\sonar-scanner\bin\sonar-scanner.bat'
STDIO streams have closed for tool 'E:\Dev\Agent-svc\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.11.0\sonar-scanner\bin\sonar-scanner.bat'
task result: Failed
The process 'E:\Dev\Agent-svc\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.11.0\sonar-scanner\bin\sonar-scanner.bat' failed with exit code 1
Processed: ##vso[task.issue type=error;]The process 'E:\Dev\Agent-svc\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.11.0\sonar-scanner\bin\sonar-scanner.bat' failed with exit code 1
Processed: ##vso[task.complete result=Failed;]The process 'E:\Dev\Agent-svc\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.11.0\sonar-scanner\bin\sonar-scanner.bat' failed with exit code 1
******************************************************************************
Finishing: Run Code Analysis
******************************************************************************

Hi,

Sorry, but we’re not going to be able to help you with SonarQube 6.7.5; it’s past EOL. You should upgrade immediately. Your upgrade path is:

6.7.5 -> 7.9.4 -> 8.5 (last step optional)

If the problem persists after upgrade, please come back to us.

 
Ann

So then this becomes a stalemate because I can’t update Production until I can test successfully in DEV. I’m not asking for extensive help, just take a peek and see if it looks familiar. The exact same pipeline works if I point to Production.

Here’s is what I have been able to narrow it down to… I believe the cause of the failure is what is returned by this call:
DEBUG: GET 200 https://sonar-corp-d1.wpsic.com/api/rules/list.protobuf | time=204ms
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------

is there a way to backup the current rule set and go with a “default” set. Currently in test it shouls we have 4121 rules, while in prod we have 3347

Hi,

At the risk of arguing your own process with you, it doesn’t make sense to me that you have to set something new up in DEV to test the pre-upgrade state, rather than just doing the upgrade in DEV and testing that. But okay.

What I can say (again, at the risk of being annoying) is that if you have it working in one environment and not the other then it’s probably the environment.

What I find odd about your narrowed-down snippet is that you get a 200 response code and then an error. Is there any more to the log that you can provide?

Are you asking about syncing the rules from PROD to DEV? If so, there is export/import functionality. Look under the cog menu for the origin profile. The page-level ‘Restore’ button is import.

 
HTH,
Ann

Thanks for taking a 2nd look.

When I run this call in production: https://sonarxxxxx.com/api/rules/list.protobuf in Postman I get the same response each time and the file size is always 272.03kb. I ran a loop in Postman, 100 times and always returns the same thing.

When I run the same thing in DEV: https://sonarxxxxx-D.com/api/rules/list.protobuf in Postman I get a different response each time and the files size is different each time. I suspect that what ever it’s retuning is not what the standalone scanner is expecting and that is throwing the error.

What is that call supposed to be returning (/api/rules/list.protobuf)

Hi,

No clue, to be honest. That’s an implementation detail I’ve never needed to know about before; it just works. Based on the URL, I’d guess it’s a list of rules to apply in the analysis.

 
:woman_shrugging:
Ann