Sonarqube not reachable from SonarScanner

We have installed sonarqube using Docker Container and we try to access the SonarQube URL from Jenkins Slave using Sonar Scanner it is not able reach . Although via curl we are able to reach the sonarqube server but from scanner it says ,the below error, We are running the SonarQube in VPC in AWS but the URL is publicly accessible via ELB.

Caused by: java.lang.IllegalStateException: Status returned by url [http://*****/sonar/batch/index] is not valid: [401] at org.sonarsource.scanner.api.internal.ServerConnection.callUrl( at org.sonarsource.scanner.api.internal.ServerConnection.downloadString( at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex( ... 10 more

Know someone who can answer?


401 is an authorization error. When you curl the URL do you add credentials? Could this be about where you are on the network & some proxy blocking scanner access?