##[error]java.lang.IllegalStateException: Fail to download plugin [csharp]. Request to /api/plugins/download?plugin=csharp did not return header Sonar-MD5

SonarQube Azure DevOps extension version 4.23.0 (Latest)
SonarQube docker container Community Edition Version 9.1 (build 47736)

SonarQubeAnalyze task on azure devops pipeline fails with the following error:

##[error]ERROR: Error during SonarScanner execution
ERROR: Error during SonarScanner execution
##[error]java.lang.IllegalStateException: Fail to download plugin [csharp]. Request to .../api/plugins/download?plugin=csharp did not return header Sonar-MD5
java.lang.IllegalStateException: Fail to download plugin [csharp]. Request to .../api/plugins/download?plugin=csharp did not return header Sonar-MD5
##[error]at org.sonar.scanner.bootstrap.PluginFiles.download(PluginFiles.java:110)
	at org.sonar.scanner.bootstrap.PluginFiles.download(PluginFiles.java:110)
##[error]at org.sonar.scanner.bootstrap.PluginFiles.get(PluginFiles.java:89)
	at org.sonar.scanner.bootstrap.PluginFiles.get(PluginFiles.java:89)
##[error]at org.sonar.scanner.bootstrap.ScannerPluginInstaller.loadPlugins(ScannerPluginInstaller.java:77)
	at org.sonar.scanner.bootstrap.ScannerPluginInstaller.loadPlugins(ScannerPluginInstaller.java:77)
##[error]at org.sonar.scanner.bootstrap.ScannerPluginInstaller.installRemotes(ScannerPluginInstaller.java:60)
	at org.sonar.scanner.bootstrap.ScannerPluginInstaller.installRemotes(ScannerPluginInstaller.java:60)
##[error]at org.sonar.scanner.bootstrap.ScannerPluginRepository.start(ScannerPluginRepository.java:62)
	at org.sonar.scanner.bootstrap.ScannerPluginRepository.start(ScannerPluginRepository.java:62)
##[error]at org.sonar.core.platform.StartableCloseableSafeLifecyleStrategy.start(StartableCloseableSafeLifecyleStrategy.java:40)
	at org.sonar.core.platform.StartableCloseableSafeLifecyleStrategy.start(StartableCloseableSafeLifecyleStrategy.java:40)
##[error]at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
	at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
INFO: ------------------------------------------------------------------------
##[error]at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
	at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
##[error]at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
	at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
##[error]at org.picocontainer.behaviors.Stored.start(Stored.java:110)
	at org.picocontainer.behaviors.Stored.start(Stored.java:110)
##[error]at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
	at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
##[error]at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
	at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
##[error]at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
	at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
##[error]at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
##[error]at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
##[error]at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
##[error]at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
##[error]at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
##[error]at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
##[error]at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
##[error]at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
##[error]at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
##[error]at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
##[error]at jdk.proxy1/jdk.proxy1.$Proxy0.execute(Unknown Source)
	at jdk.proxy1/jdk.proxy1.$Proxy0.execute(Unknown Source)
##[error]at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
##[error]at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
##[error]at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
##[error]at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
##[error]at org.sonarsource.scanner.cli.Main.main(Main.java:61)
	at org.sonarsource.scanner.cli.Main.main(Main.java:61)
##[error]ERROR:
ERROR: 
##[error]The SonarScanner did not complete successfully
The SonarScanner did not complete successfully
##[error]15:49:27.081  Post-processing failed. Exit code: 1
15:49:27.081  Post-processing failed. Exit code: 1
##[error]The process '...\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.23.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe' failed with exit code 1
##[section]Finishing: SonarQubeAnalyze

Hi,

Welcome to the community!

Could you provide the full log, please?

 
HTH,
Ann

Hi Ann
Thank you for your welcome.

I tried to reconfigure both the container and azure devops but the problem persist.
In attachment you will find the logs extracted from the sonarqube container log directory and the azure pipeline raw log.
Thanks in advance, regards

Alberto


ce.log (832 Bytes)
es.log (8.1 KB)
sonar.log (2.7 KB)
web.log (27.7 KB)

Hi,

Thanks for the logs. I don’t see anything obvious, but I’m not a .NET expert. We’ll have to wait for the experts to show up.

 
Ann

Hi,

Thank you for your response.
in order to better diagnose the problem I have enabled debug log level for sonar tasks on the azure pipeline. Attached the azure raw logs

Thanks,

Alberto
azure_raw_log_debug.log (172.5 KB)

Hi

Issue solved

it seems Azure Container Instances removes custom HTTP response headers: trying to browse /api/plugins/download?plugin=cshrap URL result in correct download but in the response the SonarMD5 header was missing.

Since I wasn’t able to change this behaviour, I deployed SonarQube on Azure AppService: in this case, however, I had to use version 8.9 of SonarQube because I ran into this issue [SONAR-15167] SonarQube 9.0 Images fail on old docker runtimes - SonarSource

Alberto

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.