Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-4841

Auto-install of ant breaks builds

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • core
    • None
    • Platform: All, OS: All

    Description

      We're seeing a json error when trying to execute a build that uses an "Install
      automatically" ant. It doesn't happen when we use a locally installed ant.
      Here is the error message:

      FATAL: Unterminated string at character 1162 of {"list": [

      {"url": "http://archive.apache.org/dist/ant/binaries/apache-ant-1.7.1-bin.zip", "name": "1.7.1", "id": "1.7.1"}

      ,

      {"url": "http://archive.apache.org/dist/ant/binaries/apache-ant-1.7.0-bin.zip", "name": "1.7.0", "id": "1.7.0"}

      ,

      {"url": "http://archive.apache.org/dist/ant/binaries/apache-ant-1.6.5-bin.zip", "name": "1.6.5", "id": "1.6.5"}

      ,

      {"url": "http://archive.apache.org/dist/ant/binaries/apache-ant-1.6.4-bin.zip", "name": "1.6.4", "id": "1.6.4"}

      ,

      {"url": "http://archive.apache.org/dist/ant/binaries/apache-ant-1.6.3-bin.zip", "name": "1.6.3", "id": "1.6.3"}

      ,

      {"url": "http://archive.apache.org/dist/ant/binaries/apache-ant-1.6.2-bin.zip", "name": "1.6.2", "id": "1.6.2"}

      ,

      {"url": "http://archive.apache.org/dist/ant/binaries/apache-ant-1.6.1-bin.zip", "name": "1.6.1", "id": "1.6.1"}

      ,

      {"url": "http://archive.apache.org/dist/ant/binaries/apache-ant-1.6.0-bin.zip", "name": "1.6.0", "id": "1.6.0"}

      ,

      {"url": "http://archive.apache.org/dist/ant/binaries/apache-ant-1.5.4-bin.zip", "name": "1.5.4", "id": "1.5.4"}

      ,

      {"url": "http://archive.apache.org/dist/ant/binaries/apache-ant-1.5.3-1-bin.zip", "name": "1.5.3-1", "id": "1.5.3-1"}

      , {"url": "http:/

      net.sf.json.JSONException: Unterminated string at character 1162 of {"list":
      [

      {"url": "http://archive.apache.org/dist/ant/binaries/apache-ant-1.7.1-bin.zip", "name": "1.7.1", "id": "1.7.1"}

      ,

      {"url": "http://archive.apache.org/dist/ant/binaries/apache-ant-1.7.0-bin.zip", "name": "1.7.0", "id": "1.7.0"}

      ,

      {"url": "http://archive.apache.org/dist/ant/binaries/apache-ant-1.6.5-bin.zip", "name": "1.6.5", "id": "1.6.5"}

      ,

      {"url": "http://archive.apache.org/dist/ant/binaries/apache-ant-1.6.4-bin.zip", "name": "1.6.4", "id": "1.6.4"}

      ,

      {"url": "http://archive.apache.org/dist/ant/binaries/apache-ant-1.6.3-bin.zip", "name": "1.6.3", "id": "1.6.3"}

      ,

      {"url": "http://archive.apache.org/dist/ant/binaries/apache-ant-1.6.2-bin.zip", "name": "1.6.2", "id": "1.6.2"}

      ,

      {"url": "http://archive.apache.org/dist/ant/binaries/apache-ant-1.6.1-bin.zip", "name": "1.6.1", "id": "1.6.1"}

      ,

      {"url": "http://archive.apache.org/dist/ant/binaries/apache-ant-1.6.0-bin.zip", "name": "1.6.0", "id": "1.6.0"}

      ,

      {"url": "http://archive.apache.org/dist/ant/binaries/apache-ant-1.5.4-bin.zip", "name": "1.5.4", "id": "1.5.4"}

      ,

      {"url": "http://archive.apache.org/dist/ant/binaries/apache-ant-1.5.3-1-bin.zip", "name": "1.5.3-1", "id": "1.5.3-1"}

      , {"url": "http:/

      at net.sf.json.util.JSONTokener.syntaxError(JSONTokener.java:512)
      at net.sf.json.util.JSONTokener.nextString(JSONTokener.java:244)
      at net.sf.json.util.JSONTokener.nextValue(JSONTokener.java:352)
      at net.sf.json.JSONObject._fromJSONTokener(JSONObject.java:850)
      at net.sf.json.JSONObject.fromObject(JSONObject.java:170)
      at net.sf.json.util.JSONTokener.nextValue(JSONTokener.java:355)
      at net.sf.json.JSONArray._fromJSONTokener(JSONArray.java:917)
      at net.sf.json.JSONArray.fromObject(JSONArray.java:139)
      at net.sf.json.util.JSONTokener.nextValue(JSONTokener.java:358)
      at net.sf.json.JSONObject._fromJSONTokener(JSONObject.java:850)
      at net.sf.json.JSONObject._fromString(JSONObject.java:1039)
      at net.sf.json.JSONObject.fromObject(JSONObject.java:176)
      at net.sf.json.JSONObject.fromObject(JSONObject.java:147)
      at
      hudson.model.DownloadService$Downloadable.getData(DownloadService.java:194)
      at
      hudson.tools.DownloadFromUrlInstaller$DescriptorImpl.getInstallables(DownloadFro
      mUrlInstaller.java:149)
      at
      hudson.tools.DownloadFromUrlInstaller.getInstallable(DownloadFromUrlInstaller.ja
      va:54)
      at
      hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstall
      er.java:63)
      at
      hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:61)
      at
      hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:
      99)
      at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:155)
      at hudson.tasks.Ant$AntInstallation.forNode(Ant.java:385)
      at hudson.tasks.Ant.perform(Ant.java:138)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      at
      hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:508)
      at hudson.model.Build$RunnerImpl.build(Build.java:194)
      at hudson.model.Build$RunnerImpl.doRun(Build.java:133)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:381)
      at hudson.model.Run.run(Run.java:1174)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:123)

      Attachments

        Issue Links

          Activity

            jglick Jesse Glick added a comment -

            Maybe a problem with the tool server? Or a network issue?

            jglick Jesse Glick added a comment - Maybe a problem with the tool server? Or a network issue?
            tiembo tiembo added a comment -

            It's probably not a network issue, as the Hudson master can reach apache. We
            didn't make any config changes, and builds stopped working around 1PM CST.

            tiembo tiembo added a comment - It's probably not a network issue, as the Hudson master can reach apache. We didn't make any config changes, and builds stopped working around 1PM CST.
            mindless Alan Harder added a comment -
                • Issue 4874 has been marked as a duplicate of this issue. ***
            mindless Alan Harder added a comment - Issue 4874 has been marked as a duplicate of this issue. ***
            mindless Alan Harder added a comment -

            can you check your $HUDSON_HOME/updates/hudson.tasks.Ant.AntInstaller file and
            post the contents here? sounds like it might be truncated.

            If it looks truncated, try deleting the file and then navigate around a few
            pages in your Hudson install until the file reappears. Is the file still
            truncated? If so, any javascript errors reported in your browser? (Tools /
            Error Console in firefox).

            mindless Alan Harder added a comment - can you check your $HUDSON_HOME/updates/hudson.tasks.Ant.AntInstaller file and post the contents here? sounds like it might be truncated. If it looks truncated, try deleting the file and then navigate around a few pages in your Hudson install until the file reappears. Is the file still truncated? If so, any javascript errors reported in your browser? (Tools / Error Console in firefox).
            mindless Alan Harder added a comment -

            ah, this is probably a remnant of issue #4804. while using Hudson 1.333 you got
            a truncated download due to that issue, and it is now causing these build
            failures. upgrade to 1.334, remove the
            $HUDSON_HOME/updates/hudson.tasks.Ant.AntInstaller file and restart Hudson..
            reopen this issue if that doesn't fix it, thanks. (maybe delete all the files
            in $HUDSON_HOME/updates for good measure)

                • This issue has been marked as a duplicate of 4804 ***
            mindless Alan Harder added a comment - ah, this is probably a remnant of issue #4804. while using Hudson 1.333 you got a truncated download due to that issue, and it is now causing these build failures. upgrade to 1.334, remove the $HUDSON_HOME/updates/hudson.tasks.Ant.AntInstaller file and restart Hudson.. reopen this issue if that doesn't fix it, thanks. (maybe delete all the files in $HUDSON_HOME/updates for good measure) This issue has been marked as a duplicate of 4804 ***
            tiembo tiembo added a comment -

            I can't seem to reduplicate the problem after upgrading to 1.334. Everything
            looks good!

            As a side note, after deleting hudson.tasks.Ant.AntInstaller it didn't regenerate
            itself until I restarted Hudson, even after browsing around for awhile.

            tiembo tiembo added a comment - I can't seem to reduplicate the problem after upgrading to 1.334. Everything looks good! As a side note, after deleting hudson.tasks.Ant.AntInstaller it didn't regenerate itself until I restarted Hudson, even after browsing around for awhile.

            People

              Unassigned Unassigned
              tiembo tiembo
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: