We have just updated to TFS 2017 and I'm going through setting up SonarQube integration into pull requests for our builds. In the process I've come across an issue that I can't seem to figure out.
We have three build servers each with two sets of build agents on them. Let's call them BA1 and BA2. Also, we are using the new SonarQube plugin for TFS not the deprecated one referenced here.
BA2 works perfectly. Haven't had a single problem with generating both incremental and full analysis reports. However, any build that is using BA1 ultimately makes it about halfway through the End Analysis step before failure with a message similar to this:
ERROR: Error during SonarQube Scanner execution
org.sonar.core.util.ContextException: Unable to write message | file=E:\workingDirectory\_work\3\.sonarqube\out\.sonar\batch-report\component-5072.pb
... //long stacktrace
Caused by: java.io.FileNotFoundException: E:\workingDirectory\_work\3\.sonarqube\out\.sonar\batch-report\component-5072.pb (The directory or file cannot be created)
I'm pretty sure it's not a permissions problem because all builds run under the same user account. It doesn't matter which project or build server it runs on. All jobs that run with BA2 are successful. All jobs that run with BA1 fail with this error. I saw a similar question here but the solution to that problem will not work for me. I don't have an issue with another job being queued into the same workspace.
Just trying to see if its possible anyone has run into this before. I've checked the build agent logs under the _diag
directory but haven't been able to find anything useful. I've run out of ideas to check. Thanks for any tips.