SonarQube server [https://sonarcloud.io] can not be reached Error

Hi Team,

Can someone please help in resolving the issue which we are facing when running the sonarcloud from the Bamboo server?

Here is the error.

|build|02-Mar-2023 17:48:16|[DEBUG] -----------------------------------------------------------------------|
|---|---|---|
|build|02-Mar-2023 17:48:16|[DEBUG] Goal:          org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar (default-cli)|
|build|02-Mar-2023 17:48:16|[DEBUG] Style:         Aggregating|
|build|02-Mar-2023 17:48:16|[DEBUG] Configuration: <?xml version=1.0 encoding=UTF-8?>|
|build|02-Mar-2023 17:48:16|<configuration>|
|build|02-Mar-2023 17:48:16|  <mojoExecution default-value=${mojoExecution}/>|
|build|02-Mar-2023 17:48:16|  <session default-value=${session}/>|
|build|02-Mar-2023 17:48:16|  <skip default-value=false>${sonar.skip}</skip>|
|build|02-Mar-2023 17:48:16|</configuration>|
|build|02-Mar-2023 17:48:16|[DEBUG] =======================================================================|
|build|02-Mar-2023 17:48:16|[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=29915, ConflictMarker.markTime=19740, ConflictMarker.nodeCount=2, ConflictIdSorter.graphTime=17101, ConflictIdSorter.topsortTime=9676, ConflictIdSorter.conflictIdCount=1, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=62430, ConflictResolver.conflictItemCount=1, DefaultDependencyCollector.collectTime=2173193, DefaultDependencyCollector.transformTime=162498}|
|build|02-Mar-2023 17:48:16|[DEBUG] org.springframework:jb-hello-world-maven:jar:0.2.0|
|build|02-Mar-2023 17:48:16|[DEBUG]    joda-time:joda-time:jar:2.2:compile|
|build|02-Mar-2023 17:48:16|[INFO] |
|build|02-Mar-2023 17:48:16|[INFO] --- sonar-maven-plugin:3.9.1.2184:sonar (default-cli) @ jb-hello-world-maven ---|
|build|02-Mar-2023 17:48:16|[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=29697, ConflictMarker.markTime=20751, ConflictMarker.nodeCount=7, ConflictIdSorter.graphTime=21752, ConflictIdSorter.topsortTime=13119, ConflictIdSorter.conflictIdCount=6, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=144407, ConflictResolver.conflictItemCount=7, DefaultDependencyCollector.collectTime=11857395, DefaultDependencyCollector.transformTime=253476}|
|build|02-Mar-2023 17:48:16|[DEBUG] org.sonarsource.scanner.maven:sonar-maven-plugin:jar:3.9.1.2184|
|build|02-Mar-2023 17:48:16|[DEBUG]    org.sonatype.plexus:plexus-sec-dispatcher:jar:1.4:compile|
|build|02-Mar-2023 17:48:16|[DEBUG]       org.sonatype.plexus:plexus-cipher:jar:1.4:compile|
|build|02-Mar-2023 17:48:16|[DEBUG]    org.codehaus.plexus:plexus-utils:jar:3.2.1:compile|
|build|02-Mar-2023 17:48:16|[DEBUG]    org.sonarsource.scanner.api:sonar-scanner-api:jar:2.16.2.588:compile|
|build|02-Mar-2023 17:48:16|[DEBUG]    commons-lang:commons-lang:jar:2.6:compile|
|build|02-Mar-2023 17:48:16|[DEBUG] Created new class realm plugin>org.codehaus.mojo:sonar-maven-plugin:3.9.1.2184|
|build|02-Mar-2023 17:48:16|[DEBUG] Importing foreign packages into class realm plugin>org.codehaus.mojo:sonar-maven-plugin:3.9.1.2184|
|build|02-Mar-2023 17:48:16|[DEBUG]   Imported:  < maven.api|
|build|02-Mar-2023 17:48:16|[DEBUG] Populating class realm plugin>org.codehaus.mojo:sonar-maven-plugin:3.9.1.2184|
|build|02-Mar-2023 17:48:16|[DEBUG]   Included: org.sonarsource.scanner.maven:sonar-maven-plugin:jar:3.9.1.2184|
|build|02-Mar-2023 17:48:16|[DEBUG]   Included: org.sonatype.plexus:plexus-sec-dispatcher:jar:1.4|
|build|02-Mar-2023 17:48:16|[DEBUG]   Included: org.sonatype.plexus:plexus-cipher:jar:1.4|
|build|02-Mar-2023 17:48:16|[DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:3.2.1|
|build|02-Mar-2023 17:48:16|[DEBUG]   Included: org.sonarsource.scanner.api:sonar-scanner-api:jar:2.16.2.588|
|build|02-Mar-2023 17:48:16|[DEBUG]   Included: commons-lang:commons-lang:jar:2.6|
|build|02-Mar-2023 17:48:16|[DEBUG] Configuring mojo org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar from plugin realm ClassRealm[plugin>org.codehaus.mojo:sonar-maven-plugin:3.9.1.2184, parent: sun.misc.Launcher$AppClassLoader@7852e922]|
|build|02-Mar-2023 17:48:16|[DEBUG] Configuring mojo 'org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar' with basic configurator -->|
|build|02-Mar-2023 17:48:16|[DEBUG]   (f) mojoExecution = org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar {execution: default-cli}|
|build|02-Mar-2023 17:48:16|[DEBUG]   (f) session = org.apache.maven.execution.MavenSession@5ef8df1e|
|build|02-Mar-2023 17:48:16|[DEBUG]   (f) skip = false|
|build|02-Mar-2023 17:48:16|[DEBUG] -- end configuration --|
|build|02-Mar-2023 17:48:16|[DEBUG] 17:48:16.470 keyStore is : |
|build|02-Mar-2023 17:48:16|[DEBUG] 17:48:16.474 keyStore type is : jks|
|build|02-Mar-2023 17:48:16|[DEBUG] 17:48:16.474 keyStore provider is : |
|build|02-Mar-2023 17:48:16|[DEBUG] 17:48:16.474 init keystore|
|build|02-Mar-2023 17:48:16|[DEBUG] 17:48:16.475 init keymanager of type SunX509|
|build|02-Mar-2023 17:48:16|[DEBUG] 17:48:16.561 Create: /home/bamboo/.sonar/cache|
|build|02-Mar-2023 17:48:16|[INFO] 17:48:16.562 User cache: /home/bamboo/.sonar/cache|
|build|02-Mar-2023 17:48:16|[DEBUG] 17:48:16.562 Create: /home/bamboo/.sonar/cache/_tmp|
|build|02-Mar-2023 17:48:16|[DEBUG] 17:48:16.565 Extract sonar-scanner-api-batch in temp...|
|build|02-Mar-2023 17:48:16|[DEBUG] 17:48:16.569 Get bootstrap index...|
|build|02-Mar-2023 17:48:16|[DEBUG] 17:48:16.569 Download: https://sonarcloud.io/batch/index|
|build|02-Mar-2023 17:49:46|[ERROR] 17:49:46.709 SonarCloud server [https://sonarcloud.io] can not be reached|
|build|02-Mar-2023 17:49:46|[INFO] ------------------------------------------------------------------------|
|build|02-Mar-2023 17:49:46|[INFO] BUILD FAILURE|
|build|02-Mar-2023 17:49:46|[INFO] ------------------------------------------------------------------------|
|build|02-Mar-2023 17:49:46|[INFO] Total time:  01:32 min|
|build|02-Mar-2023 17:49:46|[INFO] Finished at: 2023-03-02T17:49:46+11:00|
|build|02-Mar-2023 17:49:46|[INFO] ------------------------------------------------------------------------|
|build|02-Mar-2023 17:49:46|[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar (default-cli) on project jb-hello-world-maven: Unable to execute SonarScanner analysis: Fail to get bootstrap index from server: connect timed out -> [Help 1]|
|build|02-Mar-2023 17:49:46|org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar (default-cli) on project jb-hello-world-maven: Unable to execute SonarScanner analysis|
|build|02-Mar-2023 17:49:46|    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)|
|build|02-Mar-2023 17:49:46|    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)|
|build|02-Mar-2023 17:49:46|    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)|
|build|02-Mar-2023 17:49:46|    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)|
|build|02-Mar-2023 17:49:46|    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)|
|build|02-Mar-2023 17:49:46|    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)|
|build|02-Mar-2023 17:49:46|    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)|
|build|02-Mar-2023 17:49:46|    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)|
|build|02-Mar-2023 17:49:46|    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)|
|build|02-Mar-2023 17:49:46|    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)|
|build|02-Mar-2023 17:49:46|    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)|
|build|02-Mar-2023 17:49:46|    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)|
|build|02-Mar-2023 17:49:46|    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)|
|build|02-Mar-2023 17:49:46|    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)|
|build|02-Mar-2023 17:49:46|    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)|
|build|02-Mar-2023 17:49:46|    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)|
|build|02-Mar-2023 17:49:46|    at java.lang.reflect.Method.invoke (Method.java:498)|
|build|02-Mar-2023 17:49:46|    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)|
|build|02-Mar-2023 17:49:46|    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)|
|build|02-Mar-2023 17:49:46|    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)|
|build|02-Mar-2023 17:49:46|    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)|
|build|02-Mar-2023 17:49:46|Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to execute SonarScanner analysis|
|build|02-Mar-2023 17:49:46|    at org.sonarsource.scanner.maven.bootstrap.ScannerBootstrapper.execute (ScannerBootstrapper.java:67)|
|build|02-Mar-2023 17:49:46|    at org.sonarsource.scanner.maven.SonarQubeMojo.execute (SonarQubeMojo.java:108)|
|build|02-Mar-2023 17:49:46|    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)|
|build|02-Mar-2023 17:49:46|    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)|
|build|02-Mar-2023 17:49:46|    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)|
|build|02-Mar-2023 17:49:46|    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)|
|build|02-Mar-2023 17:49:46|    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)|
|build|02-Mar-2023 17:49:46|    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)|
|build|02-Mar-2023 17:49:46|    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)|
|build|02-Mar-2023 17:49:46|    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)|

Regards
Sandeep V

To add…the ports are open for sonarcould.io. wget command is working fine. Not sure why it is not working.

Hi,

You should talk to your network folks. At a guess, there’s something “helpful” on the network interfering.

 
Ann

The issue was with the proxy. It is now working. Thanks for the help.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.