Sonarqube server SSL setup problems

Hello, I have an on prem SonarQube server setup with a zip and running on a Windows Server 2019.

My goal was to make sure that I can get it running on HTTPS/SSL by installing an cert.

I followed the instructions at Operating SonarQube Server | Documentation and things worked fine.

I gave a hostname of: sonarqube.local at the https binding and when I go to https://sonarqube.local the URL gets rewritten into the http one that’s running at port 9000.

So far so good. The tricky part is this… while I can access the server over the network from another system by going to the http://:9000 (I asked our network folks to allow traffic through 9000 port) I can’t get through the Sonarqube server if I go to: https://. It gives me “HTTP Error 404. The requested resource is not found.”

If I turn the IIS site off and try to go to the above https link again it actually times out, which makes me believe something is working but not completely, because when I start the IIS site again it goes back to the above 404 message.

Just as an FYI: my network admins confirmed for me that 443 is open at the network, same as 9000.

What am I doing wrong? Please help, somehow it works perfectly on the server itself when I use a browser but not on the network.

Please let me know what other kind of information you might need.

Thanks,

Lampros

Hi Lampros,

Welcome to the community!

That’s… not how this is supposed to work. You enforce https by putting a proxy in front of SonarQube and all traffic goes through it.

The docs may help.

 
Ann

Thanks for the reply Ann!

So you mean that if I were to follow the docs link you gave me (it’s the one I already used) http should not be accessible and any requests towards it should get redirected to https as well?

Thanks,

Lampros

Hi Lampros,

That’s the idea. If you want to use SSL, then you put SonarQube fully behind the proxy and the only access is through that proxy.

 
HTH,
Ann

Ann,

I understand what you mean. I only mentioned the plain HTTP non SSL link as proof that it’s up and running on HTTP and can be accessed, even though we don’t want HTTP.

My question for anyone that might know is if we follow the guide and use “sonarqube.local” as the site name and host name like in the image below, how would I access the server from the network?

Here’s what I mean:

  • My server’s IP is: 1.2.3.4
  • Site name in the above settings: sonarqube.local
  • Host name in the above settings: sonarqube.local

How do I access the Sonarqube server?

https://1.2.3.4 ?
https://1.2.3.4/sonarqube.local ?

Thanks,

Lampros

Ann,

I was able to figure out what was wrong after doing some research on IIS related issues.

Apparently it’s a binding issue: https://stackoverflow.com/a/26599826

As soon as I tried the LAN/Network solution they talk about things worked fine for me.

Hope that helps anyone else who might find themselves in the same spot.

-Lampros

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.