Sonar Maven plugin fails at library download

Hi all,

I’m trying to set up SonarQube to run out of our Jenkins pipeline, but there seems to be an error when downloading the libraries. Since I was not able to find another bug report concerning my issue, I open this topic.

  • Versions: SonarQube 7.9.1, Jenkins: 2.176.2, SonarQube Scanner for Jenkins (Plugin): 2.9, sonar-maven-plugin: 3.6.0.1398, Maven: 3.5.3, Java: 1.8.0_222
  • Error:
    [ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.0.1398:sonar (default-cli) on project test-service: Unable to execute SonarQube: Fail to get bootstrap index from server: Unexpected response code for CONNECT: 404 -> [Help 1] (see full log blow)
  • Invocation in pipeline:
withMaven(maven: 'Maven 3.5.3', mavenSettingsConfig: 'maven-settings') {
    withSonarQubeEnv('My SonarQube') {
        sh 'mvn org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.0.1398:sonar'
     }
}
  • Further analysis
    • Checked url which is supposed to respond with 404 => I get the requested page
    • Checked with latest version of sonar-maven-plugin (3.6.1.1688) => Same behavior

I’m happy for any kind of help I can get on this issue. Since all involved versions are out for quite some time and the versions are the same as provided in the documentation, I suspect there is an error to be on my side, but I’m stomped on what to do next. Thanks in advance for your effort.

Full Error log:

[INFO] --- sonar-maven-plugin:3.6.0.1398:sonar (default-cli) @ test-service ---
[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=98394, ConflictMarker.markTime=36954, ConflictMarker.nodeCount=7, ConflictIdSorter.graphTime=72617, ConflictIdSorter.topsortTime=16962, ConflictIdSorter.conflictIdCount=6, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=225655, ConflictResolver.conflictItemCount=7, DefaultDependencyCollector.collectTime=16022474, DefaultDependencyCollector.transformTime=549285}
[DEBUG] org.sonarsource.scanner.maven:sonar-maven-plugin:jar:3.6.0.1398:
[DEBUG]    org.sonatype.plexus:plexus-sec-dispatcher:jar:1.4:compile
[DEBUG]       org.sonatype.plexus:plexus-cipher:jar:1.4:compile
[DEBUG]    org.codehaus.plexus:plexus-utils:jar:3.0.22:compile
[DEBUG]    org.sonarsource.scanner.api:sonar-scanner-api:jar:2.12.0.1661:compile
[DEBUG]    commons-lang:commons-lang:jar:2.6:compile
[DEBUG] Created new class realm plugin>org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.0.1398
[DEBUG] Importing foreign packages into class realm plugin>org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.0.1398
[DEBUG]   Imported:  < maven.api
[DEBUG] Populating class realm plugin>org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.0.1398
[DEBUG]   Included: org.sonarsource.scanner.maven:sonar-maven-plugin:jar:3.6.0.1398
[DEBUG]   Included: org.sonatype.plexus:plexus-sec-dispatcher:jar:1.4
[DEBUG]   Included: org.sonatype.plexus:plexus-cipher:jar:1.4
[DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:3.0.22
[DEBUG]   Included: org.sonarsource.scanner.api:sonar-scanner-api:jar:2.12.0.1661
[DEBUG]   Included: commons-lang:commons-lang:jar:2.6
[DEBUG] Configuring mojo org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.0.1398:sonar from plugin realm ClassRealm[plugin>org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.0.1398, parent: sun.misc.Launcher$AppClassLoader@18b4aac2]
[DEBUG] Configuring mojo 'org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.0.1398:sonar' with basic configurator -->
[DEBUG]   (f) mojoExecution = org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.0.1398:sonar {execution: default-cli}
[DEBUG]   (f) session = org.apache.maven.execution.MavenSession@859ea42
[DEBUG]   (f) skip = false
[DEBUG] -- end configuration --
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] 11:10:50.919 Setting proxy properties
[DEBUG] 11:10:50.993 keyStore is : 
[DEBUG] 11:10:50.994 keyStore type is : jks
[DEBUG] 11:10:50.994 keyStore provider is : 
[DEBUG] 11:10:50.994 init keystore
[DEBUG] 11:10:50.994 init keymanager of type SunX509
[DEBUG] 11:10:51.011 Create: /home/jenkins/.sonar/cache
[INFO] 11:10:51.016 User cache: /home/jenkins/.sonar/cache
[DEBUG] 11:10:51.016 Create: /home/jenkins/.sonar/cache/_tmp
[DEBUG] 11:10:51.022 Extract sonar-scanner-api-batch in temp...
[DEBUG] 11:10:51.031 Get bootstrap index...
[DEBUG] 11:10:51.031 Download: https://my.sonarqube.instance.com/batch/index
[ERROR] 11:10:51.113 SonarQube server [https://my.sonarqube.instance.com] can not be reached
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.398 s
[INFO] Finished at: 2019-10-02T11:10:51+02:00
[INFO] ------------------------------------------------------------------------
[INFO] [jenkins-event-spy] Generated /home/jenkins/workspace/croservices_test_service_develop@tmp/withMaven1aec34ca/maven-spy-20191002-111043-3475213482974773818524.log
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.0.1398:sonar (default-cli) on project test-service: Unable to execute SonarQube: Fail to get bootstrap index from server: Unexpected response code for CONNECT: 404 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.0.1398:sonar (default-cli) on project test-service: Unable to execute SonarQube
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to execute SonarQube
    at org.sonarsource.scanner.maven.bootstrap.ScannerBootstrapper.execute (ScannerBootstrapper.java:67)
    at org.sonarsource.scanner.maven.SonarQubeMojo.execute (SonarQubeMojo.java:104)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarQube
    at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0 (IsolatedLauncherFactory.java:85)
    at java.security.AccessController.doPrivileged (Native Method)
    at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher (IsolatedLauncherFactory.java:74)
    at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher (IsolatedLauncherFactory.java:70)
    at org.sonarsource.scanner.api.EmbeddedScanner.doStart (EmbeddedScanner.java:181)
    at org.sonarsource.scanner.api.EmbeddedScanner.start (EmbeddedScanner.java:122)
    at org.sonarsource.scanner.maven.bootstrap.ScannerBootstrapper.execute (ScannerBootstrapper.java:56)
    at org.sonarsource.scanner.maven.SonarQubeMojo.execute (SonarQubeMojo.java:104)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: java.lang.IllegalStateException: Fail to get bootstrap index from server
    at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex (BootstrapIndexDownloader.java:42)
    at org.sonarsource.scanner.api.internal.JarDownloader.getScannerEngineFiles (JarDownloader.java:58)
    at org.sonarsource.scanner.api.internal.JarDownloader.download (JarDownloader.java:53)
    at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0 (IsolatedLauncherFactory.java:76)
    at java.security.AccessController.doPrivileged (Native Method)
    at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher (IsolatedLauncherFactory.java:74)
    at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher (IsolatedLauncherFactory.java:70)
    at org.sonarsource.scanner.api.EmbeddedScanner.doStart (EmbeddedScanner.java:181)
    at org.sonarsource.scanner.api.EmbeddedScanner.start (EmbeddedScanner.java:122)
    at org.sonarsource.scanner.maven.bootstrap.ScannerBootstrapper.execute (ScannerBootstrapper.java:56)
    at org.sonarsource.scanner.maven.SonarQubeMojo.execute (SonarQubeMojo.java:104)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: java.io.IOException: Unexpected response code for CONNECT: 404
    at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.RealConnection.createTunnel (RealConnection.java:410)
    at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.RealConnection.connectTunnel (RealConnection.java:218)
    at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.RealConnection.connect (RealConnection.java:159)
    at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.StreamAllocation.findConnection (StreamAllocation.java:257)
    at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.StreamAllocation.findHealthyConnection (StreamAllocation.java:135)
    at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.StreamAllocation.newStream (StreamAllocation.java:114)
    at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.ConnectInterceptor.intercept (ConnectInterceptor.java:42)
    at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.java:147)
    at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.java:121)
    at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.cache.CacheInterceptor.intercept (CacheInterceptor.java:93)
    at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.java:147)
    at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.java:121)
    at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.BridgeInterceptor.intercept (BridgeInterceptor.java:93)
    at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.java:147)
    at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RetryAndFollowUpInterceptor.intercept (RetryAndFollowUpInterceptor.java:126)
    at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.java:147)
    at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.java:121)
    at org.sonarsource.scanner.api.internal.shaded.okhttp.RealCall.getResponseWithInterceptorChain (RealCall.java:200)
    at org.sonarsource.scanner.api.internal.shaded.okhttp.RealCall.execute (RealCall.java:77)
    at org.sonarsource.scanner.api.internal.ServerConnection.callUrl (ServerConnection.java:113)
    at org.sonarsource.scanner.api.internal.ServerConnection.downloadString (ServerConnection.java:98)
    at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex (BootstrapIndexDownloader.java:39)
    at org.sonarsource.scanner.api.internal.JarDownloader.getScannerEngineFiles (JarDownloader.java:58)
    at org.sonarsource.scanner.api.internal.JarDownloader.download (JarDownloader.java:53)
    at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0 (IsolatedLauncherFactory.java:76)
    at java.security.AccessController.doPrivileged (Native Method)
    at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher (IsolatedLauncherFactory.java:74)
    at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher (IsolatedLauncherFactory.java:70)
    at org.sonarsource.scanner.api.EmbeddedScanner.doStart (EmbeddedScanner.java:181)
    at org.sonarsource.scanner.api.EmbeddedScanner.start (EmbeddedScanner.java:122)
    at org.sonarsource.scanner.maven.bootstrap.ScannerBootstrapper.execute (ScannerBootstrapper.java:56)
    at org.sonarsource.scanner.maven.SonarQubeMojo.execute (SonarQubeMojo.java:104)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
[ERROR] 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Hi,

Welcome to the community!

What happens when you try to access the URL in question manually?

 
Ann

Hi Ann,

Sorry for the late answer. I added a curl request in the step before to make sure that connectivity is there. Here is the result:

curl https://my.sonarqube.instance.com/batch/index
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100    75  100    75    0     0   1335      0 --:--:-- --:--:-- --:--:--  1339
sonar-scanner-engine-shaded-7.9.1-all.jar|a1c05423113146c25aa5a0819888ceec 

So to me this seems fine.

Hi,

Are you sure you’re curl-ing exactly the same URL as is requested by analysis? Because it’s hard for me to get away from the fact that analysis failed because the server returned a 404.

 
Ann

Hi,

Yes, I’m 100% sure that the links are correct. I copied it from the log to open it on my machine and to insert it in the curl request. I even know that the Maven plugin can access the SonarQube server. Earlier I used an old version of the maven plugin which URL encoded the error response from the server into the URL and then complained over a 404. My guess is that the request to the logged URL works, but the next request fails (downloading the sonar-scanner-engine-shaded-7.9.1-all.jar). But since I can’t see the request URL of that call in the logs even on debug level, I have a hard time debugging it. Since I use the pairing of versions recommended by the documentation (see here https://docs.sonarqube.org/7.9/analysis/scan/sonarscanner-for-jenkins/) I would expect these components to work together if there is a connectivity (which there clearly is). Maybe there is a way to get more logs form the plugin? If this is not the case, I can check if there was an error during the setup of our SonarQube server.

Hi,

Do you have anything on the network between Jenkins and SonarQube? Also, you might check the SonarQube access log ($SONARQUBE-HOME/logs/access.log) to see what requests are being made.

 
Ann