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:
INFO: Project root configuration file: NONE
INFO: SonarScanner
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: ------------------------------------------------------------------------
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

my file has the following

#----- Default SonarQube server

#----- Default source code encoding

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