Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6948201
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:47:28+00:00 2026-05-27T13:47:28+00:00

I had a working sonar/jenkins installation, where sonar was installed on localhost:9000 and jenkins

  • 0

I had a working sonar/jenkins installation, where sonar was installed on localhost:9000 and jenkins was on localhost:8080. I then wanted to hide those services behind Apache and protect them behind Crowd-authenticated account access.

So first, I relocated Jenkins to localhost:8080/jenkins and proxied it. Which worked.

Then I relocated Sonar to localhost:9000/sonar and proxied it. Which also worked.

But now, when I try to execute the Sonar task from within the build script in Jenkins, I get the following error:

sonar:
[sonar:sonar] Apache Ant version 1.7.1 compiled on April 26 2010
[sonar:sonar] Sonar Ant Task version: 1.2
[sonar:sonar] Loaded from: file:/usr/share/ant/lib/sonar-ant-task-1.2.jar
[sonar:sonar] Sonar work directory: /var/lib/jenkins/jobs/buzzcartes/workspace/.sonar
[sonar:sonar] Sonar server: http://localhost:9000

BUILD FAILED
org.sonar.batch.bootstrapper.BootstrapException: http://localhost:9000/api/server  /version
    at org.sonar.batch.bootstrapper.Bootstrapper.getServerVersion(Bootstrapper.java:71)
    at org.sonar.ant.SonarTask.checkSonarVersion(SonarTask.java:225)
    at org.sonar.ant.SonarTask.execute(SonarTask.java:188)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:357)
    at org.apache.tools.ant.Target.performTasks(Target.java:385)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
    at org.apache.tools.ant.Main.runBuild(Main.java:758)
    at org.apache.tools.ant.Main.startAnt(Main.java:217)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: java.io.FileNotFoundException: http://localhost:9000/api/server/version
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1610)
    at java.net.URLConnection.getContent(URLConnection.java:748)
    at org.sonar.batch.bootstrapper.Bootstrapper.remoteContent(Bootstrapper.java:123)
    at org.sonar.batch.bootstrapper.Bootstrapper.getServerVersion(Bootstrapper.java:69)
    ... 18 more

I’ve updated the configuration in Jenkins to reflect the new location of http://localhost/sonar so I’m not sure where the http://localhost:9000/ is now coming from. I’ve looked in a variety of config files so far with no joy and Google isn’t turning up any good answers so far. Any pointers would be most welcome.

Oh, my sonar task in build.xml looks like this:

<target name="sonar" depends="compile">
     <!-- list of mandatory Sonar properties -->
    <property name="sonar.sources" value="${basedir}/src" />

    <!-- list of optional Sonar properties -->
    <property name="sonar.projectName" value="buzzcartes" />
    <property name="sonar.binaries" value="${basedir}/build" />
    <property name="sonar.tests" value="${basedir}/test" />
    <property name="sonar.libraries" value="${basedir}/lib" />

    <sonar:sonar key="com.benjasoft:buzzcartes" version="0.1-SNAPSHOT" xmlns:sonar="antlib:org.sonar.ant" /> 

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T13:47:28+00:00Added an answer on May 27, 2026 at 1:47 pm

    Try so set the sonar.host.url parameter

    Maven

    <sonar.host.url>http://wherever.sonar.com:9000</sonar.host.url>
    

    Ant

    <property name="sonar.host.url" value="http://wherever.sonar.com:9000" /> 
    

    Strangely it is not documented here, but mentioned in the ant task guide.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hi had a working phpmyadmin which stopped working when i installed a new version
Going mad. I had this working and then stupidly overwrote my code without a
I had this working in IE9, but then messed it up trying to figure
I had a working installation of NLTK (py26-nltk) on my Mac (OS X 10.6.2).
I had it working yesterday and then I did something and now I have
So I essentially have the following code. I had working code and wanted to
I just had it working, then I thought I was done and it stopped
I had this working then when I added the new category Quantity it now
I had working a java script in my html page.Now i moved the script
I have an Android app that I had working a few months ago which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.