-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test 7.0.0 release #2024
Comments
sonar.scanner.sonarcloudUrlGeneralTested with sonar-scanner-7.0.0.95453-net-framework.zip and the https://sonarcloud.io/project/configuration/GitHubManual?id=SonarSource_sonar-scanner-azdo-test SC project. For SC I used sonarqube-10.7.0.92547 from jfrog. See also https://sonarsource.slack.com/archives/D04DC2FDMK5/p1721045533900749 Example commands
LogSonarScanner for MSBuild 7.0 Using the .NET Framework version of the Scanner for MSBuild Default properties file was found at E:\sonarscanner-net-framework\SonarQube.Analysis.xml Loading analysis properties from E:\sonarscanner-net-framework\SonarQube.Analysis.xml sonar.verbose=true was specified - setting the log verbosity to 'Debug' Pre-processing started. Preparing working directories... Using environment variables to determine the download directory... 12:42:52.066 12:42:52.048 Loading analysis properties from E:\sonarscanner-net-framework\SonarQube.Analysis.xml 12:42:52.067 12:42:52.059 Server Url: https://sonarcloud.io 12:42:52.067 12:42:52.059 Api Url: https://api.sonarcloud.io 12:42:52.068 12:42:52.059 Is SonarCloud: True 12:42:52.068 12:42:52.066 sonar.verbose=true was specified - setting the log verbosity to 'Debug' 12:42:52.07 Updating build integration targets... 12:42:52.075 The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Users\martin.strecker\AppData\Local\Microsoft\MSBuild\4.0\Microsoft.Common.targets\ImportBefore 12:42:52.075 The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Users\martin.strecker\AppData\Local\Microsoft\MSBuild\10.0\Microsoft.Common.targets\ImportBefore 12:42:52.075 The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Users\martin.strecker\AppData\Local\Microsoft\MSBuild\11.0\Microsoft.Common.targets\ImportBefore 12:42:52.076 The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Users\martin.strecker\AppData\Local\Microsoft\MSBuild\12.0\Microsoft.Common.targets\ImportBefore 12:42:52.076 The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Users\martin.strecker\AppData\Local\Microsoft\MSBuild\14.0\Microsoft.Common.targets\ImportBefore 12:42:52.076 The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Users\martin.strecker\AppData\Local\Microsoft\MSBuild\15.0\Microsoft.Common.targets\ImportBefore 12:42:52.077 The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Users\martin.strecker\AppData\Local\Microsoft\MSBuild\Current\Microsoft.Common.targets\ImportBefore 12:42:52.081 Installed SonarQube.Integration.targets to C:\Projects\sonar-scanner-vsts-test\src\.sonarqube\bin\targets 12:42:52.081 Creating config and output folders... 12:42:52.082 Creating directory: C:\Projects\sonar-scanner-vsts-test\src\.sonarqube\conf 12:42:52.082 Creating directory: C:\Projects\sonar-scanner-vsts-test\src\.sonarqube\out 12:42:52.127 Downloading from https://sonarcloud.io/api/settings/values?component=unknown... 12:42:52.342 Response received from https://sonarcloud.io/api/settings/values?component=unknown... 12:42:52.345 Fetching server version... 12:42:52.348 Downloading from https://api.sonarcloud.io/analysis/version... 12:42:52.531 Response received from https://api.sonarcloud.io/analysis/version... 12:42:52.531 Downloading from https://api.sonarcloud.io/analysis/version failed. Http status code is Forbidden. 12:42:52.532 Downloading from https://sonarcloud.io/api/server/version... 12:42:52.586 Response received from https://sonarcloud.io/api/server/version... 12:42:52.594 SonarCloud detected, skipping server version check. 12:42:52.595 SonarCloud detected, skipping license check. 12:42:52.597 JreResolver: Resolving JRE path. 12:42:52.605 Downloading from https://api.sonarcloud.io/analysis/jres?os=windows&arch=x64... 12:42:52.814 Response received from https://api.sonarcloud.io/analysis/jres?os=windows&arch=x64... 12:42:52.829 JreResolver: Cache hit 'C:\Users\martin.strecker\.sonar\cache\4bafe2e94439c8193fc8c68247cb0dbaf4e80265b903288f63f128304f129bbe\OpenJDK17U-jre_x64_windows_hotspot_17.0.11_9.zip_extracted\jdk-17.0.11+9-jre/bin/java.exe'. 12:42:52.832 Fetching analysis configuration settings... 12:42:52.835 Fetching properties for project 'SonarSource_sonar-scanner-azdo-test'... 12:42:52.836 Downloading from https://sonarcloud.io/api/settings/values?component=SonarSource_sonar-scanner-azdo-test... 12:42:52.88 Response received from https://sonarcloud.io/api/settings/values?component=SonarSource_sonar-scanner-azdo-test... 12:42:52.884 Downloading from https://sonarcloud.io/api/languages/list... 12:42:52.91 Response received from https://sonarcloud.io/api/languages/list... 12:42:52.913 Fetching quality profile for project 'SonarSource_sonar-scanner-azdo-test'... 12:42:52.913 Downloading from https://sonarcloud.io/api/qualityprofiles/search?project=SonarSource_sonar-scanner-azdo-test&organization=sonarsource... 12:42:53 Response received from https://sonarcloud.io/api/qualityprofiles/search?project=SonarSource_sonar-scanner-azdo-test&organization=sonarsource... 12:42:53.004 Fetching rules for quality profile 'AVxYKDdrFTbgxqUNcakm'... 12:42:53.004 Downloading from https://sonarcloud.io/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params,actives&ps=500&qprofile=AVxYKDdrFTbgxqUNcakm&p=1... 12:42:53.122 Response received from https://sonarcloud.io/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params,actives&ps=500&qprofile=AVxYKDdrFTbgxqUNcakm&p=1... 12:42:53.136 Local analyzer cache: C:\Users\martin.strecker\AppData\Local\Temp\.sonarqube\resources 12:42:53.141 Writing Roslyn generated ruleset to C:\Projects\sonar-scanner-vsts-test\src\.sonarqube\conf\Sonar-cs.ruleset... 12:42:53.15 Writing Roslyn generated ruleset to C:\Projects\sonar-scanner-vsts-test\src\.sonarqube\conf\Sonar-cs-none.ruleset... 12:42:53.154 Provisioning analyzer assemblies for cs... 12:42:53.156 Installing required Roslyn analyzers... 12:42:53.157 Processing plugin: csharp version 9.29.0.95321 12:42:53.16 Cache hit: using plugin files from C:\Users\martin.strecker\AppData\Local\Temp\.sonarqube\resources\0 12:42:53.16 Processing plugin: vbnet version 9.29.0.95321 12:42:53.161 Cache hit: using plugin files from C:\Users\martin.strecker\AppData\Local\Temp\.sonarqube\resources\1 12:42:53.161 Processing plugin: securitycsharpfrontend version 10.6.0.31509 12:42:53.162 Cache hit: using plugin files from C:\Users\martin.strecker\AppData\Local\Temp\.sonarqube\resources\2 12:42:53.165 Writing Roslyn analyzer additional file to C:\Projects\sonar-scanner-vsts-test\src\.sonarqube\conf\cs\SonarLint.xml... 12:42:53.167 Fetching quality profile for project 'SonarSource_sonar-scanner-azdo-test'... 12:42:53.168 Downloading from https://sonarcloud.io/api/qualityprofiles/search?project=SonarSource_sonar-scanner-azdo-test&organization=sonarsource... 12:42:53.263 Response received from https://sonarcloud.io/api/qualityprofiles/search?project=SonarSource_sonar-scanner-azdo-test&organization=sonarsource... 12:42:53.264 Fetching rules for quality profile 'AVxYU8keFTbgxqUN2RRL'... 12:42:53.265 Downloading from https://sonarcloud.io/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params,actives&ps=500&qprofile=AVxYU8keFTbgxqUN2RRL&p=1... 12:42:53.332 Response received from https://sonarcloud.io/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params,actives&ps=500&qprofile=AVxYU8keFTbgxqUN2RRL&p=1... 12:42:53.335 Local analyzer cache: C:\Users\martin.strecker\AppData\Local\Temp\.sonarqube\resources 12:42:53.337 Writing Roslyn generated ruleset to C:\Projects\sonar-scanner-vsts-test\src\.sonarqube\conf\Sonar-vbnet.ruleset... 12:42:53.338 Writing Roslyn generated ruleset to C:\Projects\sonar-scanner-vsts-test\src\.sonarqube\conf\Sonar-vbnet-none.ruleset... 12:42:53.34 Provisioning analyzer assemblies for vbnet... 12:42:53.34 Installing required Roslyn analyzers... 12:42:53.34 Processing plugin: csharp version 9.29.0.95321 12:42:53.341 Cache hit: using plugin files from C:\Users\martin.strecker\AppData\Local\Temp\.sonarqube\resources\0 12:42:53.341 Processing plugin: vbnet version 9.29.0.95321 12:42:53.342 Cache hit: using plugin files from C:\Users\martin.strecker\AppData\Local\Temp\.sonarqube\resources\1 12:42:53.342 Writing Roslyn analyzer additional file to C:\Projects\sonar-scanner-vsts-test\src\.sonarqube\conf\vbnet\SonarLint.xml... 12:42:53.346 Processing analysis cache 12:42:53.349 Incremental PR analysis: Base branch parameter was not provided. 12:42:53.35 Cache data is empty. A full analysis will be performed. 12:42:53.367 Pre-processing succeeded. java.exe from the cache is used during the end step: C:\Projects> Get-Process -Name java | select CommandLine | fl
CommandLine : "C:\Users\martin.strecker\.sonar\cache\4bafe2e94439c8193fc8c68247cb0dbaf4e80265b903288f63f128304f129bbe\OpenJDK17U-jre_x64_windows_hotspot_17.0.11_9.zip_extracted\jdk-17.0.11+9-jre\bin\java.exe"
-Djava.awt.headless=true -cp "E:\sonarscanner-net-framework\sonar-scanner-5.0.1.3006\bin\..\lib\sonar-scanner-cli-5.0.1.3006.jar"
"-Dscanner.home=E:\sonarscanner-net-framework\sonar-scanner-5.0.1.3006\bin\.." "-Dproject.home=C:\Projects\sonar-scanner-vsts-test\src" org.sonarsource.scanner.cli.Main
"-Dsonar.token=<<~~>>" "-Dsonar.scanAllFiles=true" "-Dproject.settings=C:\Projects\sonar-scanner-vsts-test\src\.sonarqube\out\sonar-project.properties"
"--from=ScannerMSBuild/7.0" "--debug"
|
The java scanner-cli uses |
sonar.scanner.apiBaseUrlNo value🟢 SQ/SC are both fine
Set to valid values (defaults)🟢 SQ/SC okay. The Uri seems to be taken:
Valid Endpoint SC
Valid Endpoint SQ
🟢 The API Url is respected for the JRE caching and server version testing.
Invalid endpoint SQ
🟡 The endpoint is retried, which is technically not correct. This isn't a big deal, but the retry should only be done in the case of an SHA checksum mismatch. All the remaining behavior is correct: the begin step succeeds.
Invalid endpoint SC
🟡 Same as for SQ: This shouldn't be re-tried.
|
sonar.scanner.javaExePath
Tested on Ubuntu 20.04+SonarCloud, the JRE is downloaded, unzipped, and the permissions are set correctly, after a fix removing a dependency.
Tested on Ubuntu 20.04+SonarCloud, the JRE is NOT downloaded, and the path specified by the user is respected. |
sonar.scanner.skipJreProvisioning
From the logs on Ubuntu 20.04+SonarCloud:
and then when dumping the properties file:
Running
|
timeouts
Default timeout: 100 sec
sonar.http.timeout valid🟢 Timeout is respected for the API v2 endpoint:
The timeout is also respected by the version 1 endpoint (proxying via
The setting is passed to the scanner-cli via the .sonarqube\out\sonar-project.properties file:
sonar.http.timeout invalid🟢 A warning about the wrong parameter is given. The timeout is reset to the default 100 sec:
The setting is persistent for the scanner-cli:
sonar.scanner.connectTimeout valid🟢 The timeout is respected for the V2 endpoint
The timeout is also used by the V1 endpoint:
The setting is passed to the scanner-cli via the .sonarqube\out\sonar-project.properties file:
sonar.scanner.connectTimeout invalid🟡 A warning is given and the default timeout is used but the end step fails. #2063
The parameter is given to the scanner-cli. The embedded version is failing with this message stack trace14:25:48.120 INFO: Final Memory: 6M/56M 14:25:48.120 ERROR: Error during SonarScanner execution 14:25:48.120 INFO: ------------------------------------------------------------------------ org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@768b970c-org.sonar.scanner.bootstrap.ScannerPluginRepository': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@768b970c-org.sonar.scanner.bootstrap.ScannerPluginInstaller': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@768b970c-org.sonar.scanner.bootstrap.PluginFiles': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'DefaultScannerWsClient' defined in org.sonar.scanner.http.ScannerWsClientProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.scanner.http.DefaultScannerWsClient]: Factory method 'provide' threw exception; nested exception is java.lang.IllegalArgumentException: sonar.scanner.connectTimeout is not a valid integer: xx at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:794) at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:220) 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:336) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:334) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:209) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:591) at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:225) at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205) at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73) at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67) 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(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60) at jdk.proxy1/jdk.proxy1.$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:126) at org.sonarsource.scanner.cli.Main.execute(Main.java:81) at org.sonarsource.scanner.cli.Main.main(Main.java:62) Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@768b970c-org.sonar.scanner.bootstrap.ScannerPluginInstaller': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@768b970c-org.sonar.scanner.bootstrap.PluginFiles': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'DefaultScannerWsClient' defined in org.sonar.scanner.http.ScannerWsClientProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.scanner.http.DefaultScannerWsClient]: Factory method 'provide' threw exception; nested exception is java.lang.IllegalArgumentException: sonar.scanner.connectTimeout is not a valid integer: xx at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:794) at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:220) 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:336) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:334) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:209) at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311) at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:904) at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:781) ... 28 more Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@768b970c-org.sonar.scanner.bootstrap.PluginFiles': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'DefaultScannerWsClient' defined in org.sonar.scanner.http.ScannerWsClientProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.scanner.http.DefaultScannerWsClient]: Factory method 'provide' threw exception; nested exception is java.lang.IllegalArgumentException: sonar.scanner.connectTimeout is not a valid integer: xx at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:794) at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:220) 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:336) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:334) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:209) at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311) at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:904) at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:781) ... 42 more Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'DefaultScannerWsClient' defined in org.sonar.scanner.http.ScannerWsClientProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.scanner.http.DefaultScannerWsClient]: Factory method 'provide' threw exception; nested exception is java.lang.IllegalArgumentException: sonar.scanner.connectTimeout is not a valid integer: xx at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:646) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:626) 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:336) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:334) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:209) at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311) at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:904) at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:781) ... 56 more Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.scanner.http.DefaultScannerWsClient]: Factory method 'provide' threw exception; nested exception is java.lang.IllegalArgumentException: sonar.scanner.connectTimeout is not a valid integer: xx at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:641) ... 70 more Caused by: java.lang.IllegalArgumentException: sonar.scanner.connectTimeout is not a valid integer: xx at org.sonar.scanner.http.ScannerWsClientProvider.parseIntProperty(ScannerWsClientProvider.java:108) at org.sonar.scanner.http.ScannerWsClientProvider.parseDurationProperty(ScannerWsClientProvider.java:120) at org.sonar.scanner.http.ScannerWsClientProvider.provide(ScannerWsClientProvider.java:77) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ... 71 more Caused by: java.lang.NumberFormatException: For input string: "xx" at java.base/java.lang.NumberFormatException.forInputString(Unknown Source) at java.base/java.lang.Integer.parseInt(Unknown Source) at java.base/java.lang.Integer.parseInt(Unknown Source) at org.sonar.scanner.http.ScannerWsClientProvider.parseIntProperty(ScannerWsClientProvider.java:106) ... 78 more Process returned exit code 1 The SonarScanner did not complete successfully 14:25:48.185 Post-processing failed. Exit code: 1 /d:sonar.http.timeout=5 /d:sonar.scanner.connectTimeout=15🟡
Both values are persisted for the scanner-cli (see below). /d:sonar.http.timeout=15 /d:sonar.scanner.connectTimeout=5🟡
Both values are persisted for the scanner-cli:
sonar.scanner.socketTimeout valid🟢 The value is ignored without any warning in the logs. The value is forwarded to the cli:
sonar.scanner.socketTimeout invalid🟡 The value is ignored without any warning in the logs. The value is forwarded to the cli, but the end step fails with
Stacktrace of the end step14:21:22.759 ERROR: Error during SonarScanner execution 14:21:22.758 INFO: ------------------------------------------------------------------------ org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@768b970c-org.sonar.scanner.bootstrap.ScannerPluginRepository': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@768b970c-org.sonar.scanner.bootstrap.ScannerPluginInstaller': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@768b970c-org.sonar.scanner.bootstrap.PluginFiles': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'DefaultScannerWsClient' defined in org.sonar.scanner.http.ScannerWsClientProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.scanner.http.DefaultScannerWsClient]: Factory method 'provide' threw exception; nested exception is java.lang.IllegalArgumentException: sonar.scanner.socketTimeout is not a valid integer: xx at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:794) at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:220) 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:336) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:334) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:209) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:591) at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:225) at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205) at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73) at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67) 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(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60) at jdk.proxy1/jdk.proxy1.$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:126) at org.sonarsource.scanner.cli.Main.execute(Main.java:81) at org.sonarsource.scanner.cli.Main.main(Main.java:62) Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@768b970c-org.sonar.scanner.bootstrap.ScannerPluginInstaller': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@768b970c-org.sonar.scanner.bootstrap.PluginFiles': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'DefaultScannerWsClient' defined in org.sonar.scanner.http.ScannerWsClientProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.scanner.http.DefaultScannerWsClient]: Factory method 'provide' threw exception; nested exception is java.lang.IllegalArgumentException: sonar.scanner.socketTimeout is not a valid integer: xx at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:794) at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:220) 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:336) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:334) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:209) at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311) at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:904) at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:781) ... 28 more Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@768b970c-org.sonar.scanner.bootstrap.PluginFiles': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'DefaultScannerWsClient' defined in org.sonar.scanner.http.ScannerWsClientProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.scanner.http.DefaultScannerWsClient]: Factory method 'provide' threw exception; nested exception is java.lang.IllegalArgumentException: sonar.scanner.socketTimeout is not a valid integer: xx at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:794) at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:220) 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:336) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:334) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:209) at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311) at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:904) at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:781) ... 42 more Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'DefaultScannerWsClient' defined in org.sonar.scanner.http.ScannerWsClientProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.scanner.http.DefaultScannerWsClient]: Factory method 'provide' threw exception; nested exception is java.lang.IllegalArgumentException: sonar.scanner.socketTimeout is not a valid integer: xx at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:646) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:626) 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:336) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:334) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:209) at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311) at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:904) at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:781) ... 56 more Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.scanner.http.DefaultScannerWsClient]: Factory method 'provide' threw exception; nested exception is java.lang.IllegalArgumentException: sonar.scanner.socketTimeout is not a valid integer: xx at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:641) ... 70 more Caused by: java.lang.IllegalArgumentException: sonar.scanner.socketTimeout is not a valid integer: xx at org.sonar.scanner.http.ScannerWsClientProvider.parseIntProperty(ScannerWsClientProvider.java:108) at org.sonar.scanner.http.ScannerWsClientProvider.parseDurationProperty(ScannerWsClientProvider.java:120) at org.sonar.scanner.http.ScannerWsClientProvider.provide(ScannerWsClientProvider.java:76) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ... 71 more Caused by: java.lang.NumberFormatException: For input string: "xx" at java.base/java.lang.NumberFormatException.forInputString(Unknown Source) at java.base/java.lang.Integer.parseInt(Unknown Source) at java.base/java.lang.Integer.parseInt(Unknown Source) at org.sonar.scanner.http.ScannerWsClientProvider.parseIntProperty(ScannerWsClientProvider.java:106) ... 78 more Process returned exit code 1 The SonarScanner did not complete successfully 14:21:22.828 Post-processing failed. Exit code: 1 sonar.scanner.responseTimeout valid🟢 The value is ignored without any warning in the logs. The value is forwarded to the cli:
sonar.scanner.responseTimeout invalid🟡 The value is ignored without any warning in the logs. The value is forwarded to the cli. The end step fails #2063
End step logs14:34:57.307 ERROR: Error during SonarScanner execution org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@768b970c-org.sonar.scanner.bootstrap.ScannerPluginRepository': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@768b970c-org.sonar.scanner.bootstrap.ScannerPluginInstaller': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@768b970c-org.sonar.scanner.bootstrap.PluginFiles': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'DefaultScannerWsClient' defined in org.sonar.scanner.http.ScannerWsClientProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.scanner.http.DefaultScannerWsClient]: Factory method 'provide' threw exception; nested exception is java.lang.IllegalArgumentException: sonar.scanner.responseTimeout is not a valid integer: xx at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:794) 14:34:57.307 INFO: ------------------------------------------------------------------------ at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:220) 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:336) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:334) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:209) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:591) at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:225) at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205) at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73) at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67) 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(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60) at jdk.proxy1/jdk.proxy1.$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:126) at org.sonarsource.scanner.cli.Main.execute(Main.java:81) at org.sonarsource.scanner.cli.Main.main(Main.java:62) Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@768b970c-org.sonar.scanner.bootstrap.ScannerPluginInstaller': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@768b970c-org.sonar.scanner.bootstrap.PluginFiles': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'DefaultScannerWsClient' defined in org.sonar.scanner.http.ScannerWsClientProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.scanner.http.DefaultScannerWsClient]: Factory method 'provide' threw exception; nested exception is java.lang.IllegalArgumentException: sonar.scanner.responseTimeout is not a valid integer: xx at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:794) at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:220) 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:336) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:334) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:209) at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311) at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:904) at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:781) ... 28 more Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@768b970c-org.sonar.scanner.bootstrap.PluginFiles': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'DefaultScannerWsClient' defined in org.sonar.scanner.http.ScannerWsClientProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.scanner.http.DefaultScannerWsClient]: Factory method 'provide' threw exception; nested exception is java.lang.IllegalArgumentException: sonar.scanner.responseTimeout is not a valid integer: xx at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:794) at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:220) 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:336) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:334) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:209) at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311) at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:904) at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:781) ... 42 more Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'DefaultScannerWsClient' defined in org.sonar.scanner.http.ScannerWsClientProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.scanner.http.DefaultScannerWsClient]: Factory method 'provide' threw exception; nested exception is java.lang.IllegalArgumentException: sonar.scanner.responseTimeout is not a valid integer: xx at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:646) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:626) 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:336) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:334) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:209) at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311) at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:904) at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:781) ... 56 more Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.scanner.http.DefaultScannerWsClient]: Factory method 'provide' threw exception; nested exception is java.lang.IllegalArgumentException: sonar.scanner.responseTimeout is not a valid integer: xx at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:641) ... 70 more Caused by: java.lang.IllegalArgumentException: sonar.scanner.responseTimeout is not a valid integer: xx at org.sonar.scanner.http.ScannerWsClientProvider.parseIntProperty(ScannerWsClientProvider.java:108) at org.sonar.scanner.http.ScannerWsClientProvider.parseDurationProperty(ScannerWsClientProvider.java:120) at org.sonar.scanner.http.ScannerWsClientProvider.provide(ScannerWsClientProvider.java:78) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ... 71 more Caused by: java.lang.NumberFormatException: For input string: "xx" at java.base/java.lang.NumberFormatException.forInputString(Unknown Source) at java.base/java.lang.Integer.parseInt(Unknown Source) at java.base/java.lang.Integer.parseInt(Unknown Source) at org.sonar.scanner.http.ScannerWsClientProvider.parseIntProperty(ScannerWsClientProvider.java:106) ... 78 more Process returned exit code 1 The SonarScanner did not complete successfully 14:34:57.378 Post-processing failed. Exit code: 1 |
Make sure permissions are respected on linux:Tested on Ubuntu 20.04, seems to work:
|
Setting sonar.scanner.os to a value outside of the listRunning the scanner with
...and then the default JRE is used. |
Setting sonar.sanner.os to a value inside the listRunning the scanner on Ubuntu 20.04 and setting
...then on the properties file we can see:
and in the end step:
..and it fails, which is normal as the java binary is for a different OS:
|
Manually setting sonar.scanner.archSetting
and in the properties file:
and in the end step:
setting sonar.scanner.arch to an invalid value
|
alpine testingRun an
Result was successful. |
Testing on Macbook M1
|
The error log for a failed JRE download (e.g., 404) contains an NRE. I created issue #2060 to fix this. |
sonar.userHome
🟡 The directory is created and used for the JRE cache and the CLI. The directory isn't used for other caches. See #2061
end step
Invalid directory🟢 The begin step fails early
Write protected cache folder🟢 The JRE provisioning fails if UserHome is not writeable.
|
Checksum validation🟢 A failed checksum validation results in a retry and fails after the retry.
|
javaExePath specified to a file that does not existWe log an error and exit early:
javaExePath specified to an existing file that cannot be executedBegin step succeeds without provisioning:
End step fails as follows:
|
JRE provisioning skipped and there is no JRE installedEnd step fails as expected:
|
Authentication header🔴 From the spec:
Tracking issue: #2066 Download URL starts with the
|
JRE installation is corruptedJRE in cache is corrupted🟡 If
Downloaded JRE is corrupted🟡 The file is searched before the rename of the temp folder and the temp folder is deleted. The downloaded zip file is kept. We do a second attempt but we reuse the same zip file.
|
Parallel execution with another scanner (e.g. CLI) -> each scanner will download the JRE, will unpack on separate folders and try to rename. The scanner should handle the case when renaming fails but provisioning succeeds.I run this script: echo "cleaning cache"
echo "==========="
rm -r C:\Users\gregory.pedis\.sonar\cache\
echo "running begin steps"
echo "==========="
$total = 5
$scriptBlock = {
param ($i)
dotnet C:\dev\sonar\sonar-scanner-msbuild\build\sonarscanner-net\SonarScanner.MSBuild.dll begin /o:"greggy42" /k:"greggy42_testing-jre" `
/d:sonar.host.url="https://sonarcloud.io" `
/d:sonar.token="NOPE" /d:sonar.verbose=true
}
$jobs = @()
for ($i = 1; $i -le $total; $i++) {
$jobs += Start-Job -ScriptBlock $scriptBlock -ArgumentList $i
}
echo "waiting to finish"
echo "==========="
$jobs | ForEach-Object { $_ | Wait-Job }
echo "writing results"
echo "==========="
$i = 1
$jobs | ForEach-Object {
$jobResult = Receive-Job -Job $_
Write-Output $jobResult > "logs$i"
$i++
} One of the jobs successfully downloaded first the JRE:
...and the rest tried to extract but failed, and fell back to a cache hit:
|
Disk fullDisk full on download🟢 The download fails and the temp download file is deleted. The sha265 directory is kept. A re-try is done and fails the same way. The next scanner run also works as expected (download) and the existing (empty) sha265 directory is not a problem.
Disk full on extraction🟡 The JRE provisioning failed as expected. The temp extraction folder is deleted after the extraction failed. The zip file is kept. A retry is attempted without downloading again. That retry is questionable.
|
Path to longOn extraction🟡 The extraction fails and the temp dir is deleted. The zip files stays and a retry is attempted on the zip file. The root cause (Path to long) is swallowed and not given in the error message.
Path to long on downloadThe same as above. The download does not fail. It is the extraction that fails.
|
Scenarios
Parameters
sonar.http.timeout
,sonar.scanner.connectTimeout
,sonar.scanner.socketTimeout
,sonar.scanner.responseTimeout
) Test 7.0.0 release #2024 (comment)sonar.http.timeout
is set ->sonar.scanner.connectTimeout
is automatically set as wellsonar.scanner.connectTimeout
is set -> it's forwarded to the cli and considered also in the dotnet side of the scannersonar.scanner.socketTimeout
,sonar.scanner.responseTimeout
are forwarded to the clisonar.scanner.javaExePath
Test 7.0.0 release #2024 (comment)sonar.scanner.skipJreProvisioning
Test 7.0.0 release #2024 (comment)sonar.scanner.os
sonar.scanner.arch
. Test 7.0.0 release #2024 (comment)RuntimeInformation.OSArchitecture
user.home
.sonar
folder in the user profileJRE downloading
Specification
sonar.scanner.javaExePath
is set, then the provisioning should be skipped Test 7.0.0 release #2024 (comment)sonar.scanner.skipJreProvisioning
is set, then the provisioning should be skipped Test 7.0.0 release #2024 (comment)bin
dir)CLI Execution
ITs
Others
The text was updated successfully, but these errors were encountered: