0
votes

I'm trying to install SonarQube Runner.

I am using this versions:

  • sonarqube-5.1
  • sonar-runner-dist-2.4
  • mysql 5.1.63
  • jdk 1.7.0_79
  • ubuntu 11.4, 32 bits

I've already configured:

  • sonar/conf/sonar.properties
  • sonar-runner/conf/sonar-runner.properties

And created the project configuration file to analyze, in the directory of my project:

  • sonar-project.properties

The SonarQube is running correctly, I can corroborate doing:

service sonar status

If I run:

sonar-runner -X

I get the following error:

SonarQube Runner 2.4
Java 1.7.0_79 Oracle Corporation (32-bit)
Linux 2.6.38-8-generic i386
INFO: Error stacktraces are turned on.
INFO: Runner configuration file: /opt/sonar-runner/conf/sonar-runner.properties
INFO: Project configuration file: /home/taller/taller2016/U3D_2016/sonar-project.properties
INFO: Default locale: "es_AR", source code encoding: "UTF-8"
INFO: Work directory: /home/taller/taller2016/U3D_2016/./.sonar
INFO: SonarQube Server 5.1
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 0.185s
Final Memory: 0M/53M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
java.lang.IllegalStateException: Fail to download libraries from server
        at org.sonar.runner.impl.Jars.dowloadFiles(Jars.java:78)
        at org.sonar.runner.impl.Jars.download(Jars.java:57)
        at org.sonar.runner.impl.JarDownloader.download(JarDownloader.java:46)
        at org.sonar.runner.impl.JarDownloader.checkVersionAndDownload(JarDownloader.java:37)
        at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:71)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
        at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
        at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
        at org.sonar.runner.api.Runner.execute(Runner.java:100)
        at org.sonar.runner.Main.executeTask(Main.java:70)
        at org.sonar.runner.Main.execute(Main.java:59)
        at org.sonar.runner.Main.main(Main.java:53)
Caused by: java.io.IOException: Status returned by url : 'http://localhost:9002/sonar/batch_bootstrap/index' is invalid : 404
        at org.sonar.runner.impl.ServerConnection.downloadString(ServerConnection.java:94)
        at org.sonar.runner.impl.Jars.dowloadFiles(Jars.java:64)
        ... 12 more

What do I need to do or change to solve it?

The access.log contains:

127.0.0.1 - - [06/oct/2016:16:17:34 -0300] "GET /sonar/api/server/version HTTP/1.1" 200 3 "-" "SonarQubeRunner/2.4"  
127.0.0.1 - - [06/oct/2016:16:17:34 -0300] "GET /sonar/batch_bootstrap/index HTTP/1.1" 302 109 "-" "SonarQubeRunner/2.4"  
127.0.0.1 - - [06/oct/2016:16:17:34 -0300] "GET /sonar/api/maintenance HTTP/1.1" 404 1045 "-" "SonarQubeRunner/2.4"  

Thanks!

1
Can you check the server logs to see if you have any error?Fabrice - SonarSource Team
The logs say: 127.0.0.1 - - [06/oct/2016:16:17:34 -0300] "GET /sonar/api/server/version HTTP/1.1" 200 3 "-" "SonarQubeRunner/2.4" 127.0.0.1 - - [06/oct/2016:16:17:34 -0300] "GET /sonar/batch_bootstrap/index HTTP/1.1" 302 109 "-" "SonarQubeRunner/2.4" 127.0.0.1 - - [06/oct/2016:16:17:34 -0300] "GET /sonar/api/maintenance HTTP/1.1" 404 1045 "-" "SonarQubeRunner/2.4"Iris Figini

1 Answers

2
votes

I found that the version of Java that was running on the server was 6, and this SonarQube needs Java 7. So, I upgraded the version of java. Then continued giving other errors, but droping the database and regenerating it, it worked correctly.