Errors using the Sonar-scanner-cli docker container

Hello Sonarcloud team,

We are using the sonar-scanner-cli docker container, and either locally or in our CI it fails with the following error below:

  • ALM used (GitLAB)
  • CI system used (GitLab)
  • Languages of the repository
  • Error observed
22:52:47.107 DEBUG: The worker thread exited with code 0
22:52:47.122 DEBUG: The bridge server shut down
22:52:47.129 INFO: Rule | Time (ms) | Relative
22:52:47.130 INFO: :----|----------:|--------:
22:52:51.658 DEBUG: Cleanup org.eclipse.jgit.util.FS$FileStoreAttributes$$Lambda$283/0x00000040682f68a8@2c43eb8 during JVM shutdown
22:52:51.732 INFO: ------------------------------------------------------------------------
22:52:51.756 INFO: EXECUTION FAILURE
22:52:51.756 INFO: ------------------------------------------------------------------------
22:52:51.770 INFO: Total time: 8:20.397s
22:52:52.372 INFO: Final Memory: 82M/288M
22:52:52.376 INFO: ------------------------------------------------------------------------
22:52:52.377 ERROR: Error during SonarScanner execution
Project not found. Please check the 'sonar.projectKey' and 'sonar.organization' properties, the 'SONAR_TOKEN' environment variable, or contact the project administrator to check the permissions of the user the token belongs to
22:52:52.389 DEBUG: Cleanup org.eclipse.jgit.util.FS$FileStoreAttributes$$Lambda$283/0x00000040682f68a8@2c43eb8 during JVM shutdown
sonar.projectKey=infrasight1_InfraView
sonar.organization=infrasight1

# This is the name and version displayed in the SonarCloud UI.
sonar.projectName=InfraView
sonar.qualitygate.wait=true
#sonar.projectVersion=1.0

# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
#sonar.sources=.

# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8

# Languages
sonar.python.version=3
sonar.terraform.provider.aws.version=4

# Adding coverage
sonar.javascript.lcov.reportPaths=coverage/[lcov.info](http://lcov.info/)
sonar.python.coverage.reportPaths=coverage/cobertura-coverage.xml
sonar.coverage.exclusions=apps/**/tests/**/*, apps/**/src/**/*.test.ts, .pnp.*, apps/api/src/db/migrations/*.js, tests/e2e/**
sonar.cpd.exclusions=apps/**/src/**/*.ts, **/*/generatedApi.ts
sonar.exclusions=**/*/generatedApi.ts, apps/api/auth0/emailTemplates/**, apps/api/scripts/**, apps/web/newRelic.js, apps/api/sendgrid/emailTemplates/**
sonar.modules=apps/api, apps/web, apps/backend

Thank you for your assistance.
Myles T.

Hi Myles,

Here’s your problem

 
HTH,
Ann

  1. We know that these are all correct, in fact, this configuration was working a few months back.
  2. We’ve also re-generated the SONAR_TOKEN that was being used before as well.

Any other suggestions?

Myles T.

Hi,

Did you do this part?

 
Ann

Checked permissions.
Regenerated a token.

Fixed!

Thank you for your assistance.
Greatly appreciated.

This post can be closed out.

Best,

Myles T.

1 Like