WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succedeed?

ERROR: Error during SonarQube Scanner execution
ERROR: Insufficient privileges
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.

WARN: Unable to locate ‘report-task.txt’ in the workspace. Did the SonarScanner succedeed?
ERROR: SonarQube scanner exited with non-zero code: 1

Finished: FAILURE

ERROR: Insufficient privileges

With that amount of explication, this is the only help we can give you.

You checked if you’re passing the sonar.login property correctly? Are you using sonar-scanner, SonarScanner.MSBuild or what?

2 Likes

We are using Sonar-scanner which we have configured in Jenkins global tool configuration.

I bet that the value of sonar.login is wrong.

I will check on that and get back to you.

Thanks

for Sonar.login a token is provided but it is throwing same error

Analysis report generated in 3772ms, dir size=5 MB
INFO: Analysis reports compressed in 3992ms, zip size=2 MB
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 3:45.270s
INFO: Final Memory: 53M/1616M INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
ERROR: Insufficient privileges
ERROR: ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
WARN: Unable to locate ‘report-task.txt’ in the workspace. Did the SonarScanner succedeed?
ERROR: SonarQube scanner exited with non-zero code: 1
Finished: FAILURE

Hi,

‘Insufficient privileges’
Check the global permissions https://yoursonarhost/admin/permissions, the user needs ‘Execute Analysis’ and ‘Create Projects’ (if initial scan) permission. Our Jenkins user is in the admin group and has all permissions.

Regards,
Gilbert

1 Like

Error during SonarQube Scanner execution
ERROR: Could not find branches. A regular analysis is required before creating branches.

Can you please help on this.

Before analyzing a feature branch or pull request, do an analysis of the master branch.

Hi @janos,

this will - hopefully soon - be fixed with https://jira.sonarsource.com/browse/SONAR-11155 !?
One of the most annoying gotchas since the introduction of the branching feature :frowning:

Gilbert

I am getting error like this:

INFO: Scanner configuration file: /opt/sonar_scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarQube Scanner 3.2.0.1227
INFO: Java 1.8.0_121 Oracle Corporation (64-bit)
INFO: Linux 3.10.0-957.21.3.el7.x86_64 amd64
INFO: User cache: /var/lib/jenkins/.sonar/cache
INFO: SonarQube server 6.4.0
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Load global settings
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 0.789s
INFO: Final Memory: 8M/224M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
ERROR: Not authorized. Please check the properties sonar.login and sonar.password.
ERROR: 
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succeeded?
ERROR: SonarQube scanner exited with non-zero code: 1
Finished: FAILURE

Analysis properties:

# must be unique in a given SonarQube instance
sonar.projectKey=my project

# --- optional properties ---

# defaults to project key
sonar.projectName=My project
# defaults to 'not provided'
sonar.projectVersion=1.0
 
# Path is relative to the sonar-project.properties file. Defaults to .
sonar.sources=.
 
# Encoding of the source code. Default is default system encoding
sonar.sourceEncoding=UTF-8

i have Solve the problem,jenkins Prepare SonarQube Scanner environment must true

2 Likes

This problem may be caused by “Analysis properties”,you need set it first

I am also facing the same problem, can you please guide to me to resolve.

As the error message says, make sure to configure the sonar.login and sonar.password properties.

Our documentation page for Jenkins explains how to configure credentials.

What does this mean? Where did you set it?