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

Setup wizard timeout for "Install Plugins" step is too short on slow systems or connections

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • core
    • None
    • Default Jenkins docker image (either LTS 2.70.3 or latest) running on Amazon AWS ECS

      Jenkins home is on an NFS server, and I'm also a long way from the AWS region it is running on, which is the key cause of the problem

    Description

      In the jenkins setup wizard, on the "Getting Started \ Customise Jenkins" screen where it asks you to either "Install suggested plugins" or "Select plugins to install", if jenkins is running slowly, eg an NFS filesystem, slow machine, or you are installing remotely over a slow connection, clicking either button gives an error after 10 seconds

      An error occured

      Unable to connect to Jenkins

      The reason for this is simple: in static/c9073345/jsbundles/pluginSetupWizard.js, there's a timeout (line 1919 in 2.60.3):

      // default 10 seconds for AJAX responses to return before triggering an error condition
      var pluginManagerErrorTimeoutMillis = 10 * 1000;
      

      10 seconds isn't long enough on this setup.  Changing this to 180s solves the problem (it actually takes roughly 30 seconds for me)

      // default 10 seconds for AJAX responses to return before triggering an error condition
      var pluginManagerErrorTimeoutMillis = 180 * 1000;

      It's hard to see a benefit to a low timeout here : the error isn't handled in any way and there's no workaround or other way to get past it except to tweaks this code in the browser's javascript debugger. 

      FYI, on my setup, the page /pluginManager/plugins that is timing out takes 18s to actually  load once I increase the timeout although I imagine it could be higher than this for others.

       

      Attachments

        Issue Links

          Activity

            Same here, i am in Google Compute Engine and launched a n1-standard-2 instance (2 vcpu, 7.5gb ram). Installed latest docker and jenkins lts image.  Couldn't pass the plugin installer until i changed the timeout. On my case the plugins.js took 18 seconds to download.

             

            $ docker --version
            Docker version 17.12.0-ce, build c97c6d6

            $ docker run jenkins/jenkins:lts --version
            2.89.2

             

            codestation codestation codestation added a comment - Same here, i am in Google Compute Engine and launched a n1-standard-2 instance (2 vcpu, 7.5gb ram). Installed latest docker and jenkins lts image.  Couldn't pass the plugin installer until i changed the timeout. On my case the plugins.js took 18 seconds to download.   $ docker --version Docker version 17.12.0-ce, build c97c6d6 $ docker run jenkins/jenkins:lts --version 2.89.2  
            papanito papanito added a comment -

            where do you change the timeout?

            papanito papanito added a comment - where do you change the timeout?
            emilkraft Emil Kraft added a comment -

            I fixed the issue by editing pluginSetupWizard.js and changing h=1e4 to something higher like 1e6 (1000 seconds) and now it seems to work

            emilkraft Emil Kraft added a comment - I fixed the issue by editing pluginSetupWizard.js and changing h=1e4 to something higher like 1e6 (1000 seconds) and now it seems to work
            ech0_py ech0 added a comment -

            Workaround mentioned above works for me as well

            ech0_py ech0 added a comment - Workaround mentioned above works for me as well
            rsavra Ray added a comment -

            I found the file, but when I searched for "pluginManagerErrorTimeoutMillis" nothing was found. I am using Jenkins 2.245

            Please advise.

            Thanks.

            rsavra Ray added a comment - I found the file, but when I searched for "pluginManagerErrorTimeoutMillis" nothing was found. I am using Jenkins 2.245 Please advise. Thanks.

            People

              Unassigned Unassigned
              jonathonsim Jonathon Sim
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: