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

JSONException

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: other
    • Labels:
      None
    • Environment:
      CentOS release 5.5, Hudson 1.367
    • Similar Issues:

      Description

      If something goes wrong in the middle of an update, Hudson gets stuck and never recovers without manual intervention.

      After a failed build / update last night, the following exception was thrown on every subsequent build. The fix was to delete the files in /var/tomcat0/.hudson/updates/* Ideally, Hudson would be able to recover from this on its own.

      FATAL: A JSONObject text must begin with '{' at character 0 of
      net.sf.json.JSONException: A JSONObject text must begin with '{' at character 0 of
      at net.sf.json.util.JSONTokener.syntaxError(JSONTokener.java:512)
      at net.sf.json.JSONObject._fromJSONTokener(JSONObject.java:839)
      at net.sf.json.JSONObject._fromString(JSONObject.java:1060)
      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:197)
      at hudson.tools.DownloadFromUrlInstaller$DescriptorImpl.getInstallables(DownloadFromUrlInstaller.java:149)
      at hudson.tools.DownloadFromUrlInstaller.getInstallable(DownloadFromUrlInstaller.java:54)
      at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.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:149)
      at hudson.tasks.Ant$AntInstallation.forNode(Ant.java:376)
      at hudson.tasks.Ant.perform(Ant.java:140)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:601)
      at hudson.model.Build$RunnerImpl.build(Build.java:174)
      at hudson.model.Build$RunnerImpl.doRun(Build.java:138)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416)
      at hudson.model.Run.run(Run.java:1257)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:129)

      I have no idea which component this is actually because of.

        Attachments

          Activity

          Hide
          viktornordling Viktor Nordling added a comment -

          I had this problem with a fresh install of 1.420. Added a JDK and Maven installer then went straight to plugin list, which was empty and logs were spitting out JSONExceptions. Solved it by deleteing all files in the updates directory under my jenkins user (on ubuntu).

          Show
          viktornordling Viktor Nordling added a comment - I had this problem with a fresh install of 1.420. Added a JDK and Maven installer then went straight to plugin list, which was empty and logs were spitting out JSONExceptions. Solved it by deleteing all files in the updates directory under my jenkins user (on ubuntu).
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          core/src/main/java/hudson/model/DownloadService.java
          core/src/main/java/hudson/model/UpdateSite.java
          http://jenkins-ci.org/commit/jenkins/ce7300cdf672c58a9b4456f5f0bdc3288e152427
          Log:
          [FIXED JENKINS-7034] auto-recover from corrupt update data.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/src/main/java/hudson/model/DownloadService.java core/src/main/java/hudson/model/UpdateSite.java http://jenkins-ci.org/commit/jenkins/ce7300cdf672c58a9b4456f5f0bdc3288e152427 Log: [FIXED JENKINS-7034] auto-recover from corrupt update data.
          Hide
          dogfood dogfood added a comment -

          Integrated in jenkins_main_trunk #1132
          [FIXED JENKINS-7034] auto-recover from corrupt update data.

          Kohsuke Kawaguchi : ce7300cdf672c58a9b4456f5f0bdc3288e152427
          Files :

          • core/src/main/java/hudson/model/DownloadService.java
          • core/src/main/java/hudson/model/UpdateSite.java
          • changelog.html
          Show
          dogfood dogfood added a comment - Integrated in jenkins_main_trunk #1132 [FIXED JENKINS-7034] auto-recover from corrupt update data. Kohsuke Kawaguchi : ce7300cdf672c58a9b4456f5f0bdc3288e152427 Files : core/src/main/java/hudson/model/DownloadService.java core/src/main/java/hudson/model/UpdateSite.java changelog.html
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          core/src/main/java/hudson/model/DownloadService.java
          core/src/main/java/hudson/model/UpdateSite.java
          http://jenkins-ci.org/commit/jenkins/ce7300cdf672c58a9b4456f5f0bdc3288e152427
          Log:
          [FIXED JENKINS-7034] auto-recover from corrupt update data.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/src/main/java/hudson/model/DownloadService.java core/src/main/java/hudson/model/UpdateSite.java http://jenkins-ci.org/commit/jenkins/ce7300cdf672c58a9b4456f5f0bdc3288e152427 Log: [FIXED JENKINS-7034] auto-recover from corrupt update data.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          core/src/main/java/hudson/model/DownloadService.java
          core/src/main/java/hudson/model/UpdateSite.java
          http://jenkins-ci.org/commit/jenkins/5f07ed7c96f50193af00f7c9c7e4197ed016c5bd
          Log:
          [FIXED JENKINS-7034] auto-recover from corrupt update data.

          Cherry-picked-from: ce7300cdf672c58a9b4456f5f0bdc3288e152427

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: core/src/main/java/hudson/model/DownloadService.java core/src/main/java/hudson/model/UpdateSite.java http://jenkins-ci.org/commit/jenkins/5f07ed7c96f50193af00f7c9c7e4197ed016c5bd Log: [FIXED JENKINS-7034] auto-recover from corrupt update data. Cherry-picked-from: ce7300cdf672c58a9b4456f5f0bdc3288e152427

            People

            • Assignee:
              Unassigned
              Reporter:
              angledluffa AngledLuffa
            • Votes:
              2 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: