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

Updates fail due to invalid JSON from HTTP updates.jenkins.io (HTTPS is ok)

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core

      Updates currently fail due to the corresponding endpoint at http://updates.jenkins-ci.org/update-center.json (redirected to https://westeurope.cloudflare.jenkins.io/dynamic-2.476/update-center.json) returning invalid JSON (first characters shown here):

      updateCenter.post(
      {"connectionCheckUrl":"https://www.go
      

      Stacktrace on startup:

      java.io.IOException: Could not find JSON in http://updates.jenkins-ci.org/update-center.json?id=default&version=2.476
              at hudson.model.DownloadService.loadJSON(DownloadService.java:129)
              at hudson.model.UpdateSite.updateDirectlyNow(UpdateSite.java:217)
              at hudson.model.UpdateSite.updateDirectlyNow(UpdateSite.java:212)
              at hudson.model.UpdateCenter.updateAllSitesNow(UpdateCenter.java:2866)
              at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:67)
              at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
              at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
              at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
              at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
              at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
              at java.base/java.lang.Thread.run(Thread.java:840)
      
      

      Firefox complains about this as well:

      SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
      

          [JENKINS-73760] Updates fail due to invalid JSON from HTTP updates.jenkins.io (HTTPS is ok)

          Pinned comments

          Pinned by Damien Duportal

          Stefan added a comment -

          Going to "Manage Jenkins" > "Plugins" > "Advanced settings" and clicking the "Reset" link in the "Update site" section successfully fixed this for me by automatically updating the outdated URL.

          Stefan added a comment - Going to "Manage Jenkins" > "Plugins" > "Advanced settings" and clicking the "Reset" link in the "Update site" section successfully fixed this for me by automatically updating the outdated URL.

          All comments

          Edoardo added a comment -

          This is what I see when I open the update page, on 2.462.2.

          Edoardo added a comment - This is what I see when I open the update page, on 2.462.2.

          Pinned by Damien Duportal

          Stefan added a comment -

          Going to "Manage Jenkins" > "Plugins" > "Advanced settings" and clicking the "Reset" link in the "Update site" section successfully fixed this for me by automatically updating the outdated URL.

          Stefan added a comment - Going to "Manage Jenkins" > "Plugins" > "Advanced settings" and clicking the "Reset" link in the "Update site" section successfully fixed this for me by automatically updating the outdated URL.

          Hi lppedd thanks, we are aware of this issue. As described by Stefan below, your Jenkins controller did carry over a really old configuration. If you set it up to https://updates.jenkins.io, it will work as expected.

          Damien Duportal added a comment - Hi lppedd thanks, we are aware of this issue. As described by Stefan below, your Jenkins controller did carry over a really old configuration. If you set it up to https://updates.jenkins.io , it will work as expected.

          Edoardo added a comment -

          stefan6419846 my URL was set to http://updates.jenkins-ci.org/update-center.json, and resetting it didn't change it. Still see the issue.

          Edoardo added a comment - stefan6419846 my URL was set to http://updates.jenkins-ci.org/update-center.json, and resetting it didn't change it. Still see the issue.

          Edoardo added a comment - - edited

          Thanks dduportal! What I did was manually change it to https://updates.jenkins.io/update-center.json, and then click on the Update/Refresh button under Updates.

          After refreshing it, issue's gone!

          Edoardo added a comment - - edited Thanks dduportal ! What I did was manually change it to https://updates.jenkins.io/update-center.json, and then click on the Update/Refresh button under Updates. After refreshing it, issue's gone!

          Basil Crow added a comment -

          we have been using the same (base) configuration for over ten years now and apparently this has never been updated by us or migrated automatically as there has been no need to do so until now

          https://github.com/jenkinsci/jenkins/pull/9760

          Basil Crow added a comment - we have been using the same (base) configuration for over ten years now and apparently this has never been updated by us or migrated automatically as there has been no need to do so until now ⇨ https://github.com/jenkinsci/jenkins/pull/9760

          Many thanks basil !

          For the record, the infra team is adding an HTTP component to the new Update Center system which will avoid the error to happen when we'll migrate.
          It should NOT restrain users to update (reset - see pinned comment) their default Update Center URL.
          But we do not want to create bad surprises such as this one.

          See https://github.com/jenkins-infra/helpdesk/issues/2649#issuecomment-2364040032 for follows up. Main take away is that we'll run an additional brownout of 24 hours to validate that HTTP works as expected

          Damien Duportal added a comment - Many thanks basil ! For the record, the infra team is adding an HTTP component to the new Update Center system which will avoid the error to happen when we'll migrate. It should NOT restrain users to update (reset - see pinned comment) their default Update Center URL. But we do not want to create bad surprises such as this one. See https://github.com/jenkins-infra/helpdesk/issues/2649#issuecomment-2364040032 for follows up. Main take away is that we'll run an additional brownout of 24 hours to validate that HTTP works as expected

          Hi stefan6419846lppedd,

          We decided to add a full HTTP-only support to the new Update Center system to avoid bad surprises for users.

          We just started another "brownout" (e.g. using the new system for ~24h) to validate everything works as expected: please let us know if you have any errors.

          Of course we've tried using the `http://updates.jenkins-ci.org/update-center.json` URL and it works very well right now!

          Damien Duportal added a comment - Hi stefan6419846 lppedd , We decided to add a full HTTP-only support to the new Update Center system to avoid bad surprises for users. We just started another "brownout" (e.g. using the new system for ~24h) to validate everything works as expected: please let us know if you have any errors. Of course we've tried using the ` http://updates.jenkins-ci.org/update-center.json ` URL and it works very well right now!

          Stefan added a comment -

          I have switched to HTTPS in the meantime, but just tested with the code from https://issues.jenkins.io/browse/JENKINS-73760?focusedId=449257&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-449257 and it worked without issues this time.

          Stefan added a comment - I have switched to HTTPS in the meantime, but just tested with the code from https://issues.jenkins.io/browse/JENKINS-73760?focusedId=449257&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-449257 and it worked without issues this time.

          Mark Waite added a comment -

          Marking it as resolved before the 2.480 release so that it appears in my lts-candidate queries

          Mark Waite added a comment - Marking it as resolved before the 2.480 release so that it appears in my lts-candidate queries

            basil Basil Crow
            stefan6419846 Stefan
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: