NullPointerException in version 5.4.0 task - Azure DevOps Windows Agent environment

Versions used:

SonarScanner 4.6.2.2472
SonarQube server 9.4.0
Java 11.0.14.1 Eclipse Adoptium (64-bit)
Azure PIpelines Task Version: 5.4.0
Windows Server 2022 10.0 amd64

What we are trying to achieve

Perform code analysis on Azure-Hosted VM.

Issue description:

Since April 13, pipeline execution started to fail with the error listed below. Task definition uses ‘windows-latest’ agent specification.

Any ideas of what might affect the task execution with this configuration? There were no pipeline changes on our end, and nothing I could find online.

Thanks,

Starting: Run Code Analysis
==============================================================================
Task         : Run Code Analysis
Description  : Run scanner and upload the results to the SonarQube server.
Version      : 5.4.0
Author       : sonarsource
Help         : Version: 5.4.0. This task is not needed for Maven and Gradle projects since the scanner should be run as part of the build.

[More Information](http://redirect.sonarsource.com/doc/install-configure-scanner-tfs-ts.html)
==============================================================================
C:\Windows\system32\cmd.exe /D /S /C "D:\a\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\5.4.0\sonar-scanner\bin\sonar-scanner.bat"
INFO: Scanner configuration file: D:\a\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\5.4.0\sonar-scanner\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarScanner 4.6.2.2472
INFO: Java 11.0.14.1 Eclipse Adoptium (64-bit)
INFO: Windows Server 2022 10.0 amd64
INFO: User cache: C:\Users\VssAdministrator\.sonar\cache
INFO: Scanner configuration file: D:\a\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\5.4.0\sonar-scanner\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: Analyzing on SonarQube server 9.4.0
INFO: Default locale: "en_US", source code encoding: "windows-1252" (analysis is platform dependent)
INFO: Load global settings
INFO: Load global settings (done) | time=288ms
INFO: Server id: C67360E8-AW5Lb5NgCUW-YSx3V6Mn
INFO: User cache: C:\Users\VssAdministrator\.sonar\cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=290ms
INFO: Load/download plugins (done) | time=8515ms
INFO: Process project properties
INFO: Process project properties (done) | time=17ms
INFO: Execute project builders
INFO: Execute project builders (done) | time=3ms
INFO: Project key: repo-name-placeholder
INFO: Base dir: D:\a\1\s
INFO: Working dir: D:\a\1\s\.scannerwork
INFO: Load project settings for component key: 'repo-name-placeholder'
INFO: Load project settings for component key: 'repo-name-placeholder' (done) | time=102ms
INFO: Auto-configuring with CI 'Azure DevOps'
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=278ms
INFO: Load active rules
WARN: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@6e9175d8-org.sonar.scanner.report.ReportPublisher': Unsatisfied dependency expressed through constructor parameter 7; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@6e9175d8-org.sonar.scanner.report.ActiveRulesPublisher': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ActiveRules' defined in org.sonar.scanner.rule.ActiveRulesProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.api.batch.rule.internal.DefaultActiveRules]: Factory method 'provide' threw exception; nested exception is java.lang.NullPointerException
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 27.486s
INFO: Final Memory: 8M/34M
INFO: ------------------------------------------------------------------------
##[error]ERROR: Error during SonarScanner execution
ERROR: Error during SonarScanner execution
 ##[error]org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@6e9175d8-org.sonar.scanner.report.ReportPublisher': Unsatisfied dependency expressed through constructor parameter 7; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@6e9175d8-org.sonar.scanner.report.ActiveRulesPublisher': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ActiveRules' defined in org.sonar.scanner.rule.ActiveRulesProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.api.batch.rule.internal.DefaultActiveRules]: Factory method 'provide' threw exception; nested exception is java.lang.NullPointerException
 org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@6e9175d8-org.sonar.scanner.report.ReportPublisher': Unsatisfied dependency expressed through constructor parameter 7; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@6e9175d8-org.sonar.scanner.report.ActiveRulesPublisher': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ActiveRules' defined in org.sonar.scanner.rule.ActiveRulesProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.api.batch.rule.internal.DefaultActiveRules]: Factory method 'provide' threw exception; nested exception is java.lang.NullPointerException
 ##[error]at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
 	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
 ##[error]at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
 	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229)
 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
 	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
 	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
 	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
 	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
 ##[error]at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:953)
 ##[error]at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
 ##[error]at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
 ##[error]at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:187)
 ##[error]at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
 ##[error]at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:134)
 	at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:134)
 ##[error]at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	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)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@6e9175d8-org.sonar.scanner.report.ActiveRulesPublisher': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ActiveRules' defined in org.sonar.scanner.rule.ActiveRulesProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.api.batch.rule.internal.DefaultActiveRules]: Factory method 'provide' threw exception; nested exception is java.lang.NullPointerException
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1607)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1571)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1437)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1347)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1309)
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887)
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791)
	... 31 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ActiveRules' defined in org.sonar.scanner.rule.ActiveRulesProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.api.batch.rule.internal.DefaultActiveRules]: Factory method 'provide' threw exception; nested exception is java.lang.NullPointerException
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1389)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1309)
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887)
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791)
	... 48 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.api.batch.rule.internal.DefaultActiveRules]: Factory method 'provide' threw exception; nested exception is java.lang.NullPointerException
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
	... 62 more
Caused by: java.lang.NullPointerException
	at org.sonar.scanner.rule.DefaultActiveRulesLoader.readPage(DefaultActiveRulesLoader.java:103)
	at org.sonar.scanner.rule.DefaultActiveRulesLoader.load(DefaultActiveRulesLoader.java:63)
	at org.sonar.scanner.rule.ActiveRulesProvider.load(ActiveRulesProvider.java:98)
	at org.sonar.scanner.rule.ActiveRulesProvider.load(ActiveRulesProvider.java:61)
	at org.sonar.scanner.rule.ActiveRulesProvider.provide(ActiveRulesProvider.java:49)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
	... 63 more
ERROR: 
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
 	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
 	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
 	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
 	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
 	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
 	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)
 Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@6e9175d8-org.sonar.scanner.report.ActiveRulesPublisher': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ActiveRules' defined in org.sonar.scanner.rule.ActiveRulesProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.api.batch.rule.internal.DefaultActiveRules]: Factory method 'provide' threw exception; nested exception is java.lang.NullPointerException
 	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
 	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229)
 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
 	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
 	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
 	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
 	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
 	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1607)
 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1571)
 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1437)
 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1347)
 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1309)
 	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887)
 	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791)
 	... 31 more
 Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ActiveRules' defined in org.sonar.scanner.rule.ActiveRulesProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.api.batch.rule.internal.DefaultActiveRules]: Factory method 'provide' threw exception; nested exception is java.lang.NullPointerException
 	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658)
 	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638)
 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
 	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
 	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
 	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
 	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
 	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1389)
 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1309)
 	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887)
 	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791)
 	... 48 more
 Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.api.batch.rule.internal.DefaultActiveRules]: Factory method 'provide' threw exception; nested exception is java.lang.NullPointerException
 	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
 	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
 	... 62 more
 Caused by: java.lang.NullPointerException
 	at org.sonar.scanner.rule.DefaultActiveRulesLoader.readPage(DefaultActiveRulesLoader.java:103)
 	at org.sonar.scanner.rule.DefaultActiveRulesLoader.load(DefaultActiveRulesLoader.java:63)
 	at org.sonar.scanner.rule.ActiveRulesProvider.load(ActiveRulesProvider.java:98)
 	at org.sonar.scanner.rule.ActiveRulesProvider.load(ActiveRulesProvider.java:61)
 	at org.sonar.scanner.rule.ActiveRulesProvider.provide(ActiveRulesProvider.java:49)
 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
 	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
 	... 63 more
 ERROR: 
 ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
 ##[error]The process 'D:\a\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\5.4.0\sonar-scanner\bin\sonar-scanner.bat' failed with exit code 1
 ##[section]Finishing: Run Code Analysis

Hi,

First, can you provide the full analysis log, starting from the analysis command?

The base error is this:

NullPointerException
	at org.sonar.scanner.rule.DefaultActiveRulesLoader.readPage

Which looks like it could be about communication with the server.

 
Ann

1 Like

Hello Ann! Thank you for a prompt response.

I added the task output to the initial code block containing an error. Please have a look.

Hi,

Thanks for the full log. Could you run this one more time in debug mode? With -Dsonar.log.level=DEBUG on the analysis command line & provide those logs?

 
Thx,
Ann

Dear Ann, I could not find in available technical documentation the way to add it when using ADO yaml task. Would it be correct this way? Thank you!

    - task: SonarQubeAnalyze@5
      inputs:
        extraProperties: |
          sonar.log.level=DEBUG

Hi,

Based on what I’m seeing in the docs I think it would need to go in the ‘prepare’ step:

steps:
# Prepare Analysis Configuration task
- task: SonarQubePrepare@5
  inputs:
    SonarQube: 'YourSonarqubeServerEndpoint'
    extraProperties: 'sonar.log.level=DEBUG'

 
Ann

1 Like

Here how the current task looks like:

steps:
- task: SonarSource.sonarqube.15B84CA1-B62F-4A2A-A403-89B77A063157.SonarQubePrepare@5
  displayName: 'Prepare analysis on SonarQube'
  inputs:
    SonarQube: 'placeholder'
    scannerMode: CLI
    configMode: manual
    cliProjectKey: '$(Build.Repository.Name)'
    cliProjectName: '$(Build.Repository.Name)'
    cliProjectVersion: '$(Build.BuildNumber)'
    extraProperties: |
      # Additional properties that will be passed to the scanner,
      # Put one key=value per line, example:
      # sonar.exclusions=**/*.bin
      sonar.log.level=DEBUG
      Djavax.net.debug="ssl,handshake"
      sonar.tsql.file.suffixes=.sql

The output though did not become more clear:

2022-04-19T14:04:44.4598109Z 14:04:44.458 INFO: Load active rules
2022-04-19T14:04:44.5554931Z 14:04:44.553 DEBUG: GET 200 https://hostname-placeholder.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AW6DJi-F***********&ps=500&p=1 | time=94ms
2022-04-19T14:04:44.7970354Z 14:04:44.793 DEBUG: GET 200 https://hostname-placeholder.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX29RLyH************&ps=500&p=1 | time=60ms
2022-04-19T14:04:44.8484062Z 14:04:44.846 DEBUG: GET 200 https://hostname-placeholder.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AW6DJjGy************&ps=500&p=1 | time=38ms
2022-04-19T14:04:44.9062374Z 14:04:44.905 DEBUG: GET 200 https://hostname-placeholder.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX29RL9H************&ps=500&p=1 | time=58ms
2022-04-19T14:04:44.9895576Z 14:04:44.987 DEBUG: GET 200 https://hostname-placeholder.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX29RMG-*************&ps=500&p=1 | time=66ms
2022-04-19T14:04:45.1574262Z 14:04:45.155 DEBUG: GET 200 https://hostname-placeholder.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AW6DJjRD************&ps=500&p=1 | time=128ms
2022-04-19T14:04:45.3198294Z 14:04:45.318 DEBUG: GET 200 https://hostname-placeholder.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AW6DJjsU************&ps=500&p=1 | time=128ms
2022-04-19T14:04:45.4488237Z 14:04:45.446 DEBUG: GET 200 https://hostname-placeholder.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX29RM1Z************&ps=500&p=1 | time=103ms
2022-04-19T14:04:45.5624886Z 14:04:45.560 DEBUG: GET 200 https://hostname-placeholder.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AW6DJirX************&ps=500&p=1 | time=109ms
2022-04-19T14:04:45.7935823Z 14:04:45.791 DEBUG: GET 200 https://hostname-placeholder.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXLl9xx2************&ps=500&p=1 | time=198ms
2022-04-19T14:04:45.9757043Z 14:04:45.974 DEBUG: GET 200 https://hostname-placeholder.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXLl91x************&ps=500&p=1 | time=138ms
2022-04-19T14:04:46.0019556Z 14:04:45.991 WARN: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@76b1e9b8-org.sonar.scanner.report.ReportPublisher': Unsatisfied dependency expressed through constructor parameter 7; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@76b1e9b8-org.sonar.scanner.report.ActiveRulesPublisher': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ActiveRules' defined in org.sonar.scanner.rule.ActiveRulesProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.api.batch.rule.internal.DefaultActiveRules]: Factory method 'provide' threw exception; nested exception is java.lang.NullPointerException
2022-04-19T14:04:46.0376915Z 14:04:46.035 INFO: ------------------------------------------------------------------------
2022-04-19T14:04:46.0382076Z 14:04:46.035 INFO: EXECUTION FAILURE
2022-04-19T14:04:46.0383317Z 14:04:46.035 INFO: ------------------------------------------------------------------------
2022-04-19T14:04:46.0384968Z 14:04:46.036 INFO: Total time: 20.079s
2022-04-19T14:04:46.0980795Z 14:04:46.095 INFO: Final Memory: 8M/34M
2022-04-19T14:04:46.1007773Z ##[error]14:04:46.096 ERROR: Error during SonarScanner execution
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@76b1e9b8-org.sonar.scanner.report.ReportPublisher': Unsatisfied dependency expressed through constructor parameter 7; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@76b1e9b8-org.sonar.scanner.report.ActiveRulesPublisher': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ActiveRules' defined in org.sonar.scanner.rule.ActiveRulesProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.api.batch.rule.internal.DefaultActiveRules]: Factory method 'provide' threw exception; nested exception is java.lang.NullPointerException
2022-04-19T14:04:46.1014018Z 14:04:46.096 ERROR: Error during SonarScanner execution
2022-04-19T14:04:46.1018660Z org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@76b1e9b8-org.sonar.scanner.report.ReportPublisher': Unsatisfied dependency expressed through constructor parameter 7; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@76b1e9b8-org.sonar.scanner.report.ActiveRulesPublisher': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ActiveRules' defined in org.sonar.scanner.rule.ActiveRulesProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.api.batch.rule.internal.DefaultActiveRules]: Factory method 'provide' threw exception; nested exception is java.lang.NullPointerException
2022-04-19T14:04:46.1023631Z 14:04:46.096 INFO: ------------------------------------------------------------------------
2022-04-19T14:04:46.1048276Z ##[error]at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:953)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:187)
	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
	at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:134)
	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
2022-04-19T14:04:46.1063585Z 	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
2022-04-19T14:04:46.1064434Z 	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229)
2022-04-19T14:04:46.1065325Z 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
2022-04-19T14:04:46.1067503Z 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
2022-04-19T14:04:46.1069135Z 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
2022-04-19T14:04:46.1070557Z 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
2022-04-19T14:04:46.1071969Z 	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
2022-04-19T14:04:46.1078797Z 	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
2022-04-19T14:04:46.1080402Z 	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
2022-04-19T14:04:46.1083460Z 	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
2022-04-19T14:04:46.1084821Z 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:953)
2022-04-19T14:04:46.1086363Z 	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
2022-04-19T14:04:46.1087799Z 	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
2022-04-19T14:04:46.1090619Z 	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:187)
2022-04-19T14:04:46.1092968Z 	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
2022-04-19T14:04:46.1095681Z 	at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:134)
2022-04-19T14:04:46.1104312Z 	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
2022-04-19T14:04:46.1112090Z 	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
2022-04-19T14:04:46.1113230Z 	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
2022-04-19T14:04:46.1169788Z ##[error]at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	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)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@76b1e9b8-org.sonar.scanner.report.ActiveRulesPublisher': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ActiveRules' defined in org.sonar.scanner.rule.ActiveRulesProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.api.batch.rule.internal.DefaultActiveRules]: Factory method 'provide' threw exception; nested exception is java.lang.NullPointerException
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1607)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1571)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1437)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1347)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1309)
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887)
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791)
	... 31 more
2022-04-19T14:04:46.1193826Z 
2022-04-19T14:04:46.1194433Z 	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
2022-04-19T14:04:46.1195086Z 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2022-04-19T14:04:46.1195732Z 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2022-04-19T14:04:46.1197659Z 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2022-04-19T14:04:46.1199105Z 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
2022-04-19T14:04:46.1199889Z 	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
2022-04-19T14:04:46.1200694Z 	at com.sun.proxy.$Proxy0.execute(Unknown Source)
2022-04-19T14:04:46.1201508Z 	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
2022-04-19T14:04:46.1205378Z 	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
2022-04-19T14:04:46.1209646Z 	at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
2022-04-19T14:04:46.1210197Z 	at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
2022-04-19T14:04:46.1210716Z 	at org.sonarsource.scanner.cli.Main.main(Main.java:61)
2022-04-19T14:04:46.1212615Z Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@76b1e9b8-org.sonar.scanner.report.ActiveRulesPublisher': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ActiveRules' defined in org.sonar.scanner.rule.ActiveRulesProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.api.batch.rule.internal.DefaultActiveRules]: Factory method 'provide' threw exception; nested exception is java.lang.NullPointerException
2022-04-19T14:04:46.1214639Z 	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
2022-04-19T14:04:46.1215447Z 	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229)
2022-04-19T14:04:46.1219704Z 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
2022-04-19T14:04:46.1220738Z 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
2022-04-19T14:04:46.1221868Z 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
2022-04-19T14:04:46.1222774Z 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
2022-04-19T14:04:46.1223636Z 	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
2022-04-19T14:04:46.1224467Z 	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
2022-04-19T14:04:46.1225266Z 	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
2022-04-19T14:04:46.1226020Z 	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
2022-04-19T14:04:46.1228447Z 	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
2022-04-19T14:04:46.1229606Z 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1607)
2022-04-19T14:04:46.1230532Z 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1571)
2022-04-19T14:04:46.1231432Z 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1437)
2022-04-19T14:04:46.1232305Z 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1347)
2022-04-19T14:04:46.1233194Z 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1309)
2022-04-19T14:04:46.1234048Z 	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887)
2022-04-19T14:04:46.1234868Z 	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791)
2022-04-19T14:04:46.1235385Z 	... 31 more
2022-04-19T14:04:46.1240634Z ##[error]Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ActiveRules' defined in org.sonar.scanner.rule.ActiveRulesProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.api.batch.rule.internal.DefaultActiveRules]: Factory method 'provide' threw exception; nested exception is java.lang.NullPointerException
2022-04-19T14:04:46.1249506Z ##[error]at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
2022-04-19T14:04:46.1254261Z 
2022-04-19T14:04:46.1255605Z 	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658)
2022-04-19T14:04:46.1257636Z 	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638)
2022-04-19T14:04:46.1260417Z 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
2022-04-19T14:04:46.1261750Z 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
2022-04-19T14:04:46.1262797Z 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
2022-04-19T14:04:46.1263825Z 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
2022-04-19T14:04:46.1264793Z 	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
2022-04-19T14:04:46.1271579Z ##[error]at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1389)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1309)
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887)
2022-04-19T14:04:46.1275587Z 	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
2022-04-19T14:04:46.1278428Z 	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
2022-04-19T14:04:46.1279528Z 	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
2022-04-19T14:04:46.1280343Z 	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
2022-04-19T14:04:46.1281171Z 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1389)
2022-04-19T14:04:46.1282055Z 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1309)
2022-04-19T14:04:46.1282913Z 	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887)
2022-04-19T14:04:46.1284430Z ##[error]at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791)
	... 48 more
2022-04-19T14:04:46.1285726Z 	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791)
2022-04-19T14:04:46.1286277Z 	... 48 more
2022-04-19T14:04:46.1289585Z ##[error]Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.api.batch.rule.internal.DefaultActiveRules]: Factory method 'provide' threw exception; nested exception is java.lang.NullPointerException
2022-04-19T14:04:46.1292192Z 
2022-04-19T14:04:46.1293316Z ##[error]at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
2022-04-19T14:04:46.1295130Z ##[error]at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
	... 62 more
2022-04-19T14:04:46.1295932Z 
2022-04-19T14:04:46.1298106Z 	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
2022-04-19T14:04:46.1298888Z 	... 62 more
2022-04-19T14:04:46.1301037Z ##[error]Caused by: java.lang.NullPointerException
	at org.sonar.scanner.rule.DefaultActiveRulesLoader.readPage(DefaultActiveRulesLoader.java:103)
2022-04-19T14:04:46.1302140Z Caused by: java.lang.NullPointerException
2022-04-19T14:04:46.1305927Z ##[error]at org.sonar.scanner.rule.DefaultActiveRulesLoader.load(DefaultActiveRulesLoader.java:63)
	at org.sonar.scanner.rule.ActiveRulesProvider.load(ActiveRulesProvider.java:98)
	at org.sonar.scanner.rule.ActiveRulesProvider.load(ActiveRulesProvider.java:61)
	at org.sonar.scanner.rule.ActiveRulesProvider.provide(ActiveRulesProvider.java:49)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2022-04-19T14:04:46.1312183Z 
2022-04-19T14:04:46.1312687Z 	at org.sonar.scanner.rule.DefaultActiveRulesLoader.load(DefaultActiveRulesLoader.java:63)
2022-04-19T14:04:46.1313333Z 	at org.sonar.scanner.rule.ActiveRulesProvider.load(ActiveRulesProvider.java:98)
2022-04-19T14:04:46.1313965Z 	at org.sonar.scanner.rule.ActiveRulesProvider.load(ActiveRulesProvider.java:61)
2022-04-19T14:04:46.1314617Z 	at org.sonar.scanner.rule.ActiveRulesProvider.provide(ActiveRulesProvider.java:49)
2022-04-19T14:04:46.1315204Z 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2022-04-19T14:04:46.1315842Z 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2022-04-19T14:04:46.1318271Z 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2022-04-19T14:04:46.1320063Z ##[error]at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
2022-04-19T14:04:46.1321364Z 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
2022-04-19T14:04:46.1322055Z 	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
2022-04-19T14:04:46.1322889Z ##[error]... 63 more
2022-04-19T14:04:46.1323561Z 	... 63 more
2022-04-19T14:04:46.1324145Z ##[error]14:04:46.109 ERROR:
2022-04-19T14:04:46.1324864Z 14:04:46.109 ERROR: 
2022-04-19T14:04:46.1325746Z ##[error]14:04:46.109 ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
2022-04-19T14:04:46.1328485Z 14:04:46.109 ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
2022-04-19T14:04:46.5219164Z ##[error]The process 'D:\a\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\5.4.0\sonar-scanner\bin\sonar-scanner.bat' failed with exit code 1
2022-04-19T14:04:46.5334696Z ##[section]Finishing: Run Code Analysis

So where is it better to look for this ‘ActiveRules’ source? Is there any way we can reproduce the failed query in the browser or any other tool?
After restarting the sonarqube pod with the same image, code analysis task works correctly again, so might be an environment issue, but not clear where to look at.

Any advice is much appreciated. Thanks!

Hi,

Do you have a full stacktrace available for this error? We’re not likely to get very far without it. :frowning:

On the other hand, if a restart made it go away… well, that’s not actually comforting. But if it’s not reproducible then I think we have to chalk it up to environment…?

 
Ann

1 Like

My apologies, Ann. Updated the previous message with the full trace, and part of the log before error.

Hi,

Thanks for updating with the full error. That will be helpful if this happens again.

Is it happening again?

 
Ann

Hey, not yet. Looks good after the last restart. But happens once in a while, so I wanted to find a root cause to prevent future failures.

1 Like

Hi,

I don’t suppose you’ve noticed any patterns?

 
Ann

Hi Ann! We were observing the instance behavior for a while. It seems that the issue was related to usage of fileshare for storing temporary data, instead of virtual disk. I noticed the following failures in the logs:

│ sonarqube 2022.04.26 09:56:44 ERROR ce[AYBlOmdmF9y4mQg4sKtt][o.s.a.i.u.DefaultTempFolder] Failed to delete temp folder                                                                                                                                                                                                    │
│ sonarqube java.nio.file.DirectoryNotEmptyException: /opt/sonarqube/temp/ce/13976183012319939571/3711524597890271724                                                                                                                                                                                                       │
│ sonarqube     at java.base/sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:247)                                                                                                                                                                                                                  │
│ sonarqube     at java.base/sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:110)                                                                                                                                                                                                      │
│ sonarqube     at java.base/java.nio.file.Files.deleteIfExists(Files.java:1181)                                                                                                                                                                                                                                            │
│ sonarqube     at org.sonar.api.impl.utils.DefaultTempFolder$DeleteRecursivelyFileVisitor.postVisitDirectory(DefaultTempFolder.java:128)                                                                                                                                                                                   │
│ sonarqube     at org.sonar.api.impl.utils.DefaultTempFolder$DeleteRecursivelyFileVisitor.postVisitDirectory(DefaultTempFolder.java:117)                                                                                                                                                                                   │
│ sonarqube     at java.base/java.nio.file.Files.walkFileTree(Files.java:2743)                                                                                                                                                                                                                                              │
│ sonarqube     at java.base/java.nio.file.Files.walkFileTree(Files.java:2797)                                                                                                                                                                                                                                              │
│ sonarqube     at org.sonar.api.impl.utils.DefaultTempFolder.clean(DefaultTempFolder.java:98)                                                                                                                                                                                                                              │
│ sonarqube     at org.sonar.api.impl.utils.DefaultTempFolder.stop(DefaultTempFolder.java:113)                                                                                                                                                                                                                              │
│ sonarqube     at org.sonar.core.platform.StartableBeanPostProcessor.postProcessBeforeDestruction(StartableBeanPostProcessor.java:48)                                                                                                                                                                                      │
│ sonarqube     at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:197)                                                                                                                                                                                                  │
│ sonarqube     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:587)                                                                                                                                                                                │
│ sonarqube     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:559)                                                                                                                                                                           │
│ sonarqube     at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:1161)                                                                                                                                                                              │
│ sonarqube     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:520)                                                                                                                                                                          │
│ sonarqube     at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons(DefaultListableBeanFactory.java:1154)                                                                                                                                                                             │
│ sonarqube     at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1106)                                                                                                                                                                                        │
│ sonarqube     at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1075)                                                                                                                                                                                             │
│ sonarqube     at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1021)                                                                                                                                                                                               │
│ sonarqube     at org.sonar.core.platform.SpringComponentContainer.stopComponents(SpringComponentContainer.java:196)                                                                                                                                                                                                       │
│ sonarqube     at org.sonar.ce.task.container.TaskContainerImpl.close(TaskContainerImpl.java:52)                                                                                                                                                                                                                           │
│ sonarqube     at org.sonar.ce.task.projectanalysis.taskprocessor.ReportTaskProcessor.process(ReportTaskProcessor.java:77)                                                                                                                                                                                                 │
│ sonarqube     at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.executeTask(CeWorkerImpl.java:212)                                                                                                                                                                                                                   │
│ sonarqube     at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.run(CeWorkerImpl.java:194)                                                                                                                                                                                                                           │
│ sonarqube     at org.sonar.ce.taskprocessor.CeWorkerImpl.findAndProcessTask(CeWorkerImpl.java:160)                                                                                                                                                                                                                        │
│ sonarqube     at org.sonar.ce.taskprocessor.CeWorkerImpl$TrackRunningState.get(CeWorkerImpl.java:135)                                                                                                                                                                                                                     │
│ sonarqube     at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:87)                                                                                                                                                                                                                                       │
│ sonarqube     at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:53)                                                                                                                                                                                                                                       │
│ sonarqube     at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131)                                                                                                                                                      │
│ sonarqube     at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:74)                                                                                                                                                                                                                       │
│ sonarqube     at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82)                                                                                                                                                                                                   │
│ sonarqube     at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)                                                                                                                                                                                                                        │
│ sonarqube     at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)                                                                                                                                                                                                                                       │
│ sonarqube     at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)                                                                                                                                                                                 │
│ sonarqube     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)                                                                                                                                                                                                                │
│ sonarqube     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)                                                                                                                                                                                                                │
│ sonarqube     at java.base/java.lang.Thread.run(Thread.java:829)                                                                                                                                                                                                                                                          │
│ sonarqube 2022.04.26 09:56:44 ERROR ce[AYBlOmdmF9y4mQg4sKtt][o.s.c.t.CeWorkerImpl] Failed to finalize task with uuid 'AYBlOmdmF9y4mQg4sKtt' and persist its state to db                                                                                                                                                   │
│ sonarqube java.lang.IllegalStateException: Task does not exist anymore: CeTask{type=REPORT, uuid=AYBlOmdmF9y4mQg4sKtt, component=Component{uuid='AXMzYIgOjBTT0WE2AlKD', key='reponame-placeholder', name='reponame-placeholder'}, mainComponent=Component{uuid='AXMzYIgOjBTT0WE2AlKD', key='reponame-placeholder │
│ sonarqube     at org.sonar.ce.queue.InternalCeQueueImpl.lambda$remove$0(InternalCeQueueImpl.java:123)                                                                                                                                                                                                                     │
│ sonarqube     at java.base/java.util.Optional.orElseThrow(Optional.java:408)                                                                                                                                                                                                                                              │
│ sonarqube     at org.sonar.ce.queue.InternalCeQueueImpl.remove(InternalCeQueueImpl.java:123)                                                                                                                                                                                                                              │
│ sonarqube     at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.finalizeTask(CeWorkerImpl.java:245)                                                                                                                                                                                                                  │
│ sonarqube     at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.afterExecute(CeWorkerImpl.java:239)                                                                                                                                                                                                                  │
│ sonarqube     at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.close(CeWorkerImpl.java:199)                                                                                                                                                                                                                         │
│ sonarqube     at org.sonar.ce.taskprocessor.CeWorkerImpl.findAndProcessTask(CeWorkerImpl.java:161)                                                                                                                                                                                                                        │
│ sonarqube     at org.sonar.ce.taskprocessor.CeWorkerImpl$TrackRunningState.get(CeWorkerImpl.java:135)                                                                                                                                                                                                                     │
│ sonarqube     at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:87)                                                                                                                                                                                                                                       │
│ sonarqube     at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:53)                                                                                                                                                                                                                                       │
│ sonarqube     at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131)                                                                                                                                                      │
│ sonarqube     at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:74)                                                                                                                                                                                                                       │
│ sonarqube     at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82)                                                                                                                                                                                                   │
│ sonarqube     at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)                                                                                                                                                                                                                        │
│ sonarqube     at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)                                                                                                                                                                                                                                       │
│ sonarqube     at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)                                                                                                                                                                                 │
│ sonarqube     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)                                                                                                                                                                                                                │
│ sonarqube     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)                                                                                                                                                                                                                │
│ sonarqube     at java.base/java.lang.Thread.run(Thread.java:829)                                                                                                                                                                                                                                                          │

Official recommendation is to use the disk with higher performance.
Seems here that we have I/O issues, that caused other failures.

We will rework this part and closely monitor if issue happen again. Let’s put it on hold for now.
Thank you for participation :slight_smile:

1 Like

Hi Ann, sorry for not updating the topic too long.
I tried to implement disk usage instead of fileshare and it made performance better, however initial issue did not gone.

After analyzing thoroughly and comparing between successful and failed runs, I see that issue is around line 175 where it tries to load active rules from all profiles. There are 22 of them and during successful run all 22 are loaded, but when it fails I can see only 11 here…

2022-05-26T16:24:06.8787055Z ##[section]Starting: Run Code Analysis
2022-05-26T16:24:06.8978666Z ==============================================================================
2022-05-26T16:24:06.8979173Z Task         : Run Code Analysis
2022-05-26T16:24:06.8979524Z Description  : Run scanner and upload the results to the SonarQube server.
2022-05-26T16:24:06.8979818Z Version      : 5.4.0
2022-05-26T16:24:06.8980040Z Author       : sonarsource
2022-05-26T16:24:06.8980657Z Help         : Version: 5.4.0. This task is not needed for Maven and Gradle projects since the scanner should be run as part of the build.

[More Information](http://redirect.sonarsource.com/doc/install-configure-scanner-tfs-ts.html)
2022-05-26T16:24:06.8981384Z ==============================================================================
2022-05-26T16:24:07.2162007Z [command]C:\Windows\system32\cmd.exe /D /S /C "D:\a\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\5.4.0\sonar-scanner\bin\sonar-scanner.bat"
2022-05-26T16:24:08.3449944Z INFO: Scanner configuration file: D:\a\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\5.4.0\sonar-scanner\bin\..\conf\sonar-scanner.properties
2022-05-26T16:24:08.3475843Z INFO: Project root configuration file: NONE
2022-05-26T16:24:08.5184315Z 16:24:08.510 INFO: SonarScanner 4.6.2.2472
2022-05-26T16:24:08.5185882Z 16:24:08.518 INFO: Java 11.0.15 Eclipse Adoptium (64-bit)
2022-05-26T16:24:08.5186444Z 16:24:08.518 INFO: Windows Server 2022 10.0 amd64
2022-05-26T16:24:09.0646299Z 16:24:09.063 DEBUG: keyStore is : 
2022-05-26T16:24:09.0649931Z 16:24:09.063 DEBUG: keyStore type is : pkcs12
2022-05-26T16:24:09.0655957Z 16:24:09.063 DEBUG: keyStore provider is : 
2022-05-26T16:24:09.0656857Z 16:24:09.063 DEBUG: init keystore
2022-05-26T16:24:09.0664935Z 16:24:09.065 DEBUG: init keymanager of type SunX509
2022-05-26T16:24:09.5672194Z 16:24:09.566 DEBUG: Create: C:\Users\VssAdministrator\.sonar\cache
2022-05-26T16:24:09.5693812Z 16:24:09.567 INFO: User cache: C:\Users\VssAdministrator\.sonar\cache
2022-05-26T16:24:09.5695289Z 16:24:09.568 DEBUG: Create: C:\Users\VssAdministrator\.sonar\cache\_tmp
2022-05-26T16:24:09.5732651Z 16:24:09.571 DEBUG: Extract sonar-scanner-api-batch in temp...
2022-05-26T16:24:09.5819660Z 16:24:09.580 DEBUG: Get bootstrap index...
2022-05-26T16:24:09.5831648Z 16:24:09.581 DEBUG: Download: https://domain-placeholder/batch/index
2022-05-26T16:24:10.3851037Z 16:24:10.383 DEBUG: Get bootstrap completed
2022-05-26T16:24:10.3958351Z 16:24:10.391 DEBUG: Download https://domain-placeholder/batch/file?name=sonar-scanner-engine-shaded-9.4.0.54424-all.jar to C:\Users\VssAdministrator\.sonar\cache\_tmp\fileCache5167322604719311821.tmp
2022-05-26T16:24:11.7721657Z 16:24:11.759 DEBUG: Create isolated classloader...
2022-05-26T16:24:11.8016874Z 16:24:11.800 DEBUG: Start temp cleaning...
2022-05-26T16:24:11.8057561Z 16:24:11.804 DEBUG: Temp cleaning done
2022-05-26T16:24:11.8060663Z 16:24:11.804 INFO: Scanner configuration file: D:\a\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\5.4.0\sonar-scanner\bin\..\conf\sonar-scanner.properties
2022-05-26T16:24:11.8067760Z 16:24:11.805 INFO: Project root configuration file: NONE
2022-05-26T16:24:11.8086421Z 16:24:11.807 DEBUG: Execution getVersion
2022-05-26T16:24:11.8324198Z 16:24:11.829 INFO: Analyzing on SonarQube server 9.4.0
2022-05-26T16:24:11.8327034Z 16:24:11.830 INFO: Default locale: "en_US", source code encoding: "windows-1252" (analysis is platform dependent)
2022-05-26T16:24:11.8337077Z 16:24:11.832 DEBUG: Work directory: D:\a\1\s\.scannerwork
2022-05-26T16:24:11.8422911Z 16:24:11.841 DEBUG: Execution execute
2022-05-26T16:24:12.8732090Z 16:24:12.872 DEBUG: Community 9.4.0.54424
2022-05-26T16:24:13.3416506Z 16:24:13.339 INFO: Load global settings
2022-05-26T16:24:13.6487434Z 16:24:13.647 DEBUG: GET 200 https://domain-placeholder/api/settings/values.protobuf | time=302ms
2022-05-26T16:24:13.6931905Z 16:24:13.692 INFO: Load global settings (done) | time=352ms
2022-05-26T16:24:13.6948420Z 16:24:13.693 INFO: Server id: C67360E8-AW5Lb5NgCUW-YSx3V6Mn
2022-05-26T16:24:13.7188309Z 16:24:13.717 DEBUG: Create : C:\Users\VssAdministrator\.sonar\_tmp
2022-05-26T16:24:13.7197423Z 16:24:13.718 INFO: User cache: C:\Users\VssAdministrator\.sonar\cache
2022-05-26T16:24:13.7257222Z 16:24:13.724 INFO: Load/download plugins
2022-05-26T16:24:13.7258472Z 16:24:13.724 INFO: Load plugins index
2022-05-26T16:24:13.8001625Z 16:24:13.797 DEBUG: GET 200 https://domain-placeholder/api/plugins/installed | time=72ms
2022-05-26T16:24:13.9018342Z 16:24:13.900 INFO: Load plugins index (done) | time=176ms
2022-05-26T16:24:13.9075503Z 16:24:13.906 DEBUG: Download plugin 'ansible' to 'C:\Users\VssAdministrator\.sonar\_tmp\fileCache3591281541011012533.tmp'
2022-05-26T16:24:13.9375488Z 16:24:13.936 DEBUG: GET 200 https://domain-placeholder/api/plugins/download?plugin=ansible&acceptCompressions=pack200 | time=30ms
2022-05-26T16:24:14.0249435Z 16:24:14.024 DEBUG: Download plugin 'authaad' to 'C:\Users\VssAdministrator\.sonar\_tmp\fileCache5570467873012326802.tmp'
2022-05-26T16:24:14.0566263Z 16:24:14.054 DEBUG: GET 200 https://domain-placeholder/api/plugins/download?plugin=authaad&acceptCompressions=pack200 | time=30ms
2022-05-26T16:24:14.4016946Z 16:24:14.400 DEBUG: Download plugin 'csharp' to 'C:\Users\VssAdministrator\.sonar\_tmp\fileCache7585980922357453731.tmp'
2022-05-26T16:24:14.4334328Z 16:24:14.430 DEBUG: GET 200 https://domain-placeholder/api/plugins/download?plugin=csharp&acceptCompressions=pack200 | time=30ms
2022-05-26T16:24:14.7502684Z 16:24:14.747 DEBUG: Download plugin 'config' to 'C:\Users\VssAdministrator\.sonar\_tmp\fileCache16506873457122853480.tmp'
2022-05-26T16:24:14.7923937Z 16:24:14.790 DEBUG: GET 200 https://domain-placeholder/api/plugins/download?plugin=config&acceptCompressions=pack200 | time=42ms
2022-05-26T16:24:14.7991136Z 16:24:14.798 DEBUG: Download plugin 'flex' to 'C:\Users\VssAdministrator\.sonar\_tmp\fileCache8737127722855176706.tmp'
2022-05-26T16:24:14.8314802Z 16:24:14.830 DEBUG: GET 200 https://domain-placeholder/api/plugins/download?plugin=flex&acceptCompressions=pack200 | time=32ms
2022-05-26T16:24:14.9901856Z 16:24:14.989 DEBUG: Download plugin 'go' to 'C:\Users\VssAdministrator\.sonar\_tmp\fileCache18310185221856055710.tmp'
2022-05-26T16:24:15.0202202Z 16:24:15.019 DEBUG: GET 200 https://domain-placeholder/api/plugins/download?plugin=go&acceptCompressions=pack200 | time=30ms
2022-05-26T16:24:15.3568707Z 16:24:15.356 DEBUG: Download plugin 'web' to 'C:\Users\VssAdministrator\.sonar\_tmp\fileCache14727581668881712646.tmp'
2022-05-26T16:24:15.3841206Z 16:24:15.383 DEBUG: GET 200 https://domain-placeholder/api/plugins/download?plugin=web&acceptCompressions=pack200 | time=27ms
2022-05-26T16:24:15.4167145Z 16:24:15.406 DEBUG: Download plugin 'iac' to 'C:\Users\VssAdministrator\.sonar\_tmp\fileCache17323170575341195659.tmp'
2022-05-26T16:24:15.4377958Z 16:24:15.436 DEBUG: GET 200 https://domain-placeholder/api/plugins/download?plugin=iac&acceptCompressions=pack200 | time=30ms
2022-05-26T16:24:15.4711343Z 16:24:15.470 DEBUG: Download plugin 'jacoco' to 'C:\Users\VssAdministrator\.sonar\_tmp\fileCache6392631731337037651.tmp'
2022-05-26T16:24:15.5362152Z 16:24:15.534 DEBUG: GET 200 https://domain-placeholder/api/plugins/download?plugin=jacoco&acceptCompressions=pack200 | time=64ms
2022-05-26T16:24:15.5478312Z 16:24:15.546 DEBUG: Download plugin 'java' to 'C:\Users\VssAdministrator\.sonar\_tmp\fileCache8109561990406870677.tmp'
2022-05-26T16:24:15.5770777Z 16:24:15.575 DEBUG: GET 200 https://domain-placeholder/api/plugins/download?plugin=java&acceptCompressions=pack200 | time=29ms
2022-05-26T16:24:16.3873665Z 16:24:16.385 DEBUG: Download plugin 'javascript' to 'C:\Users\VssAdministrator\.sonar\_tmp\fileCache5370113136861839883.tmp'
2022-05-26T16:24:16.4237430Z 16:24:16.421 DEBUG: GET 200 https://domain-placeholder/api/plugins/download?plugin=javascript&acceptCompressions=pack200 | time=32ms
2022-05-26T16:24:17.3477704Z 16:24:17.343 DEBUG: Download plugin 'kotlin' to 'C:\Users\VssAdministrator\.sonar\_tmp\fileCache12679979127227526790.tmp'
2022-05-26T16:24:17.3847234Z 16:24:17.382 DEBUG: GET 200 https://domain-placeholder/api/plugins/download?plugin=kotlin&acceptCompressions=pack200 | time=39ms
2022-05-26T16:24:19.0265421Z 16:24:19.024 DEBUG: Download plugin 'php' to 'C:\Users\VssAdministrator\.sonar\_tmp\fileCache12354839648761463624.tmp'
2022-05-26T16:24:19.0619368Z 16:24:19.059 DEBUG: GET 200 https://domain-placeholder/api/plugins/download?plugin=php&acceptCompressions=pack200 | time=33ms
2022-05-26T16:24:19.2299130Z 16:24:19.223 DEBUG: Download plugin 'python' to 'C:\Users\VssAdministrator\.sonar\_tmp\fileCache17909718153439821626.tmp'
2022-05-26T16:24:19.2594543Z 16:24:19.257 DEBUG: GET 200 https://domain-placeholder/api/plugins/download?plugin=python&acceptCompressions=pack200 | time=34ms
2022-05-26T16:24:19.5268037Z 16:24:19.525 DEBUG: Download plugin 'ruby' to 'C:\Users\VssAdministrator\.sonar\_tmp\fileCache246454027980534073.tmp'
2022-05-26T16:24:19.5572697Z 16:24:19.556 DEBUG: GET 200 https://domain-placeholder/api/plugins/download?plugin=ruby&acceptCompressions=pack200 | time=30ms
2022-05-26T16:24:20.3699341Z 16:24:20.368 DEBUG: Download plugin 'sonarscala' to 'C:\Users\VssAdministrator\.sonar\_tmp\fileCache12658047210303381195.tmp'
2022-05-26T16:24:20.3988398Z 16:24:20.397 DEBUG: GET 200 https://domain-placeholder/api/plugins/download?plugin=sonarscala&acceptCompressions=pack200 | time=29ms
2022-05-26T16:24:21.1843432Z 16:24:21.181 DEBUG: Download plugin 'shellcheck' to 'C:\Users\VssAdministrator\.sonar\_tmp\fileCache61858675939376738.tmp'
2022-05-26T16:24:21.2184204Z 16:24:21.216 DEBUG: GET 200 https://domain-placeholder/api/plugins/download?plugin=shellcheck&acceptCompressions=pack200 | time=35ms
2022-05-26T16:24:21.2511676Z 16:24:21.249 DEBUG: Download plugin 'typescript' to 'C:\Users\VssAdministrator\.sonar\_tmp\fileCache743572164983342229.tmp'
2022-05-26T16:24:21.2813181Z 16:24:21.280 DEBUG: GET 200 https://domain-placeholder/api/plugins/download?plugin=typescript&acceptCompressions=pack200 | time=31ms
2022-05-26T16:24:21.2863251Z 16:24:21.285 DEBUG: Download plugin 'text' to 'C:\Users\VssAdministrator\.sonar\_tmp\fileCache13126954546951576099.tmp'
2022-05-26T16:24:21.3219035Z 16:24:21.320 DEBUG: GET 200 https://domain-placeholder/api/plugins/download?plugin=text&acceptCompressions=pack200 | time=35ms
2022-05-26T16:24:21.3311609Z 16:24:21.329 DEBUG: Download plugin 'vbnet' to 'C:\Users\VssAdministrator\.sonar\_tmp\fileCache17094515068009501345.tmp'
2022-05-26T16:24:21.3710201Z 16:24:21.369 DEBUG: GET 200 https://domain-placeholder/api/plugins/download?plugin=vbnet&acceptCompressions=pack200 | time=38ms
2022-05-26T16:24:21.5216746Z 16:24:21.518 DEBUG: Download plugin 'xml' to 'C:\Users\VssAdministrator\.sonar\_tmp\fileCache7040304339415482150.tmp'
2022-05-26T16:24:21.5531342Z 16:24:21.551 DEBUG: GET 200 https://domain-placeholder/api/plugins/download?plugin=xml&acceptCompressions=pack200 | time=31ms
2022-05-26T16:24:21.6355863Z 16:24:21.633 DEBUG: Download plugin 'yaml' to 'C:\Users\VssAdministrator\.sonar\_tmp\fileCache10159718857906031983.tmp'
2022-05-26T16:24:21.6662362Z 16:24:21.665 DEBUG: GET 200 https://domain-placeholder/api/plugins/download?plugin=yaml&acceptCompressions=pack200 | time=32ms
2022-05-26T16:24:21.8052084Z 16:24:21.803 INFO: Load/download plugins (done) | time=8079ms
2022-05-26T16:24:22.5297046Z 16:24:22.518 DEBUG: Plugins:
2022-05-26T16:24:22.5310882Z 16:24:22.519 DEBUG:   * Python Code Quality and Security 3.12.0.9583 (python)
2022-05-26T16:24:22.5312178Z 16:24:22.520 DEBUG:   * Go Code Quality and Security 1.9.0.3429 (go)
2022-05-26T16:24:22.5313107Z 16:24:22.520 DEBUG:   * JaCoCo 1.1.1.1157 (jacoco)
2022-05-26T16:24:22.5314070Z 16:24:22.521 DEBUG:   * Kotlin Code Quality and Security 2.9.0.1147 (kotlin)
2022-05-26T16:24:22.5315686Z 16:24:22.521 DEBUG:   * ShellCheck Analyzer 2.5.0 (shellcheck)
2022-05-26T16:24:22.5316902Z 16:24:22.522 DEBUG:   * Azure Active Directory (AAD) Authentication Plug-in for SonarQube 1.2.0 (authaad)
2022-05-26T16:24:22.5317954Z 16:24:22.524 DEBUG:   * IaC Code Quality and Security 1.7.0.2012 (iac)
2022-05-26T16:24:22.5319012Z 16:24:22.525 DEBUG:   * JavaScript/TypeScript/CSS Code Quality and Security 9.1.0.17747 (javascript)
2022-05-26T16:24:22.5320065Z 16:24:22.526 DEBUG:   * Ansible Lint 2.5.1 (ansible)
2022-05-26T16:24:22.5320995Z 16:24:22.526 DEBUG:   * Ruby Code Quality and Security 1.9.0.3429 (ruby)
2022-05-26T16:24:22.5322052Z 16:24:22.526 DEBUG:   * Scala Code Quality and Security 1.9.0.3429 (sonarscala)
2022-05-26T16:24:22.5323115Z 16:24:22.526 DEBUG:   * C# Code Quality and Security 8.36.1.44192 (csharp)
2022-05-26T16:24:22.5324129Z 16:24:22.527 DEBUG:   * Java Code Quality and Security 7.11.0.29148 (java)
2022-05-26T16:24:22.5325388Z 16:24:22.527 DEBUG:   * HTML Code Quality and Security 3.6.0.3106 (web)
2022-05-26T16:24:22.5326495Z 16:24:22.527 DEBUG:   * Flex Code Quality and Security 2.7.0.2865 (flex)
2022-05-26T16:24:22.5327499Z 16:24:22.528 DEBUG:   * XML Code Quality and Security 2.5.0.3376 (xml)
2022-05-26T16:24:22.5328453Z 16:24:22.528 DEBUG:   * PHP Code Quality and Security 3.23.1.8766 (php)
2022-05-26T16:24:22.5329349Z 16:24:22.529 DEBUG:   * SonarTS 2.1.0.4359 (typescript)
2022-05-26T16:24:22.5330295Z 16:24:22.529 DEBUG:   * Text file Code Quality and Security 1.0.0.120 (text)
2022-05-26T16:24:22.5331354Z 16:24:22.529 DEBUG:   * VB.NET Code Quality and Security 8.36.1.44192 (vbnet)
2022-05-26T16:24:22.5332639Z 16:24:22.529 DEBUG:   * Configuration detection fot Code Quality and Security 1.2.0.267 (config)
2022-05-26T16:24:22.5333674Z 16:24:22.530 DEBUG:   * YAML Analyzer 1.7.0 (yaml)
2022-05-26T16:24:24.3592228Z 16:24:24.353 INFO: Process project properties
2022-05-26T16:24:24.4090531Z 16:24:24.395 INFO: Process project properties (done) | time=42ms
2022-05-26T16:24:24.4138691Z 16:24:24.412 INFO: Execute project builders
2022-05-26T16:24:24.4146803Z 16:24:24.412 DEBUG: Execute project builder: org.sonar.plugins.csharp.CSharpGlobalProtobufFileProcessor
2022-05-26T16:24:24.4162384Z 16:24:24.414 DEBUG: Execute project builder: org.sonar.plugins.vbnet.VbNetGlobalProtobufFileProcessor
2022-05-26T16:24:24.4174290Z 16:24:24.414 INFO: Execute project builders (done) | time=2ms
2022-05-26T16:24:24.4339145Z 16:24:24.432 INFO: Project key: reponame-placeholder
2022-05-26T16:24:24.4344741Z 16:24:24.433 INFO: Base dir: D:\a\1\s
2022-05-26T16:24:24.4346575Z 16:24:24.433 INFO: Working dir: D:\a\1\s\.scannerwork
2022-05-26T16:24:24.4347789Z 16:24:24.433 DEBUG: Project global encoding: windows-1252, default locale: en_US
2022-05-26T16:24:24.4552480Z 16:24:24.451 INFO: Load project settings for component key: 'reponame-placeholder'
2022-05-26T16:24:24.5209137Z 16:24:24.514 DEBUG: GET 200 https://domain-placeholder/api/settings/values.protobuf?component=reponame-placeholder | time=62ms
2022-05-26T16:24:24.5212432Z 16:24:24.516 INFO: Load project settings for component key: 'reponame-placeholder' (done) | time=65ms
2022-05-26T16:24:24.9431062Z 16:24:24.941 DEBUG: Creating module hierarchy
2022-05-26T16:24:24.9431793Z 16:24:24.942 DEBUG:   Init module 'reponame-placeholder'
2022-05-26T16:24:24.9463345Z 16:24:24.945 DEBUG:     Base dir: D:\a\1\s
2022-05-26T16:24:24.9465925Z 16:24:24.945 DEBUG:     Working dir: D:\a\1\s\.scannerwork
2022-05-26T16:24:24.9466999Z 16:24:24.945 DEBUG:     Module global encoding: windows-1252, default locale: en_US
2022-05-26T16:24:24.9854634Z 16:24:24.984 DEBUG: Available languages:
2022-05-26T16:24:25.0035991Z 16:24:24.999 DEBUG:   * Python => "py"
2022-05-26T16:24:25.0037180Z 16:24:24.999 DEBUG:   * Go => "go"
2022-05-26T16:24:25.0040183Z 16:24:24.999 DEBUG:   * Kotlin => "kotlin"
2022-05-26T16:24:25.0041166Z 16:24:24.999 DEBUG:   * Shell => "shell"
2022-05-26T16:24:25.0041879Z 16:24:24.999 DEBUG:   * Terraform => "terraform"
2022-05-26T16:24:25.0043038Z 16:24:24.999 DEBUG:   * CloudFormation => "cloudformation"
2022-05-26T16:24:25.0043919Z 16:24:24.999 DEBUG:   * JavaScript => "js"
2022-05-26T16:24:25.0044583Z 16:24:24.999 DEBUG:   * TypeScript => "ts"
2022-05-26T16:24:25.0045640Z 16:24:24.999 DEBUG:   * CSS => "css"
2022-05-26T16:24:25.0046326Z 16:24:24.999 DEBUG:   * Ruby => "ruby"
2022-05-26T16:24:25.0046977Z 16:24:24.999 DEBUG:   * Scala => "scala"
2022-05-26T16:24:25.0047625Z 16:24:24.999 DEBUG:   * C# => "cs"
2022-05-26T16:24:25.0048296Z 16:24:24.999 DEBUG:   * Java => "java"
2022-05-26T16:24:25.0048991Z 16:24:24.999 DEBUG:   * HTML => "web"
2022-05-26T16:24:25.0049725Z 16:24:24.999 DEBUG:   * JSP => "jsp"
2022-05-26T16:24:25.0050893Z 16:24:24.999 DEBUG:   * Flex => "flex"
2022-05-26T16:24:25.0051849Z 16:24:24.999 DEBUG:   * XML => "xml"
2022-05-26T16:24:25.0052417Z 16:24:24.999 DEBUG:   * PHP => "php"
2022-05-26T16:24:25.0053002Z 16:24:24.999 DEBUG:   * Text => "text"
2022-05-26T16:24:25.0053611Z 16:24:24.999 DEBUG:   * VB.NET => "vbnet"
2022-05-26T16:24:25.0054240Z 16:24:24.999 DEBUG:   * YAML => "yaml"
2022-05-26T16:24:25.0054824Z 16:24:24.999 DEBUG:   * JSON => "json"
2022-05-26T16:24:25.0814808Z 16:24:25.078 INFO: Auto-configuring with CI 'Azure DevOps'
2022-05-26T16:24:25.0867197Z 16:24:25.085 INFO: Load quality profiles
2022-05-26T16:24:25.1850150Z 16:24:25.183 DEBUG: GET 200 https://domain-placeholder/api/qualityprofiles/search.protobuf?project=reponame-placeholder | time=93ms
2022-05-26T16:24:25.2251583Z 16:24:25.221 INFO: Load quality profiles (done) | time=136ms
2022-05-26T16:24:25.2320235Z 16:24:25.230 INFO: Load active rules
2022-05-26T16:24:25.3363990Z 16:24:25.334 DEBUG: GET 200 https://domain-placeholder/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AW6DJi-F_zlMAgNhRdH5&ps=500&p=1 | time=103ms
2022-05-26T16:24:25.5346864Z 16:24:25.533 DEBUG: GET 200 https://domain-placeholder/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX29RLyHa7vGHSlpWKKt&ps=500&p=1 | time=60ms
2022-05-26T16:24:25.5846537Z 16:24:25.582 DEBUG: GET 200 https://domain-placeholder/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AW6DJjGy_zlMAgNhRdJM&ps=500&p=1 | time=41ms
2022-05-26T16:24:25.6433591Z 16:24:25.640 DEBUG: GET 200 https://domain-placeholder/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX29RL9Ha7vGHSlpWKMG&ps=500&p=1 | time=58ms
2022-05-26T16:24:25.7304708Z 16:24:25.724 DEBUG: GET 200 https://domain-placeholder/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX29RMG-a7vGHSlpWKNn&ps=500&p=1 | time=74ms
2022-05-26T16:24:25.8429020Z 16:24:25.839 DEBUG: GET 200 https://domain-placeholder/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AW6DJjRD_zlMAgNhRdLb&ps=500&p=1 | time=82ms
2022-05-26T16:24:26.0148537Z 16:24:26.012 DEBUG: GET 200 https://domain-placeholder/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AW6DJjsU_zlMAgNhRdR5&ps=500&p=1 | time=136ms
2022-05-26T16:24:26.1507656Z 16:24:26.149 DEBUG: GET 200 https://domain-placeholder/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX29RM1Za7vGHSlpWKVD&ps=500&p=1 | time=108ms
2022-05-26T16:24:26.2608983Z 16:24:26.259 DEBUG: GET 200 https://domain-placeholder/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYEA-jwFW5NhUojLScj5&ps=500&p=1 | time=105ms
2022-05-26T16:24:26.5178739Z 16:24:26.516 DEBUG: GET 200 https://domain-placeholder/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXLl9xx2jBTT0WE2Akvd&ps=500&p=1 | time=234ms
2022-05-26T16:24:26.7272060Z 16:24:26.725 DEBUG: GET 200 https://domain-placeholder/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AXLl91x1jBTT0WE2Ak7T&ps=500&p=1 | time=174ms
2022-05-26T16:24:26.7324253Z 16:24:26.729 WARN: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@74ea2410-org.sonar.scanner.report.ReportPublisher': Unsatisfied dependency expressed through constructor parameter 7; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@74ea2410-org.sonar.scanner.report.ActiveRulesPublisher': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ActiveRules' defined in org.sonar.scanner.rule.ActiveRulesProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.api.batch.rule.internal.DefaultActiveRules]: Factory method 'provide' threw exception; nested exception is java.lang.NullPointerException
2022-05-26T16:24:26.8191931Z 16:24:26.817 INFO: ------------------------------------------------------------------------
2022-05-26T16:24:26.8194746Z 16:24:26.818 INFO: EXECUTION FAILURE
2022-05-26T16:24:26.8195655Z 16:24:26.818 INFO: ------------------------------------------------------------------------
2022-05-26T16:24:26.8196862Z 16:24:26.818 INFO: Total time: 18.504s
2022-05-26T16:24:26.8872086Z ##[error]16:24:26.884 ERROR: Error during SonarScanner execution
2022-05-26T16:24:26.8881810Z 16:24:26.884 ERROR: Error during SonarScanner execution
2022-05-26T16:24:26.8882289Z 
2022-05-26T16:24:26.8882988Z 16:24:26.884 INFO: ------------------------------------------------------------------------
2022-05-26T16:24:26.8899278Z ##[error]org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@74ea2410-org.sonar.scanner.report.ReportPublisher': Unsatisfied dependency expressed through constructor parameter 7; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@74ea2410-org.sonar.scanner.report.ActiveRulesPublisher': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ActiveRules' defined in org.sonar.scanner.rule.ActiveRulesProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.api.batch.rule.internal.DefaultActiveRules]: Factory method 'provide' threw exception; nested exception is java.lang.NullPointerException
2022-05-26T16:24:26.8908936Z org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@74ea2410-org.sonar.scanner.report.ReportPublisher': Unsatisfied dependency expressed through constructor parameter 7; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@74ea2410-org.sonar.scanner.report.ActiveRulesPublisher': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ActiveRules' defined in org.sonar.scanner.rule.ActiveRulesProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.api.batch.rule.internal.DefaultActiveRules]: Factory method 'provide' threw exception; nested exception is java.lang.NullPointerException
2022-05-26T16:24:26.8925391Z ##[error]at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229)
2022-05-26T16:24:26.8929476Z 	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
2022-05-26T16:24:26.8953969Z 	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229)
2022-05-26T16:24:26.8977339Z ##[error]at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
2022-05-26T16:24:26.8992854Z 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
2022-05-26T16:24:26.8994579Z 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
2022-05-26T16:24:26.8996776Z 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
2022-05-26T16:24:26.8999323Z 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
2022-05-26T16:24:26.9000917Z 	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
2022-05-26T16:24:26.9002296Z 	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
2022-05-26T16:24:26.9003726Z 	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
2022-05-26T16:24:26.9006448Z ##[error]at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:953)
2022-05-26T16:24:26.9007438Z 
2022-05-26T16:24:26.9008055Z 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:953)


### some lines in the middle were removed to allow this post happen ###


	... 62 more
2022-05-26T16:24:26.9183445Z Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.api.batch.rule.internal.DefaultActiveRules]: Factory method 'provide' threw exception; nested exception is java.lang.NullPointerException
2022-05-26T16:24:26.9184480Z 	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
2022-05-26T16:24:26.9185435Z 	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
2022-05-26T16:24:26.9187205Z 	... 62 more
2022-05-26T16:24:26.9188358Z ##[error]Caused by: java.lang.NullPointerException
2022-05-26T16:24:26.9190711Z Caused by: java.lang.NullPointerException
2022-05-26T16:24:26.9197871Z ##[error]at org.sonar.scanner.rule.DefaultActiveRulesLoader.readPage(DefaultActiveRulesLoader.java:103)
	at org.sonar.scanner.rule.DefaultActiveRulesLoader.load(DefaultActiveRulesLoader.java:63)
	at org.sonar.scanner.rule.ActiveRulesProvider.load(ActiveRulesProvider.java:98)
	at org.sonar.scanner.rule.ActiveRulesProvider.load(ActiveRulesProvider.java:61)
	at org.sonar.scanner.rule.ActiveRulesProvider.provide(ActiveRulesProvider.java:49)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2022-05-26T16:24:26.9203252Z 	at org.sonar.scanner.rule.DefaultActiveRulesLoader.readPage(DefaultActiveRulesLoader.java:103)
2022-05-26T16:24:26.9203964Z 	at org.sonar.scanner.rule.DefaultActiveRulesLoader.load(DefaultActiveRulesLoader.java:63)
2022-05-26T16:24:26.9204631Z 	at org.sonar.scanner.rule.ActiveRulesProvider.load(ActiveRulesProvider.java:98)
2022-05-26T16:24:26.9205269Z 	at org.sonar.scanner.rule.ActiveRulesProvider.load(ActiveRulesProvider.java:61)
2022-05-26T16:24:26.9205897Z 	at org.sonar.scanner.rule.ActiveRulesProvider.provide(ActiveRulesProvider.java:49)
2022-05-26T16:24:26.9206755Z 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2022-05-26T16:24:26.9207403Z 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2022-05-26T16:24:26.9211082Z ##[error]at java.base/java.lang.reflect.Method.invoke(Method.java:566)
2022-05-26T16:24:26.9211829Z 
2022-05-26T16:24:26.9212675Z 
2022-05-26T16:24:26.9213867Z ##[error]at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
	... 63 more
2022-05-26T16:24:26.9215187Z 	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
2022-05-26T16:24:26.9215729Z 	... 63 more
2022-05-26T16:24:26.9217036Z ##[error]16:24:26.896 ERROR:
2022-05-26T16:24:26.9217793Z 16:24:26.896 ERROR: 
2022-05-26T16:24:26.9219321Z ##[error]16:24:26.896 ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
2022-05-26T16:24:26.9220836Z 16:24:26.896 ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
2022-05-26T16:24:27.2934512Z ##[error]The process 'D:\a\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\5.4.0\sonar-scanner\bin\sonar-scanner.bat' failed with exit code 1
2022-05-26T16:24:27.3032747Z ##[section]Finishing: Run Code Analysis

Sonar server meanwhile does not produce any error log, or any log at all during failed task execution.
Where I can dig further to identify an issue? It looks like one of the profiles or a few of them are “broken”.

Thanks!

Hi,

Okay, so we have an intermittent error downloading initial resources from the server and no errors on the server side. I suspect that if you checked the access log, you’d see the requests logged up until the error & you’d see that the request analysis fails on doesn’t show up in the access log. I.E. I suspect there’s something “helpful” on your network that’s interfering with this traffic. Can you check with your network folks?

 
Ann

1 Like

Hi Ann! As a workaround for some other issue found online, I tried to clone the C# default rule collection (Sonar Way) and use it for our projects, plus trace logs enabling and restart. So far we’re good after that, no failures for a few days.
Looks like data was broken, maybe during previous migration from 8.X to 9.4.
Thank you for assistance, let’s close the issue.