Not able to connect to sonarqube via https

ssl

(Jose Alvarez) #1

Hopefully someone can point me in the right direction… i have a proxy setup, and nginx configured to talk to the proxy however my sonarqube instance isnt coming up on the specified address.

Sonarqube should be accessible via the url https://sonarqube.volusion.com however it just times out

I have my conf file config as listed below for my host

# Binding IP address. For servers with more than one IP address, this property specifies which
# address will be used for listening on the specified ports.
# By default, ports will be used on all IP addresses associated with the server.
sonar.web.host=https://sonarqube.volusion.com/

# Web context. When set, it must start with forward slash (for example /sonarqube).
# The default value is root context (empty value).
sonar.web.context=/sonarqube
# TCP port for incoming HTTP connections. Default value is 9000.
sonar.web.port=443

any help would be appreciated


(G Ann Campbell) #2

Hi,

This is not my area of expertise, but from the configs shown, I would expect your instance to be available at https://sonarqube.volusion.com/sonarqube

Ann


(Jose Alvarez) #3

Hi Ann,

Thanks for chiming in… i tried the url and its still not coming up… going to check with my network guys and make sure its not a firewall issue…
thx,
jose


(Jose Alvarez) #4

Hmmm,

It doesnt appear to be a firewall setting does anyone have any ideas on how i might resolve this issue?
thx,
jose


(Nicolas Bontoux) #5

Hi Jose,

First of all it seems you’re misunderstanding the purpose of sonar.web.host. It’s meant to be an IP address, corresponding to the network interface on which SonarQube would listen:

Binding IP address. For servers with more than one IP address, this property specifies which
address will be used for listening on the specified ports.

I recommend keeping the default value for now.

Secondly there’s no need to listen on port 443. Yes that is the default port for HTTPS, however it’s your nginx proxy who’s going to listen on 443. Then the communication between proxy and SQ can happen on any port, e.g. default 9000. Not to mention that SonarQube does not support being run as root, so it can’t listen on port 443.

Last but not least as Ann mentioned, don’t forget that you’ve set sonar.web.context.

My advice:

  • fix the above, notably sonar.web.host
  • start SonarQube and verify that locally (from the same machine where SonarQube is running) you can query SonarQube via localhost
  • then query via your proxy and trace down the request (e.g. proxy logs) if any trouble

(Jose Alvarez) #6

Thanks Nic! This helped we got it going…