SonarQube Community edition and LOC

SonarQube Version Community Edition
Used with AzureDevOps plugin

Followed the steps to create the prepare analysis on SonarQube, Run Code Analysis and Publish Quality Gate Result
The pipeline is failing at Run Code Analysis with the foll. error
##[error][SQ] Could not fetch metrics

##[debug]Processed: ##vso[task.issue type=error;][SQ] Could not fetch metrics

##[error][SQ] API GET ‘/api/metrics/search’ failed, error was: {“errno”:“ECONNREFUSED”,“code”:“ECONNREFUSED”,“syscall”:“connect”,“address”:“”,“port”:9000}


Also, I would like to get the LOC for my projects so that I could estimate the cost of purchasing a license.

Note: the branch is called “Master”. Is that a problem? Should that be renamed to “Main” to work?
Please help!


Welcome to the community!

That ECONNREFUSED indicates a problem talking to the SonarQube server.

You should verify that it’s still up. If it is, then you probably need to talk to your network folks to make sure there’s nothing “helpful” between SonarQube and your build agent interfering.

Regarding LOC, you can find that in Administration → System → System.