Error:- "SonarQube server [http://localhost:9000] can not be reached" while running sonarqube-scanner on y code locally

I am working on an Angular 8 project. We have been told to install sonarqube-scanner on our machines. I installed it globally npm install -g sonarqube-scanner and ran it using sonar-scanner command as per the doc. However I get the following error on my command line, with a long stack trace.

INFO: Scanner configuration file: C:UsersAmrutaJoshi.sonarnative-sonar-scannersonar-scanner-4.4.0.2170-windowsbin..confsonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarScanner 4.4.0.2170
INFO: Java 11.0.3 AdoptOpenJDK (64-bit)
INFO: Windows 10 10.0 amd64
INFO: User cache: C:UsersAmrutaJoshi.sonarcache
ERROR: SonarQube server [http://localhost:9000] can not be reached
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 5.299s
INFO: Final Memory: 3M/20M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarScanner analysis
        at org.sonarsource.scanner.api.in
....

my sonar-scanner.properties file has the following

#----- Default SonarQube server
#sonar.host.url=http://localhost:9000

#----- Default source code encoding
#sonar.sourceEncoding=UTF-8

I have never dealt with this before so whatever solutions I’m seeing on the net I am not able understand if any of it applies to my situation. Could anyone help?

Source: Angular Questions