Sonarqube server cannot be reached ISSUE

Trying hard to implement React application sonar scanner on AWS CodeBuild using builspec.yml, we have our own sonarqube instance running on AWS EC2 linux instance

User cache: /root/.sonar/cache
SonarQube server [https://***] can not be reached
below is my buildspec.yml and sonar-project.properties file in the root of the react project

# must be unique in a given SonarQube instance

sonar.projectKey=analysis

sonar.login=***

# --- optional properties ---

# defaults to project key

sonar.projectName=analysis

# defaults to 'not provided'

sonar.projectVersion=1.0

sonar.host.url=https://***

# Path is relative to the sonar-project.properties file. Defaults to .

sonar.sources=.

# Encoding of the source code. Default is default system encoding

sonar.sourceEncoding=UTF-8
version: 0.2
phases:
  install:
    commands:
      - node --version
      - npm install 
      - apt-get update
      - apt-get install -y jq
      - wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.5.0.2216-linux.zip
      - unzip ./sonar-scanner-cli-4.5.0.2216-linux.zip
      - export PATH=$PATH:./sonar-scanner-4.5.0.2216-linux/bin/
  build:
    commands:
      #- npm run build
      - sonar-scanner -Dproject.settings=./sonar-project.properties
artifacts:
  baseDirectory: build
  files:
    - 'build/**/*'
    - 'appspec.yml'
  cache:
    paths:
      - node_modules/**/*

Hi,

If you’re getting an error that your SonarQube server can’t be reached, you need to start by verifying that config and then probably by talking to your network folks.

 
HTH,
Ann