Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

SonarQube Error: Error status returned by url [https://api.sonarcloud.io

Error

C:\tools\sonarqube\java-sonarqube-helloworld-src>C:\tools\sonarqube\sonar-scanner\bin\sonar-scanner.bat
13:06:40.024 INFO  Scanner configuration file: C:\tools\sonarqube\sonar-scanner\bin\..\conf\sonar-scanner.properties
13:06:40.028 INFO  Project root configuration file: C:\tools\sonarqube\java-sonarqube-helloworld-src\sonar-project.properties
13:06:40.052 INFO  SonarScanner CLI 6.1.0.4477
13:06:40.055 INFO  Java 17.0.11 Eclipse Adoptium (64-bit)
13:06:40.056 INFO  Windows 11 10.0 amd64
13:06:40.080 INFO  User cache: C:\Users\rajes\.sonar\cache
13:06:40.721 INFO  JRE provisioning: os[windows], arch[amd64]
13:06:43.078 INFO  EXECUTION FAILURE
13:06:43.079 INFO  Total time: 3.059s
13:06:43.080 ERROR Error during SonarScanner CLI execution
java.lang.IllegalStateException: Error status returned by url [https://api.sonarcloud.io/analysis/jres?os=windows&arch=amd64]: 401
        at org.sonarsource.scanner.lib.internal.http.ServerConnection.callUrl(ServerConnection.java:182)
        at org.sonarsource.scanner.lib.internal.http.ServerConnection.callApi(ServerConnection.java:145)
        at org.sonarsource.scanner.lib.internal.http.ServerConnection.callRestApi(ServerConnection.java:123)
        at org.sonarsource.scanner.lib.internal.JavaRunnerFactory.getJreMetadata(JavaRunnerFactory.java:159)
        at org.sonarsource.scanner.lib.internal.JavaRunnerFactory.getJreFromServer(JavaRunnerFactory.java:138)
        at org.sonarsource.scanner.lib.internal.JavaRunnerFactory.createRunner(JavaRunnerFactory.java:85)
        at org.sonarsource.scanner.lib.internal.ScannerEngineLauncherFactory.createLauncher(ScannerEngineLauncherFactory.java:53)
        at org.sonarsource.scanner.lib.ScannerEngineBootstrapper.bootstrap(ScannerEngineBootstrapper.java:118)
        at org.sonarsource.scanner.cli.Main.analyze(Main.java:75)
        at org.sonarsource.scanner.cli.Main.main(Main.java:63)
13:06:43.083 ERROR
13:06:43.083 ERROR Re-run SonarScanner CLI using the -X switch to enable full debug logging.

Solution

# Configure here general information about the environment, such as the server connection details for example
# No information about specific project should appear here

#----- SonarQube server URL (default to SonarCloud)
#sonar.host.url=https://mycompany.com/sonarqube

sonar.host.url=http://13.200.74.49:9000/

#sonar.scanner.proxyHost=myproxy.mycompany.com
#sonar.scanner.proxyPort=8002
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x