Jenkins failing to run sonarqube, sonar-branch-plugin-1.0.0.507.jar 404 not found

I’m trying to get jenkins to run my sonarqube instance but it’s failing. I’ve given the server authentication token as a secret text credential and asked Jenkins to install the sonar scanner automatically. I have a sonar-project.properties file in the appropriate place. When I try to run the job i get the following error. Can anyone help me understand this please?

$ /var/lib/jenkins/tools/hudson.plugins.sonar.SonarRunnerInstallation/SonarQubeScanner/bin/sonar-scanner -Dsonar.host.url=http://sonar.ag.rl.ac.uk:9000 ******** -Dproject.settings=/var/lib/jenkins/workspace/ems-obs/sonar-project.properties -Dsonar.projectBaseDir=/var/lib/jenkins/workspace/ems-obs
INFO: Scanner configuration file: /var/lib/jenkins/tools/hudson.plugins.sonar.SonarRunnerInstallation/SonarQubeScanner/conf/sonar-scanner.properties
INFO: Project root configuration file: /var/lib/jenkins/workspace/ems-obs/sonar-project.properties
INFO: SonarQube Scanner 4.2.0.1873
INFO: Java 1.8.0_242 Oracle Corporation (64-bit)
INFO: Linux 3.10.0-1062.12.1.el7.x86_64 amd64
INFO: User cache: /var/lib/jenkins/.sonar/cache
INFO: SonarQube server 6.7.4
INFO: Default locale: “en_GB”, source code encoding: “UTF-8” (analysis is platform dependent)
INFO: Publish mode
INFO: Load global settings
INFO: Load global settings (done) | time=113ms
INFO: Server id: AWP0GZ4-9gdIDv4Z2lyH
INFO: User cache: /var/lib/jenkins/.sonar/cache
INFO: Load plugins index
INFO: Load plugins index (done) | time=46ms
INFO: Download sonar-branch-plugin-1.0.0.507.jar
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 1.564s
INFO: Final Memory: 39M/93M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
org.sonarqube.ws.client.HttpException: Error 404 on http://sonar.ag.rl.ac.uk:9000/deploy/plugins/branch/sonar-branch-plugin-1.0.0.507.jar : <!doctype html>HTTP Status 404 – Not Foundh1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} h2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} h3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} body {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} b {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} p {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;} a {color:black;} a.name {color:black;} .line {height:1px;background-color:#525D76;border:none;}

HTTP Status 404 – Not Found


Type Status Report

Message /deploy/plugins/branch/sonar-branch-plugin-1.0.0.507.jar

Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.


Apache Tomcat/8.5.23


at org.sonarqube.ws.client.BaseResponse.failIfNotSuccessful(BaseResponse.java:36)
at org.sonar.scanner.bootstrap.ScannerWsClient.failIfUnauthorized(ScannerWsClient.java:106)
at org.sonar.scanner.bootstrap.ScannerWsClient.call(ScannerWsClient.java:75)
at org.sonar.scanner.bootstrap.ScannerPluginInstaller$FileDownloader.download(ScannerPluginInstaller.java:147)
at org.sonar.home.cache.FileCache.download(FileCache.java:96)
at org.sonar.home.cache.FileCache.get(FileCache.java:82)
at org.sonar.scanner.bootstrap.ScannerPluginInstaller.download(ScannerPluginInstaller.java:96)
at org.sonar.scanner.bootstrap.ScannerPluginInstaller.loadPlugins(ScannerPluginInstaller.java:74)
at org.sonar.scanner.bootstrap.ScannerPluginInstaller.installRemotes(ScannerPluginInstaller.java:64)
at org.sonar.scanner.bootstrap.ScannerPluginRepository.start(ScannerPluginRepository.java:59)
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.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110)
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
at org.picocontainer.behaviors.Stored.start(Stored.java:110)
at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:134)
at org.sonar.batch.bootstrapper.Batch.doStart(Batch.java:94)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:69)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
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.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
WARN: Unable to locate ‘report-task.txt’ in the workspace. Did the SonarScanner succeeded?
ERROR: SonarQube scanner exited with non-zero code: 1
Finished: FAILURE

Hi,

Welcome to the community!

Analysis is kicking off properly but unable to connect to your SonarQube server to get components it needs. You’ve specified the location of your SonarQube server in your analysis command line (-Dsonar.host.url=http://sonar.ag.rl.ac.uk:9000) so make sure that’s correct.

 
HTH,
Ann

Thanks for getting back to me. It is the correct URL. Could this be a permissions issue? I provided a server authentication token in Jenkins as a Secret Text key, is this correct?

Hi,

You’re getting a 404. That’s “not found”, not “no permissions”.

Sorry, but I don’t know what else to tell you.

 
Ann