Mike
Mike

Reputation: 155

Unable to install Sonarqube on Mac OSX

I'm trying to install Sonarqube using their 'Get started in 2 minutes guide' - http://docs.sonarqube.org/display/SONAR/Get+Started+in+Two+Minutes

I'm working on a mac OS X 10.10.5 From Settings->Java, I have Java Version 8, update 71

As per instruction I downloaded the SonarQube distribution, and started this in the console

$ sh sonar.sh console
Running SonarQube...
wrapper  | --> Wrapper Started as Console
wrapper  | Launching a JVM...
jvm 1    | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1    |   Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.
jvm 1    | 
jvm 1    | 2016.01.21 16:18:40 INFO  app[o.s.p.m.JavaProcessLauncher] Launch process[search]: /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/bin/java -Djava.awt.headless=true -Xmx1G -Xms256m -Xss256k -Djava.net.preferIPv4Stack=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=/Users/baldockm/Software - Not on Cloud/Sonar/sonarqube-5.3/temp -cp ./lib/common/*:./lib/search/* org.sonar.search.SearchServer /var/folders/xk/1vdhr2sd18g94b1hlzj1jwkw0000gp/T/sq-process5364430543207967313properties
jvm 1    | 2016.01.21 16:18:47 INFO  app[o.s.p.m.Monitor] Process[search] is up
jvm 1    | 2016.01.21 16:18:47 INFO  app[o.s.p.m.JavaProcessLauncher] Launch process[web]: /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false -Djruby.compile.invokedynamic=false -Xmx768m -Xms256m -XX:MaxPermSize=160m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true -Djava.io.tmpdir=/Users/baldockm/Software - Not on Cloud/Sonar/sonarqube-5.3/temp -cp ./lib/common/*:./lib/server/*:/Users/baldockm/Software - Not on Cloud/Sonar/sonarqube-5.3/lib/jdbc/h2/h2-1.3.176.jar org.sonar.server.app.WebServer /var/folders/xk/1vdhr2sd18g94b1hlzj1jwkw0000gp/T/sq-process6892403553294161903properties
jvm 1    | 2016.01.21 16:19:00 INFO  app[o.s.p.m.Monitor] Process[web] is up

So this all looks like it's working.

I then downloaded and unzipped the Sonarqube scanner. Then downloaded and unzipped the project samples Ran from a different terminal window (SonarQube still running in the 1st one)

$cd path/to/.../java-sonar-runner-simple
$path/to//sonar-scanner-2.5/bin/sonar-runner

Which produced the output: Unrecognized option: - Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.

Also, going to the localhost address in the browser produces the error:

We're sorry, but something went wrong. Please try back in a few minutes and contact support if the problem persists. Go back to the homepage

Has anyone else had this problem? Or has any ideas how to solve it?

Upvotes: 3

Views: 5423

Answers (3)

Venu Gopal Tewari
Venu Gopal Tewari

Reputation: 5876

use brew install sonarqube command from terminal. If homebrew is not installed then first install this on MAC.

Upvotes: 1

Nicolas B.
Nicolas B.

Reputation: 7321

For this error:

Unrecognized option: - Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.

This happens because your JVM was given some kind of -Error option that it does not recognize (you can reproduce the symptom easily by running java -foo for example).

You should check where this option comes from (e.g. sonar-runner script modification, or through SONAR_RUNNER_OPTS, or else) and remove it.

Upvotes: 0

Nicolas B.
Nicolas B.

Reputation: 7321

This error:

We're sorry, but something went wrong. Please try back in a few minutes and contact support if the problem persists. Go back to the homepage

(coupled with a "en-US" is not a valid locale error in the server logs)

Seems to be addressed here .

Upvotes: 3

Related Questions