SonarQube Scanner for Jenkins 2.17 use wrong workspace directory

Must-share information (formatted with Markdown):

  • SonarQube Scanner for Jenkins 2.17

After upgrade from version 2.16.1 I got an error because the files are not found.
It seems that [SONARJNKNS-374] - Jira broke the detection for use of separate agents.

In our setup the Jenkins controller is running on windows and the agents runs on macOS, Linux or Windows. The SonarQube scanner runs but then it fails with error:

INFO: Analysis report generated in 251ms, dir size=6.4 MB
INFO: Analysis report compressed in 1310ms, zip size=2.4 MB
INFO: Analysis report uploaded in 135ms
INFO: ANALYSIS SUCCESSFUL, you can find the results at: https://sonarqube-server/dashboard?id=project&branch=development
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at https://sonarqube-server/api/ce/task?id=Token
INFO: Executing post-job 'Final report'
WARN: Source code parser: 269 syntax error(s) detected. Syntax errors could cause invalid software metric values. Root cause are typically missing includes, missing macros or compiler specific extensions.
INFO: Turn debug info on to get more details (sonar-scanner -X -Dsonar.verbose=true ...).
INFO: Analysis total time: 17.196 s
INFO: ------------------------------------------------------------------------
INFO: ------------------------------------------------------------------------
INFO: Total time: 18.046s
INFO: Final Memory: 29M/148M
INFO: ------------------------------------------------------------------------


Also:   org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: f9f613c2-6824-4318-8e60-49b5ad6f7dea
C:\Users\jenkins\workspace\jobName\projectdoes not exist.
	at hudson.plugins.sonar.utils.SonarUtils.find(
	at hudson.plugins.sonar.utils.SonarUtils.extractReportTask(
	at hudson.plugins.sonar.utils.SonarUtils.addBuildInfoTo(
	at hudson.plugins.sonar.SonarBuildWrapper$AddBuildInfo.tearDown(
	at org.jenkinsci.plugins.workflow.steps.CoreWrapperStep$Callback.finished(
	at org.jenkinsci.plugins.workflow.steps.CoreWrapperStep$Execution2$Callback2.finished(
	at org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution$TailCall.lambda$onSuccess$0(
	at org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution.lambda$run$0(
	at java.base/java.util.concurrent.Executors$
	at java.base/
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(
	at java.base/java.util.concurrent.ThreadPoolExecutor$
	at java.base/

After downgrade to 2.16.1 it works again

1 Like


Many people (including me) are facing the same.

It has been reported also on Jenkins issue tracker: Loading...

I suggest SonarSource to rollback this as soon as possible SONARJNKNS-374 Fix withSonarQubeEnv step hanging due to symlinks · SonarSource/sonar-scanner-jenkins@d541668 · GitHub

There is also some comments here about technical details of the issue : SONARJNKNS-374 Fix withSonarQubeEnv step hanging due to symlinks · jenkinsci/sonarqube-plugin@d541668 · GitHub



The change causing this issue has been reverted in version 2.17.1. We’ll do a proper fix in the coming weeks.
Apologies for the inconvenience.