SonarQube with GitLab integration issue

I am having issue with soanrqube-gitlab integration and running project with sonarqube scanner.

it’s giving me error “the requested scope is invalid, unknow, or malformed.”

Also, in Gitlab run try to run the job getting error:
preparation failed: adding cache Volume: set volume permission: running permission container “container ID” for volume “runner-*****”: starting permission container: error response form daemon: failed to create shim talk: OCI runtime create failed: runc create failed: unable to start container process: waiting for init preliminary setup: resd init-p: connection reset b peer: unknown (linux_set.go:105:0s)
We are running “Community Edition V10.5.

Hey there.

Can you share your Gitlab CI YAML file?

Hey Colin… below the CI YAML file.

stages:
    - sonarqube-check
    - sonarqube-vulnerability-report

sonarqube-check:
  stage: sonarqube-check
  image: 
    name: server.example.com/sonar-scanner-cli:latest
    entrypoint: [""]
  variables:
    SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar"  # Defines the location of the analysis task cache
    GIT_DEPTH: "0"  # Tells git to fetch all the branches of the project, required by the analysis task
  cache:
    key: "${CI_JOB_NAME}"
    paths:
      - .sonar/cache
  script: 
    - sonar-scanner
  allow_failure: true
  only:
    - merge_requests
    - master
    - main
    - develop

sonarqube-vulnerability-report:
  stage: sonarqube-vulnerability-report
  script:
    - 'curl -u "${SONAR_TOKEN}:" "${SONAR_HOST_URL}/api/issues/gitlab_sast_export?projectKey=username_postgres_a512495b-9dd5-4c12-9554-627b0601f03b&branch=${CI_COMMIT_BRANCH}&pullRequest=${CI_MERGE_REQUEST_IID}" -o gl-sast-sonar-report.json'
  allow_failure: true
  only:
    - merge_requests
    - master
    - main
    - develop
  artifacts:
    expire_in: 1 day
    reports:
      sast: gl-sast-sonar-report.json
  dependencies:
    - sonarqube-check

Hey there.

Thanks. Everything looks in order here, which makes me think it’s probably an issue with your Gitlab runner. Are you able to execute any jobs with this runner? For example, you can try this tutorial example.

Thanks colin,
I will test this, and let you know.

We are able to execute other jobs with no issue.

Thanks.

The only other thing I can think of is that maybe there are some customizations done in your organization to this docker image.

Is this just proxying what’s on DockerHub (https://hub.docker.com/r/sonarsource/sonar-scanner-cli) or have there been some modifications?