Sonar Analysis fails on Private VM but is successful on Microsoft Hosted Agent

I am using Azure DevOps Pipelines and Marketplace tasks to run a sonar analysis for several types of applications.

When I run the pipeline on a Microsoft hosted agent, everything runs as expected:

2021-07-27T20:09:53.6055382Z ##[section]Starting: Run SonarCloud Analysis
2021-07-27T20:09:53.6401105Z ==============================================================================
2021-07-27T20:09:53.6401788Z Task         : Run Code Analysis
2021-07-27T20:09:53.6402117Z Description  : Run scanner and upload the results to the SonarCloud server.
2021-07-27T20:09:53.6402354Z Version      : 1.23.0
2021-07-27T20:09:53.6402578Z Author       : sonarsource
2021-07-27T20:09:53.6403070Z Help         : Version: 1.23.0. This task is not needed for Maven and Gradle projects since the scanner should be run as part of the build.

[More Information](https://sonarcloud.io/documentation/analysis/scan/sonarscanner-for-azure-devops/)
2021-07-27T20:09:53.6403642Z ==============================================================================
2021-07-27T20:09:53.9937404Z [command]C:\Windows\system32\cmd.exe /D /S /C "D:\a\_tasks\SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1\1.23.0\sonar-scanner\bin\sonar-scanner.bat"
2021-07-27T20:09:54.9776661Z INFO: Scanner configuration file: D:\a\_tasks\SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1\1.23.0\sonar-scanner\bin\..\conf\sonar-scanner.properties
2021-07-27T20:09:54.9812387Z INFO: Project root configuration file: NONE
2021-07-27T20:09:55.1837673Z INFO: SonarScanner 4.6.1.2450
2021-07-27T20:09:55.1838557Z INFO: Java 11.0.11 AdoptOpenJDK (64-bit)
2021-07-27T20:09:55.1843321Z INFO: Windows Server 2019 10.0 amd64
2021-07-27T20:09:56.2560052Z INFO: User cache: C:\Users\VssAdministrator\.sonar\cache
2021-07-27T20:09:59.3371265Z INFO: Scanner configuration file: D:\a\_tasks\SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1\1.23.0\sonar-scanner\bin\..\conf\sonar-scanner.properties
2021-07-27T20:09:59.3379223Z INFO: Project root configuration file: NONE
2021-07-27T20:09:59.3397664Z INFO: Analyzing on SonarCloud
2021-07-27T20:09:59.3400878Z INFO: Default locale: "en_US", source code encoding: "windows-1252" (analysis is platform dependent)
2021-07-27T20:10:00.3785802Z INFO: Load global settings
2021-07-27T20:10:01.0882245Z INFO: Load global settings (done) | time=712ms
2021-07-27T20:10:01.0988609Z INFO: Server id: 1BD809FA-AWHW8ct9-T_TB3XqouNu
2021-07-27T20:10:01.1040854Z INFO: User cache: C:\Users\VssAdministrator\.sonar\cache
2021-07-27T20:10:01.1080450Z INFO: Load/download plugins
2021-07-27T20:10:01.1081392Z INFO: Load plugins index
2021-07-27T20:10:01.3252629Z INFO: Load plugins index (done) | time=217ms
2021-07-27T20:10:39.7400871Z INFO: Load/download plugins (done) | time=38631ms
2021-07-27T20:10:40.7576112Z INFO: Loaded core extensions: developer-scanner
2021-07-27T20:10:41.8577795Z INFO: Found an active CI vendor: 'Azure DevOps'
2021-07-27T20:10:41.8774940Z INFO: Load project settings for component key: 'lnfdevops_ISApps_Comet-Redesign_App'
2021-07-27T20:10:42.0140078Z INFO: Load project settings for component key: 'lnfdevops_ISApps_Comet-Redesign_App' (done) | time=136ms
2021-07-27T20:10:42.0228160Z INFO: Process project properties
2021-07-27T20:10:42.0283237Z INFO: Execute project builders
2021-07-27T20:10:42.0299151Z INFO: Execute project builders (done) | time=1ms
2021-07-27T20:10:42.0358244Z INFO: Project key: lnfdevops_ISApps_Comet-Redesign_App
2021-07-27T20:10:42.0360463Z INFO: Base dir: D:\a\1\s
2021-07-27T20:10:42.0361107Z INFO: Working dir: D:\a\1\s\.scannerwork
2021-07-27T20:10:42.1687393Z INFO: Load project branches
2021-07-27T20:10:42.2941839Z INFO: Load project branches (done) | time=125ms
2021-07-27T20:10:42.2975419Z INFO: Check ALM binding of project 'lnfdevops_ISApps_Comet-Redesign_App'
2021-07-27T20:10:42.4197656Z INFO: Detected project binding: BOUND
2021-07-27T20:10:42.4200711Z INFO: Check ALM binding of project 'lnfdevops_ISApps_Comet-Redesign_App' (done) | time=122ms
2021-07-27T20:10:42.4218271Z INFO: Load project pull requests
2021-07-27T20:10:42.5452505Z INFO: Load project pull requests (done) | time=123ms
2021-07-27T20:10:42.5487786Z INFO: Load branch configuration
2021-07-27T20:10:42.5510379Z INFO: Load branch configuration (done) | time=2ms
2021-07-27T20:10:42.6063548Z INFO: Load quality profiles
2021-07-27T20:10:43.1918506Z INFO: Load quality profiles (done) | time=586ms
2021-07-27T20:10:43.1975872Z INFO: Load active rules
2021-07-27T20:10:47.3552066Z INFO: Load active rules (done) | time=4159ms
2021-07-27T20:10:47.3950736Z INFO: Organization key: lnfdevops
2021-07-27T20:10:47.4859465Z INFO: Indexing files...
2021-07-27T20:10:47.4861197Z INFO: Project configuration:
2021-07-27T20:10:47.4869265Z INFO:   Excluded sources: coverage/**, dist/**, e2e/**, src/*, src/!(app)/**/*, **/*(*.spec|*.module|*.routing.module|*.config).ts, src/app/**/model?(s)/**, **/*-data.service.ts, **/*-api.service.ts, **/*.config.ts, **/*.module.ts, **/*.routes.ts, **/models/**/*.*, **/interceptor/**/*.*, **/validators/**/*.*, **/msal/**/*.*, **/tests/**/*.*, **/pipes/**/*.*, **/*.spec.ts, **/*-spec.ts, **/guards/**/*.*, **/directives/**/*.*, **/error-handler/**/*.*, **/environments/**/*.*, **/*.po.ts, **/*.conf.js, **/*main.ts, **/*test.ts, **/*polyfills.ts, **/*-listing.service.ts, **/auth/**/*.*
2021-07-27T20:10:57.4894995Z INFO: 155 files indexed...  (last one was Comet-App/LNF.Comet.UI/e2e/tsconfig.json)
2021-07-27T20:11:07.4886873Z INFO: 155 files indexed...  (last one was Comet-App/LNF.Comet.UI/e2e/tsconfig.json)
2021-07-27T20:11:17.4884719Z INFO: 155 files indexed...  (last one was Comet-App/LNF.Comet.UI/e2e/tsconfig.json)
2021-07-27T20:11:27.4885247Z INFO: 155 files indexed...  (last one was Comet-App/LNF.Comet.UI/e2e/tsconfig.json)
2021-07-27T20:11:37.4884136Z INFO: 155 files indexed...  (last one was Comet-App/LNF.Comet.UI/e2e/tsconfig.json)
2021-07-27T20:11:45.8970401Z INFO: Load project repositories
2021-07-27T20:11:46.1183604Z INFO: Load project repositories (done) | time=221ms
2021-07-27T20:11:46.2705887Z INFO: 275 files indexed
2021-07-27T20:11:46.2722499Z INFO: 685 files ignored because of inclusion/exclusion patterns
2021-07-27T20:11:46.2723483Z INFO: 71506 files ignored because of scm ignore settings
2021-07-27T20:11:46.2726314Z INFO: Quality profile for cs: Sonar way
2021-07-27T20:11:46.2727087Z INFO: Quality profile for css: Sonar way
2021-07-27T20:11:46.2727845Z INFO: Quality profile for json: SonarQube Way
2021-07-27T20:11:46.2728548Z INFO: Quality profile for ts: Sonar way
2021-07-27T20:11:46.2729336Z INFO: Quality profile for web: Sonar way
2021-07-27T20:11:46.2730398Z INFO: Quality profile for yaml: Sonar way
2021-07-27T20:11:46.5321469Z INFO: ------------- Run sensors on module Comet-Redesign_App
2021-07-27T20:11:46.6722347Z INFO: Load metrics repository
2021-07-27T20:11:46.8098757Z INFO: Load metrics repository (done) | time=138ms
2021-07-27T20:11:49.2395417Z INFO: Sensor CSS Metrics [cssfamily]
2021-07-27T20:11:49.6304177Z INFO: Sensor CSS Metrics [cssfamily] (done) | time=379ms
2021-07-27T20:11:49.6306972Z INFO: Sensor CSS Rules [cssfamily]
2021-07-27T20:11:52.3513957Z INFO: 31 source files to be analyzed
2021-07-27T20:11:53.7884624Z INFO: 31/31 source files have been analyzed
2021-07-27T20:11:53.7885689Z INFO: Sensor CSS Rules [cssfamily] (done) | time=4171ms
2021-07-27T20:11:53.7891858Z INFO: Sensor IaC CloudFormation Sensor [iac]
2021-07-27T20:11:53.7892819Z INFO: Sensor IaC CloudFormation Sensor [iac] (done) | time=1ms
2021-07-27T20:11:53.7894959Z INFO: Sensor C# Project Type Information [csharp]
2021-07-27T20:11:53.7907183Z INFO: Sensor C# Project Type Information [csharp] (done) | time=1ms
2021-07-27T20:11:53.7909661Z INFO: Sensor C# Properties [csharp]
2021-07-27T20:11:53.7988451Z INFO: Sensor C# Properties [csharp] (done) | time=1ms
2021-07-27T20:11:53.8013335Z INFO: Sensor JavaXmlSensor [java]
2021-07-27T20:11:53.8014688Z INFO: Sensor JavaXmlSensor [java] (done) | time=4ms
2021-07-27T20:11:53.8015467Z INFO: Sensor HTML [web]
2021-07-27T20:11:54.0697783Z INFO: Sensor HTML [web] (done) | time=270ms
2021-07-27T20:11:54.0699748Z INFO: Sensor VB.NET Project Type Information [vbnet]
2021-07-27T20:11:54.0701077Z INFO: Sensor VB.NET Project Type Information [vbnet] (done) | time=2ms
2021-07-27T20:11:54.0775208Z INFO: Sensor VB.NET Properties [vbnet]
2021-07-27T20:11:54.0775832Z INFO: Sensor VB.NET Properties [vbnet] (done) | time=1ms
2021-07-27T20:11:54.0779642Z INFO: Sensor JaCoCo XML Report Importer [jacoco]
2021-07-27T20:11:54.0781650Z INFO: 'sonar.coverage.jacoco.xmlReportPaths' is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
2021-07-27T20:11:54.0805920Z INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
2021-07-27T20:11:54.0806998Z INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=7ms
2021-07-27T20:11:54.0807716Z INFO: Sensor TypeScript analysis [javascript]
2021-07-27T20:12:00.6292472Z INFO: Deploying custom rules bundle jar:file:/C:/Users/VssAdministrator/.sonar/cache/d56f116051dbab33b2a9e2aee8b0502b/sonar-securityjsfrontend-plugin.jar!/js-vulnerabilities-rules-1.0.0.tgz to D:\a\1\s\.scannerwork\.sonartmp\eslint-bridge-bundle\package\custom-rules7857537760175424612
2021-07-27T20:12:03.6853556Z INFO: Found 2 tsconfig.json file(s): [D:\a\1\s\Comet-App\LNF.Comet.UI\e2e\tsconfig.json, D:\a\1\s\Comet-App\LNF.Comet.UI\tsconfig.json]
2021-07-27T20:12:03.7510239Z INFO: Analyzing 14 files using tsconfig: D:\a\1\s\Comet-App\LNF.Comet.UI\tsconfig.json
2021-07-27T20:12:03.7511151Z INFO: 14 source files to be analyzed
2021-07-27T20:12:13.7564595Z INFO: 7/14 files analyzed, current file: Comet-App/LNF.Comet.UI/src/app/view-listing/view-listing/view-listing.component.ts
2021-07-27T20:12:14.2891763Z INFO: 14/14 source files have been analyzed
2021-07-27T20:12:14.2892505Z INFO: Sensor TypeScript analysis [javascript] (done) | time=20210ms
2021-07-27T20:12:14.2895614Z INFO: Sensor ThymeLeaf template sensor [securityjavafrontend]
2021-07-27T20:12:14.2935871Z INFO: Sensor ThymeLeaf template sensor [securityjavafrontend] (done) | time=2ms
2021-07-27T20:12:14.2939922Z INFO: Sensor Serverless configuration file sensor [securityjsfrontend]
2021-07-27T20:12:14.2950095Z INFO: 0 Serverless function entries were found in the project
2021-07-27T20:12:14.2957839Z INFO: 0 Serverless function handlers were kept as entrypoints
2021-07-27T20:12:14.3721163Z INFO: Sensor Serverless configuration file sensor [securityjsfrontend] (done) | time=81ms
2021-07-27T20:12:14.3729121Z INFO: Sensor Generic Coverage Report
2021-07-27T20:12:14.3744004Z INFO: Parsing D:\a\1\s\Comet-App\LNF.Comet.UI\coverage\SonarQube.xml
2021-07-27T20:12:14.4703117Z INFO: Imported coverage data for 13 files
2021-07-27T20:12:14.4704722Z INFO: Sensor Generic Coverage Report (done) | time=98ms
2021-07-27T20:12:14.4705702Z INFO: Sensor JavaSecuritySensor [security]
2021-07-27T20:12:14.4706461Z INFO: Reading type hierarchy from: D:\a\1\s\.scannerwork\ucfg2\java
2021-07-27T20:12:14.4707634Z INFO: Read 0 type definitions
2021-07-27T20:12:14.4729954Z INFO: Reading UCFGs from: D:\a\1\s\.scannerwork\ucfg2\java
2021-07-27T20:12:14.4735839Z INFO: No UCFGs have been included for analysis.
2021-07-27T20:12:14.4737268Z INFO: Sensor JavaSecuritySensor [security] (done) | time=3ms
2021-07-27T20:12:14.4739113Z INFO: Sensor CSharpSecuritySensor [security]
2021-07-27T20:12:14.4742774Z INFO: Reading type hierarchy from: D:\a\1\s\ucfg_cs2
2021-07-27T20:12:14.4744561Z INFO: Read 0 type definitions
2021-07-27T20:12:14.4747409Z INFO: Reading UCFGs from: D:\a\1\s\ucfg_cs2
2021-07-27T20:12:14.4748063Z INFO: No UCFGs have been included for analysis.
2021-07-27T20:12:14.4749306Z INFO: Sensor CSharpSecuritySensor [security] (done) | time=1ms
2021-07-27T20:12:14.4750307Z INFO: Sensor PhpSecuritySensor [security]
2021-07-27T20:12:14.4750876Z INFO: Reading type hierarchy from: D:\a\1\s\.scannerwork\ucfg2\php
2021-07-27T20:12:14.4751488Z INFO: Read 0 type definitions
2021-07-27T20:12:14.4755031Z INFO: Reading UCFGs from: D:\a\1\s\.scannerwork\ucfg2\php
2021-07-27T20:12:14.4755657Z INFO: No UCFGs have been included for analysis.
2021-07-27T20:12:14.4758634Z INFO: Sensor PhpSecuritySensor [security] (done) | time=1ms
2021-07-27T20:12:14.4759513Z INFO: Sensor PythonSecuritySensor [security]
2021-07-27T20:12:14.4761559Z INFO: Reading type hierarchy from: D:\a\1\s\.scannerwork\ucfg2\python
2021-07-27T20:12:14.4762343Z INFO: Read 0 type definitions
2021-07-27T20:12:14.4763654Z INFO: Reading UCFGs from: D:\a\1\s\.scannerwork\ucfg2\python
2021-07-27T20:12:14.4764592Z INFO: No UCFGs have been included for analysis.
2021-07-27T20:12:14.4765407Z INFO: Sensor PythonSecuritySensor [security] (done) | time=0ms
2021-07-27T20:12:14.4766133Z INFO: Sensor JsSecuritySensor [security]
2021-07-27T20:12:14.4767521Z INFO: Reading type hierarchy from: D:\a\1\s\.scannerwork\ucfg2\js
2021-07-27T20:12:14.4805706Z INFO: Read 0 type definitions
2021-07-27T20:12:14.4841769Z INFO: Reading UCFGs from: D:\a\1\s\.scannerwork\ucfg2\js
2021-07-27T20:12:14.6912787Z INFO: 20:12:14.6786999 Building Runtime Type propagation graph
2021-07-27T20:12:14.7206512Z INFO: 20:12:14.718691 Running Tarjan on 874 nodes
2021-07-27T20:12:14.7251904Z INFO: 20:12:14.724696 Tarjan found 874 components
2021-07-27T20:12:14.7327292Z INFO: 20:12:14.7316982 Variable type analysis: done
2021-07-27T20:12:14.7342916Z INFO: 20:12:14.7337078 Building Runtime Type propagation graph
2021-07-27T20:12:14.7519731Z INFO: 20:12:14.7506912 Running Tarjan on 874 nodes
2021-07-27T20:12:14.7537859Z INFO: 20:12:14.7526983 Tarjan found 874 components
2021-07-27T20:12:14.7578360Z INFO: 20:12:14.7568299 Variable type analysis: done
2021-07-27T20:12:14.7595503Z INFO: Analyzing 149 ucfgs to detect vulnerabilities.
2021-07-27T20:12:15.0688952Z INFO: rule: S2083, entrypoints: 16
...
2021-07-27T20:12:16.8672445Z INFO: rule: S2076 done
2021-07-27T20:12:16.8678194Z INFO: Sensor JsSecuritySensor [security] (done) | time=2387ms
2021-07-27T20:12:16.8775380Z INFO: ------------- Run sensors on project
2021-07-27T20:12:16.9032541Z INFO: Sensor C# [csharp]
2021-07-27T20:12:16.9203561Z WARN: Your project contains C# files which cannot be analyzed with the scanner you are using. To analyze C# or VB.NET, you must use the SonarScanner for .NET 5.x or higher, see https://redirect.sonarsource.com/doc/install-configure-scanner-msbuild.html
2021-07-27T20:12:16.9535272Z INFO: Sensor C# [csharp] (done) | time=0ms
2021-07-27T20:12:16.9545065Z INFO: Sensor Zero Coverage Sensor
2021-07-27T20:12:17.0088607Z INFO: Sensor Zero Coverage Sensor (done) | time=12ms
2021-07-27T20:12:17.2078591Z INFO: SCM Publisher SCM provider for this project is: git
2021-07-27T20:12:17.2080626Z INFO: SCM Publisher 25 source files to be analyzed
2021-07-27T20:12:18.5618645Z INFO: SCM Publisher 24/25 source files have been analyzed (done) | time=1363ms
2021-07-27T20:12:18.5620065Z WARN: Missing blame information for the following files:
2021-07-27T20:12:18.5620845Z WARN:   * Comet-App/LNF.Comet.UI/package-lock.json
2021-07-27T20:12:18.5621579Z WARN: This may lead to missing/broken features in SonarCloud
2021-07-27T20:12:18.5762841Z INFO: CPD Executor 3 files had no CPD blocks
2021-07-27T20:12:18.5765760Z INFO: CPD Executor Calculating CPD for 22 files
2021-07-27T20:12:18.6117319Z INFO: CPD Executor CPD calculation finished (done) | time=35ms
2021-07-27T20:12:20.9613893Z INFO: Analysis report generated in 2319ms, dir size=1 MB
2021-07-27T20:12:21.2510173Z INFO: Analysis report compressed in 288ms, zip size=467 KB
2021-07-27T20:12:21.9739449Z INFO: Analysis report uploaded in 728ms
2021-07-27T20:12:22.0926284Z INFO: ANALYSIS SUCCESSFUL, you can find the results at: https://sonarcloud.io/dashboard?id=lnfdevops_ISApps_Comet-Redesign_App
2021-07-27T20:12:22.0927323Z INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
2021-07-27T20:12:22.0928332Z INFO: More about the report processing at https://sonarcloud.io/api/ce/task?id=AXrpmMeGMmyK1jrptAT-
2021-07-27T20:12:33.3055825Z INFO: Analysis total time: 1:52.548 s
2021-07-27T20:12:33.3119983Z INFO: ------------------------------------------------------------------------
2021-07-27T20:12:33.3121046Z INFO: EXECUTION SUCCESS
2021-07-27T20:12:33.3121815Z INFO: ------------------------------------------------------------------------
2021-07-27T20:12:33.3122455Z INFO: Total time: 2:38.358s
2021-07-27T20:12:33.4134424Z INFO: Final Memory: 45M/157M
2021-07-27T20:12:33.4135454Z INFO: ------------------------------------------------------------------------
2021-07-27T20:12:33.4915057Z ##[section]Finishing: Run SonarCloud Analysis

When I run the same pipeline on self hosted windows vm, the analysis fails:

2021-07-27T18:10:29.7213656Z ##[section]Starting: Run SonarCloud Analysis
2021-07-27T18:10:29.7528629Z ==============================================================================
2021-07-27T18:10:29.7529103Z Task         : Run Code Analysis
2021-07-27T18:10:29.7529457Z Description  : Run scanner and upload the results to the SonarCloud server.
2021-07-27T18:10:29.7529743Z Version      : 1.23.0
2021-07-27T18:10:29.7529955Z Author       : sonarsource
2021-07-27T18:10:29.7530537Z Help         : Version: 1.23.0. This task is not needed for Maven and Gradle projects since the scanner should be run as part of the build.

[More Information](https://sonarcloud.io/documentation/analysis/scan/sonarscanner-for-azure-devops/)
2021-07-27T18:10:29.7531181Z ==============================================================================
2021-07-27T18:10:29.7573107Z ##[debug]Using node path: E:\a1\externals\node\bin\node.exe
2021-07-27T18:10:30.2906987Z ##[debug]agent.TempDirectory=E:\a1\_work\_temp
2021-07-27T18:10:30.2946006Z ##[debug]loading inputs and endpoints
2021-07-27T18:10:30.2951053Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2021-07-27T18:10:30.2964578Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2021-07-27T18:10:30.2972415Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2021-07-27T18:10:30.2980342Z ##[debug]loading SECRET_SONARQUBE_ENDPOINT
2021-07-27T18:10:30.2985075Z ##[debug]loading SECRET_SYSTEM_ACCESSTOKEN
2021-07-27T18:10:30.2991721Z ##[debug]loaded 5
2021-07-27T18:10:30.3008144Z ##[debug]Agent.ProxyUrl=undefined
2021-07-27T18:10:30.3011169Z ##[debug]Agent.CAInfo=undefined
2021-07-27T18:10:30.3012322Z ##[debug]Agent.ClientCert=undefined
2021-07-27T18:10:30.3014304Z ##[debug]Agent.SkipCertValidation=undefined
2021-07-27T18:10:30.4974150Z ##[debug]SONARQUBE_SCANNER_MODE=CLI
2021-07-27T18:10:30.4975274Z ##[debug]JAVA_HOME=E:\openjdk-11+28_windows-x64_bin\jdk-11
2021-07-27T18:10:30.4976104Z ##[debug]JAVA_HOME_11_X64=undefined
2021-07-27T18:10:30.4990846Z ##[debug]Absolute path for pathSegments: E:\a1\_work\_tasks\SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1\1.23.0,sonar-scanner,bin,sonar-scanner = E:\a1\_work\_tasks\SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1\1.23.0\sonar-scanner\bin\sonar-scanner
2021-07-27T18:10:30.4997953Z ##[debug]which 'E:\a1\_work\_tasks\SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1\1.23.0\sonar-scanner\bin\sonar-scanner.bat'
2021-07-27T18:10:30.5006918Z ##[debug]found: 'E:\a1\_work\_tasks\SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1\1.23.0\sonar-scanner\bin\sonar-scanner.bat'
2021-07-27T18:10:30.5008193Z ##[debug]which 'E:\a1\_work\_tasks\SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1\1.23.0\sonar-scanner\bin\sonar-scanner.bat'
2021-07-27T18:10:30.5009705Z ##[debug]found: 'E:\a1\_work\_tasks\SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1\1.23.0\sonar-scanner\bin\sonar-scanner.bat'
2021-07-27T18:10:30.5012109Z ##[debug]system.debug=true
2021-07-27T18:10:30.5014708Z ##[debug]E:\a1\_work\_tasks\SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1\1.23.0\sonar-scanner\bin\sonar-scanner.bat arg: -X
2021-07-27T18:10:30.5021582Z ##[debug]exec tool: E:\a1\_work\_tasks\SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1\1.23.0\sonar-scanner\bin\sonar-scanner.bat
2021-07-27T18:10:30.5022595Z ##[debug]arguments:
2021-07-27T18:10:30.5023276Z ##[debug]   -X
2021-07-27T18:10:30.5036482Z [command]C:\windows\system32\cmd.exe /D /S /C "E:\a1\_work\_tasks\SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1\1.23.0\sonar-scanner\bin\sonar-scanner.bat -X"
2021-07-27T18:10:31.0255829Z 14:10:31.019 INFO: Scanner configuration file: E:\a1\_work\_tasks\SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1\1.23.0\sonar-scanner\bin\..\conf\sonar-scanner.properties
2021-07-27T18:10:31.0268574Z 14:10:31.025 INFO: Project root configuration file: NONE
2021-07-27T18:10:31.0504255Z 14:10:31.049 INFO: SonarScanner 4.6.1.2450
2021-07-27T18:10:31.0505069Z 14:10:31.049 INFO: Java 11 Oracle Corporation (64-bit)
2021-07-27T18:10:31.0505578Z 14:10:31.049 INFO: Windows Server 2016 10.0 amd64
2021-07-27T18:10:31.1966300Z 14:10:31.194 DEBUG: keyStore is : 
2021-07-27T18:10:31.1968651Z 14:10:31.195 DEBUG: keyStore type is : pkcs12
2021-07-27T18:10:31.1969392Z 14:10:31.195 DEBUG: keyStore provider is : 
2021-07-27T18:10:31.1970308Z 14:10:31.195 DEBUG: init keystore
2021-07-27T18:10:31.1970947Z 14:10:31.195 DEBUG: init keymanager of type SunX509
2021-07-27T18:10:31.3714656Z 14:10:31.365 DEBUG: Create: C:\windows\ServiceProfiles\NetworkService\.sonar\cache
2021-07-27T18:10:31.3715924Z 14:10:31.367 INFO: User cache: C:\windows\ServiceProfiles\NetworkService\.sonar\cache
2021-07-27T18:10:31.3716762Z 14:10:31.367 DEBUG: Create: C:\windows\ServiceProfiles\NetworkService\.sonar\cache\_tmp
2021-07-27T18:10:31.3722258Z 14:10:31.370 DEBUG: Extract sonar-scanner-api-batch in temp...
2021-07-27T18:10:31.3817939Z 14:10:31.380 DEBUG: Get bootstrap index...
2021-07-27T18:10:31.3818995Z 14:10:31.380 DEBUG: Download: https://sonarcloud.io/batch/index
2021-07-27T18:10:32.1317012Z 14:10:32.131 DEBUG: Get bootstrap completed
2021-07-27T18:10:32.1760822Z 14:10:32.174 DEBUG: Download https://sonarcloud.io/batch/file?name=scanner-sonarcloud-8.0.0.22105-all.jar to C:\windows\ServiceProfiles\NetworkService\.sonar\cache\_tmp\fileCache9656350215505809047.tmp
2021-07-27T18:10:33.8469660Z 14:10:33.846 DEBUG: Create isolated classloader...
2021-07-27T18:10:33.8960610Z 14:10:33.895 DEBUG: Start temp cleaning...
2021-07-27T18:10:33.8993555Z 14:10:33.898 DEBUG: Temp cleaning done
2021-07-27T18:10:33.8996053Z 14:10:33.899 INFO: Scanner configuration file: E:\a1\_work\_tasks\SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1\1.23.0\sonar-scanner\bin\..\conf\sonar-scanner.properties
2021-07-27T18:10:33.9018885Z 14:10:33.900 INFO: Project root configuration file: NONE
2021-07-27T18:10:33.9023931Z 14:10:33.901 INFO: Analyzing on SonarCloud
2021-07-27T18:10:33.9024836Z 14:10:33.902 INFO: Default locale: "en_US", source code encoding: "windows-1252" (analysis is platform dependent)
2021-07-27T18:10:33.9030582Z 14:10:33.902 DEBUG: Work directory: E:\a1\_work\4\s\.scannerwork
2021-07-27T18:10:33.9043262Z 14:10:33.903 DEBUG: Execution execute
2021-07-27T18:10:34.3340977Z 14:10:34.333 INFO: ------------------------------------------------------------------------
2021-07-27T18:10:34.3343101Z 14:10:34.333 INFO: EXECUTION FAILURE
2021-07-27T18:10:34.3343623Z 14:10:34.333 INFO: ------------------------------------------------------------------------
2021-07-27T18:10:34.3344138Z 14:10:34.333 INFO: Total time: 3.356s
2021-07-27T18:10:34.3514867Z 14:10:34.348 INFO: Final Memory: 3M/17M
2021-07-27T18:10:34.3516596Z 14:10:34.348 INFO: ------------------------------------------------------------------------
2021-07-27T18:10:34.3552717Z ##[error]14:10:34.348 ERROR: Error during SonarScanner execution
2021-07-27T18:10:34.3565148Z ##[debug]Processed: ##vso[task.logissue type=error;]14:10:34.348 ERROR: Error during SonarScanner execution
2021-07-27T18:10:34.3566090Z 14:10:34.348 ERROR: Error during SonarScanner execution
2021-07-27T18:10:34.3570513Z ##[error]java.lang.NoClassDefFoundError: org/sonar/batch/bootstrapper/EnvironmentInformation
	at org.sonarsource.scanner.api.internal.batch.DefaultBatchFactory.createBatch(DefaultBatchFactory.java:32)
	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)
2021-07-27T18:10:34.3577145Z ##[debug]Processed: ##vso[task.logissue type=error;]java.lang.NoClassDefFoundError: org/sonar/batch/bootstrapper/EnvironmentInformation%0D%0A	at org.sonarsource.scanner.api.internal.batch.DefaultBatchFactory.createBatch(DefaultBatchFactory.java:32)%0D%0A	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)%0D%0A	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)%0D%0A	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)%0D%0A	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2021-07-27T18:10:34.3579383Z java.lang.NoClassDefFoundError: org/sonar/batch/bootstrapper/EnvironmentInformation
2021-07-27T18:10:34.3580070Z 	at org.sonarsource.scanner.api.internal.batch.DefaultBatchFactory.createBatch(DefaultBatchFactory.java:32)
2021-07-27T18:10:34.3580856Z 	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
2021-07-27T18:10:34.3581750Z 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2021-07-27T18:10:34.3582432Z 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2021-07-27T18:10:34.3585959Z ##[error]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)
2021-07-27T18:10:34.3589793Z ##[debug]Processed: 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)##vso[task.logissue type=error;]at java.base/java.lang.reflect.Method.invoke(Method.java:566)%0D%0A	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)%0D%0A	at com.sun.proxy.$Proxy0.execute(Unknown Source)%0D%0A	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)%0D%0A	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)%0D%0A	at org.sonarsource.scanner.cli.Main.execute(Main.java:112)%0D%0A	at org.sonarsource.scanner.cli.Main.execute(Main.java:75)%0D%0A	at org.sonarsource.scanner.cli.Main.main(Main.java:61)
2021-07-27T18:10:34.3601389Z 
2021-07-27T18:10:34.3601828Z 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
2021-07-27T18:10:34.3602491Z 	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
2021-07-27T18:10:34.3603112Z 	at com.sun.proxy.$Proxy0.execute(Unknown Source)
2021-07-27T18:10:34.3603694Z 	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
2021-07-27T18:10:34.3604351Z 	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
2021-07-27T18:10:34.3605237Z 	at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
2021-07-27T18:10:34.3609375Z 	at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
2021-07-27T18:10:34.3609934Z 	at org.sonarsource.scanner.cli.Main.main(Main.java:61)
2021-07-27T18:10:34.3611031Z ##[error]Caused by: java.lang.ClassNotFoundException: org.sonar.batch.bootstrapper.EnvironmentInformation
2021-07-27T18:10:34.3612223Z ##[debug]Processed: ##vso[task.logissue type=error;]Caused by: java.lang.ClassNotFoundException: org.sonar.batch.bootstrapper.EnvironmentInformation
2021-07-27T18:10:34.3614002Z ##[error]at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
	at org.sonarsource.scanner.api.internal.IsolatedClassloader.loadClass(IsolatedClassloader.java:82)
2021-07-27T18:10:34.3615699Z ##[debug]Processed: Caused by: java.lang.ClassNotFoundException: org.sonar.batch.bootstrapper.EnvironmentInformation##vso[task.logissue type=error;]at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)%0D%0A	at org.sonarsource.scanner.api.internal.IsolatedClassloader.loadClass(IsolatedClassloader.java:82)
2021-07-27T18:10:34.3616692Z 
2021-07-27T18:10:34.3617126Z 	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
2021-07-27T18:10:34.3618139Z ##[error]at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	... 13 more
2021-07-27T18:10:34.3619403Z ##[debug]Processed: 	at org.sonarsource.scanner.api.internal.IsolatedClassloader.loadClass(IsolatedClassloader.java:82)##vso[task.logissue type=error;]at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)%0D%0A	... 13 more
2021-07-27T18:10:34.3620170Z 
2021-07-27T18:10:34.3620583Z 	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
2021-07-27T18:10:34.3621036Z 	... 13 more
2021-07-27T18:10:34.4053569Z ##[debug]Exit code 1 received from tool 'E:\a1\_work\_tasks\SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1\1.23.0\sonar-scanner\bin\sonar-scanner.bat'
2021-07-27T18:10:34.4058234Z ##[debug]STDIO streams have closed for tool 'E:\a1\_work\_tasks\SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1\1.23.0\sonar-scanner\bin\sonar-scanner.bat'
2021-07-27T18:10:34.4125865Z ##[debug]task result: Failed
2021-07-27T18:10:34.4127632Z ##[error]The process 'E:\a1\_work\_tasks\SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1\1.23.0\sonar-scanner\bin\sonar-scanner.bat' failed with exit code 1
2021-07-27T18:10:34.4129160Z ##[debug]Processed: ##vso[task.issue type=error;]The process 'E:\a1\_work\_tasks\SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1\1.23.0\sonar-scanner\bin\sonar-scanner.bat' failed with exit code 1
2021-07-27T18:10:34.4131731Z ##[debug]Processed: ##vso[task.complete result=Failed;]The process 'E:\a1\_work\_tasks\SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1\1.23.0\sonar-scanner\bin\sonar-scanner.bat' failed with exit code 1
2021-07-27T18:10:34.4205274Z ##[section]Finishing: Run SonarCloud Analysis

Looking for some help what can be different which is causing the error.

Hi @AmitS , welcome to the community.

Can you check that the configuration of the pipelines match the differences between hosted agent and yours ? I would think of paths especially, but there might be others.

Mickaël