Reputation: 1395
I'm trying to get Sonar working locally on an OS X box to do some proof of concept work, I've downloaded the following:
Sonar Qube: 4.5.6
Sonar Runner: 2.4
Sonar Qube is configured as:
sonar.web.host=localhost
sonar.web.context=/sonar
sonar.web.port=9000
When I try and use Sonar Runner with one of the example projects I get the following error:
ERROR: Error during Sonar runner execution
ERROR: Fail to request server version
ERROR: Caused by: Status returned by url : 'http://localhost:9000/sonar/api/server/version' is invalid : 404
If I copy and paste the URL from the console into the browser then the page loads (displaying 4.5.6).
What could be causing the script to receive a 404?
The box is behind a proxy but nothing should be trying to get to the outside world
UPDATE: Changing the configuration from localhost to using the machines IP address produces a timeout rather than a 404, everything still works fine through the browser.
Upvotes: 0
Views: 3052
Reputation: 1
Actually, it means the port cannot be started. Just locate the sonar.properties file and modify the port configuration.
For example, change the configuration to the following:
sonar.web.host=127.0.0.1
sonar.web.context=/sonar
sonar.web.port=11000
sonar.search.port=11001
After a successful start, you will be able to access this webpage. Please note the configuration of your sonar.web.context as well. http://localhost:11000/sonar/
Upvotes: 0
Reputation: 1395
So it turned out my problem was that the JVM
wasn't using the proxy settings of my machine, I had to add the following to the Sonar
runner script.
SONAR_RUNNER_OPTS="-Dhttp.proxyHost=myproxy -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts=my.local.host"
Upvotes: 1
Reputation: 7321
It's possible that HTTP queries from sonar-runner
are routed based on system proxy settings, while your browsers may use their own proxy settings.
Go check the system-wide setting:
System Preferences/Network/Advanced/Proxies/Bypass proxy settings for these Hosts & Domains
And make sure that localhost/127.0.0.1 is in there.
Upvotes: 0