Due to the way the bundler sets up the temporary directory in your Jenkins jobs, this error can sometimes appear in the middle of the analysis, showing at the top of the stack trace as
ScannerException: Unable to execute SonarQube. This can be due to your permissions on the machine you are using.
To avoid this issue, you will need to edit the configuration of your Jenkins job. Scroll down to the Invoke Ant step with the target listed as sonar.
Click the Advanced button to view the Java options.
Change the value of the java.io.tmpdir to somewhere you have permissions. A temp directory in the bundler folder is a good option.
Save the changes to your configuration and restart your build.