I changed my Sonar to run on localhost:9100 instead of default localhost:9000. I restarted the server and I can browse to the new address. However when I execute Sonar using Ant, I get the below exception.
org.sonar.batch.bootstrapper.BootstrapException: Connection refused
Looking at Sonar Ant logs, it clearly states:
[sonar:sonar] Sonar server: http://localhost:9000
Why does Ant still try to execute Sonar at port 9000? The port is only defined (and changed) in the Sonar properties file that is read when Sonar server is started. The port is therefore not defined in the Ant target script or property.
You must specify the following property
, if you want Sonar batch to connect to the correct URL.
You can set it either as a property in your Ant script or a JVM parameter.