Can't get wrapper results into container server

i am running wrapper and scanner but can’t get wrapper results into sonarqube container.
running sonarqube and docker on ubuntu 20.04.
here’s the steps i followed:
0. the only C compiler i have installed is gcc.

  1. started sonarqube server using docker container:
    sudo docker ps
    CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
    c05978b6b7db sonarqube:8.3.1-developer “bin/run.sh bin/sona…” About an hour ago Up About an hour 0.0.0.0:9000->9000/tcp sonarq

  2. i added key sent to me by sales person.
    2a. using default embedded DB

  3. downloaded wrapper for linux
    build-wrapper-linux-x86-64 -v
    build-wrapper, version 6.9 (linux-x86)
    Copyright © 2014-2020 SonarSource SA, info@sonarsource.com
    3a. ran wrapper:
    build-wrapper-linux-x86-64 --out-dir build_wrapper_output_directory make clean all

  4. downloaded scanner
    sonar-scanner -v
    INFO: Scanner configuration file: /home/user01/Downloads/sonar-scanner-4.3.0.2102-linux/conf/sonar-scanner.properties
    INFO: Project root configuration file: NONE
    INFO: SonarScanner 4.3.0.2102
    INFO: Java 11.0.3 AdoptOpenJDK (64-bit)
    INFO: Linux 5.4.0-37-generic amd64

  5. ran scanner:
    sonar-scanner -Dsonar.projectKey=Iw0KI1R1ZSBKdW4gMTYgMTA6MDc6MTcgQ0RUIDIwMjANClR5cGU9RVZBTFVBVElPTg0KUGx1Z2lucz1saWNlbnNlLGJyYW5jaCxkZXZlbG9wZXIsYWJhcCxjcHAscGxzcWwsc3dpZnQsdHNxbCx2Ym5ldA0KRWRpdGlvbj1kZXZlbG9wZXINClNlcnZlcklkPSoNClN1cHBvcnQ9ZmFsc2UNCkNvbXBhbnk9VG95b3RhIFVTDQpNYXhMb2M9MTAwMDAwMA0KRGlnZXN0PU1Dd0NGQ1M2SkhNQ0xlZWtYVVNWQW1LVlFReHg4OXF6QWhRRzhaUTIvUW5meG5MbEtKdTVUSjJiUzdmK0h3XD1cPQ0KRXhwaXJhdGlvbj0yMDIwLTA3LTAxDQpFZGl0
    -Dsonar.sources=. -Dsonar.host.url=http://localhost:9000
    -Dsonar.cfamily.build-wrapper-output=./build_wrapper_output_directory
    -Dsonar.login=user01 -Dsonar.password=user01 -Dsonar.c.file.suffixes=*.c

it is scanning about 1300 lines of C code.

5a. scan says:

INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 14.481s
INFO: Final Memory: 22M/80M

when i go to host browser, i can login to sonarqube and create new user and new project
but when i go to URL in scanner output, it is empty. i even added invalid code
my C files and it does not detect invalid code in my files.
i tried to attach screen show of GUI but yor site prevents .pdf files.
i attached the scanner output files.
build-wrapper.log (89.3 KB) build-wrapper-dump.json (52.6 KB)

how can i make my wrapper output go into sonarq container? is there a volume mapping
which i need to setup when i start the container?

Hello @Rod1

Your explanations are not very clear.
First of all are you running both the the SonarQube scanner (client) and SonarQube server (server) on the same docker container ? This makes little sense.
These should typically run on different containers.

Second I believe that there some confusion on how to scan properly.
I see that you pass a huge and cryptic sonar.projectKey value. Although this is not forbidden (ie the scan succeeds) it’s a bad practice. The key should a unique project identifier that easy to remember for you (following some sort of convention for the key is a good idea). In that case it is not. Why do you use such key ?

Finally you state that you cannot get wrapper results into server, what makes you think so ? You don’t explain where you have an unexpected/undesired result.

So please explain where you have an unexpected result, and please attach the full logs of the scan (in debug, add the -X option to the scanner command line) to your next post.

Olivier

someone else pointed out that my sonar.projectkey was not correct. i fixed that and it started working. you can close this issue if you want.