Version Sonarqube 8.0
OS Centos7
I am trying to integrate Sonarqube with gitlab. I have Nginx installed. All of this is hosted on a private network.
So from what I understand Sonarqube and gitlab needs https to authenticate each other. Sonarqube needs to be run with a reserve proxy in order for the https to work. I’m aware that I need a certificate probably Openssl.
So I copied the config from the sonarqube paste into my sonar conf.
I think the serverbaseurl needs to be set then restart sonarqube correct? Then server name in the sonar.name is set to the serverbaseurl name.
Serverbaseurl=http:://mysonar.com
sonar.conf server name = mysonar.com
When I try to access mysonar.com it can’t find the page. I’m not sure what logs to check or even where to begin with debugging.
I can still access the ip:portnumber address but not the serverbaseurl.
You should indeed have sonar.core.serverBaseURL set to the full domain name, including protocol (e.g.: sonar.core.serverBaseURL=https://mysonar.com). And you should indeed restart if it changes. Please note this has no impact on accessing SonarQube itself, but is required for sending the user back and forth between SonarQube and GitLab for authentication.
As for the access, you say you can access the IP and port. Is that IP and port of Nginx, or SonarQube?
If SonarQube, can you access Nginx?
If Nginx, is your domain name being resolved correctly? For example, if you would add a line to your local etc/hosts file (or c:\Windows\System32\Drivers\etc\hosts if you’re on Windows), and add a new line, like:
# IP Domain name
10.10.2.10 mysonar.com
Does that work? If yes, you have a problem with your local DNS. If not, you might not have a virtual host in Nginx that maps to that name.
My issue is that I’m getting invalid page whenever I login into the gitlab sign on. https://sonarqube.mycompany.com/oauth2/callback/gitlab (inserting our domain name)
Whenever I try to access this on the browser I get You’re not authorized to access this page.
I’m not sure if that’s correct way of debugging.
Does Sonarqube and Gitlab need to be https?
Can I pass the callback url as an ip address?