I have a test instance of SonarQube setup with version 7.2.1 (build 14109) which I have been able to successfully connect to and automate code analysis and see reports.
I want to switch to a production instance of sonarqube at work that is version 6.7.5 (build 38563). I create the user token for my account and configured the endpoint in azure devops to point to the other sonarqube instance. When I do this I get a failure on the Prepare analysis on SonarQube step with the following error.
[SQ] API GET â/api/server/versionâ failed, error was: {âcodeâ:âEPROTOâ,âerrnoâ:âEPROTOâ,âsyscallâ:âwriteâ}
I have double checked all of my settings and for the life of cannot figure out what is causing this error to occur. Any suggestions would be greatly appreciated.
Is there any update on this? I get this on a self-hosted agent
##[debug][SQ] API GET: â/api/server/versionâ with query âundefinedâ
##[debug][SQ] API GET â/api/server/versionâ failed, error was: {âcodeâ:âENOTFOUNDâ,âerrnoâ:âENOTFOUNDâ,âsyscallâ:âgetaddrinfoâ,âhostnameâ:âxxx.xx.xx.comâ,âhostâ:âxxx.xx.xx.comâ,âportâ:nn}
##[debug]task result: Failed
My workaround is to use the sonar-scanner cli installed on the self-hosted agent.
It is reachable via curl.
I also installed sonar-scanner on the vm and triggered this from ADO pipeline as a bash shell task - it works. This is my workaround.
Hi @mickaelcaro , is there any update on this issue? I am having the same exact problem as @dramayrat.
I am also using a self hosted agent with a proxy between the SQ instance this was my error:
[SQ] API GET â/api/server/versionâ failed, error was: {âcodeâ:âENOTFOUNDâ,âerrnoâ:âENOTFOUNDâ,âsyscallâ:âgetaddrinfoâ,âhostnameâ:âxxx.xx.xx.comâ,âhostâ:âxxx.xx.xxâ,âportâ:nn}
Are you using any kind of proxy variable from node.js (HTTP_PROXY, HTTPS_PROXY, NO_PROXY)? If no, you have to consider them as we donât automatically detect proxy between the agent and an SQ instance.
I have the same problem as @Scott_Amack, I am using the latest task version(4.20.0) and SonarQube version 8.7.0. I also double checked the URL and token so it cannot be the problem. I am following the steps described in the documentation: Azure DevOps Integration | SonarQube Docs .