Sonarqube jenkins pipeline issue

Hi,

I am having sonarqube in docker container with postgres database with versions 7.9 LTS for sonarqube and Postgres 10.

My sonarqube is running fine with this setup, however my Jenkins server is running on different host and I created a token in my sonarqube and added that token to my Jenkins server and tried running a pipeline for one of the sample project, I am getting below error message in my pipeline output.

16:21:01.386 Failed to request and parse ‘http://sonarqube.example.com./api/server/version’: An error occurred while sending the request. A security error occurred.

I tried searching for this error, but not able to find any resolution.

Do I need to install any plugin or any kind of configuration is needed(like proxy settings, etc)?

Could anyone came across such issue or has any pointers, please share.

Your help will be much appreciated.

Hi,

Welcome to the community!

I think if you look manually at the result of that URL you’ll find not a JSON response but some sort of HTTP error page. This looks like a misconfiguration in Jenkins of your SonarQube URL.

 
HTH,
Ann

Hi Ann,

Thanks for your reply.

I checked the jenkins configuration and verified that the sonarqube url is correct in jenkins.

I also checked by accessing the url(http://sonarqube.example.com/api/server/version) from browser and its returning sonarqube version.

I am using automated reverse-proxy using docker-gen and Nginx in my current infrastructure as I don’t want to expose any container ports outside the network and my sonarqube container is behind the reverse-proxy(Nginx).

My sonarqube is using SSL certificate(http://sonarqube.example.com is getting redirected to https://sonarqube.example.com)

I am still getting the same error message in my jenkins pipeline job.

16:46:57.043 Failed to request and parse ‘http://sonarqube.example.com/api/server/version’: An error occurred while sending the request. A security error occurred
Unhandled Exception: System.Net.WebException: An error occurred while sending the request. A security error occurred —> System.Net.Http.HttpRequestException: An error occurred while sending the request. —> System.Net.Http.WinHttpException: A security error occurred

Please suggest how I can fix this issue.

Thanks in advance.

Hi,

You’re going to have to look at the pieces between Jenkins and SonarQube, I’m afraid.

 
Ann