-
Notifications
You must be signed in to change notification settings - Fork 62
sonar scanner failed with exception GitLab is not responding #24
Comments
Hi @pritesha The script of our docker image is already defining the It seems you hit the gitlab.com server in a downtime moment maybe? Yesterday they had an outage. Anyway I just realized the Gitlab is deprecating some of the environment variables we use in our scanner run script. So we'll update our image fixing this variables (https://docs.gitlab.com/ee/ci/variables/#9-0-renaming). Anyway the old ones should still work. |
Hi @gtrias , I tried changing this and added exact project id in my properties file, now the process is running fine, but still no comments in the commit ( although I could see in SonarQube dashboard ) any others pointers you have? |
Please, paste your current output. BTW, as described in #23 there are some times where the issues mode does not highlight expected code to be highlighted. |
This is the current log
|
@pritesha Are you sure your commit is introducing new issues? When our sonar CI routine has new issues they're shown in logs as it follows:
Note that sonarqube only reports new issues from the commit which triggered the CI |
Hi @gtrias , |
Please @pritesha, kindly paste your |
Hi @elboletaire ,
|
@pritesha we don't see anything weird in your configuration. From our side, apparently it should work. Have you tried to run the sonarqube scanner without our container? Seems like you have an issue with gitlab-sonar plugin or with sonar itself. |
Closing due to inactivity. Feel free to open it again if you thing this is an error, or if you have more information. BTW, you should try to run the sonarqube scanner without the container to properly determine where the error comes from. |
How can we run the sonarqube scanner without the container? Thanks for the help. |
Please, read the official sonarqube documentation about it: https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner |
Hi, I am using gitlab-sonar-plugin to run sonar scanner for each branch on every new commit.
I am using gabrie-allaigre/sonar-gitlab-plugin for sonnar-gitlab integration.
My expectation is, if I run sonar scanner is issue mode, it should add a comment in my commit with issues and with publishing mode it should publish the report to sonar server.
So, till now I can publish my report to sonar server with all issue and git lab code for that particular commit, but not been able to see any comment on my gitlab commit.
Then, I realised that I need to pass the commit sha, and changed this command to gitlab cli
script:
- gitlab-sonar-scanner -Dsonar.gitlab.commit_sha=$CI_COMMIT_SHA
post this change, my sonar scanner is failing constantly with below exception
ERROR: Error during SonarQube Scanner execution
ERROR: Failed to execute project builder: com.talanlabs.sonar.plugins.gitlab.CommitProjectBuilder
ERROR: Caused by: Unable to perform GitLab WS operation
ERROR: Caused by: GitLab is not responding
ERROR: Caused by: Server returned HTTP response code: 502 for URL: https://gitlab.com/api/v4/projects?archived=false&membership=false&order_by=created_at&owned=false&page=57&per_page=20&simple=false&sort=desc&starred=false&statistics=false&with_custom_attributes=false&with_issues_enabled=false&with_merge_requests_enabled=false
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
I am using
gabrie-allaigre/sonar-gitlab-plugin version 3.0.0
image: ciricihq/gitlab-sonar-scanner
Gitlab version 10.7.0-rc5-ee
sonnarQube version 6.5.0.27846
My gitlab yml task file looks like this
Run SonarQube:
stage: Prebuild
image: ciricihq/gitlab-sonar-scanner
variables:
SONAR_URL: http://sonar.my.sonar.url
SONAR_ANALYSIS_MODE: issues
script:
- gitlab-sonar-scanner -Dsonar.gitlab.commit_sha=$CI_COMMIT_SHA
only:
- branches
except:
- master
and my sonar-project.properties files is as below
sonar.projectKey=test:test sonar.exclusions=ui/node_modules/** sonar.sources=. sonar.gitlab.project_id=git@gitlab.com:xyz/pqr/abc.git
The text was updated successfully, but these errors were encountered: