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

UpdateCenter stuck at preparation phase when jenkins server is behind GFW

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: core
    • Labels:
    • Environment:
      MacOS X Mavericks;
      jenkins Mac installation package;
      Server is in PR. China without any proxies. Google.com cannot accessed due to GFW blocking
    • Similar Issues:

      Description

      Try to install a plugin in PluginManager; click "Install and restart".
      in UpdateCenter, screen stuck at "Preparation Checking internet connectivity".

      No logs printed out in `var/log/jenkins/jenkins.log`

      This bug is caused by method `getConnectionCheckUrl` using url "google.com" to check connectivity.
      https://github.com/jenkinsci/jenkins/blob/afd8da49901775900a80eb2b2a9746b01156b0ba/core/src/main/java/hudson/model/UpdateCenter.java#L841

      ------- update:
      I just built jenkins.war replaced the google.com with another url. But It still not work.

      I got these warnings, and the log is the same when using 'google.com' url. So it may not be the url problem.

      七月 02, 2014 7:49:14 下午 hudson.model.UpdateSite$Plugin deploy
      警告: Adding dependent install of ssh-credentials for plugin git
      七月 02, 2014 7:49:14 下午 hudson.model.UpdateSite$Plugin deploy
      警告: Adding dependent install of credentials for plugin ssh-credentials
      七月 02, 2014 7:49:14 下午 hudson.model.UpdateSite$Plugin deploy
      警告: Adding dependent install of git-client for plugin git
      七月 02, 2014 7:49:14 下午 hudson.model.UpdateSite$Plugin deploy
      警告: Dependent install of ssh-credentials for plugin git-client already added, skipping
      七月 02, 2014 7:49:14 下午 hudson.model.UpdateSite$Plugin deploy
      警告: Adding dependent install of scm-api for plugin git
      七月 02, 2014 7:49:14 下午 hudson.model.UpdateSite$Plugin deploy
      警告: Dependent install of credentials for plugin git already added, skipping

        Attachments

          Issue Links

            Activity

            Hide
            pipehappy y g added a comment -

            Any update on this problem?

            I can ping updates.jenkins-ci.org and download package manually but cannot use the update center.

            I guess the problem is because the server is behind GFW. But why bother test against other site when you want to connect to THE SITE if I follow the comments correctly.

            Show
            pipehappy y g added a comment - Any update on this problem? I can ping updates.jenkins-ci.org and download package manually but cannot use the update center. I guess the problem is because the server is behind GFW. But why bother test against other site when you want to connect to THE SITE if I follow the comments correctly.
            Hide
            tdxmgy mgy tdxmgy added a comment -

            If you want to update some plugins, you can modify jenkins_home/updates/default.json ,change connectionCheckUrl from http://www.google.com/ to some one you can access ,maybe https://www.baidu.com for china, then reload configuration,and install plugins.But jenkins will get this file daily,so if you need,you can do it.

            Show
            tdxmgy mgy tdxmgy added a comment - If you want to update some plugins, you can modify jenkins_home/updates/default.json ,change connectionCheckUrl from http://www.google.com/ to some one you can access ,maybe https://www.baidu.com for china, then reload configuration,and install plugins.But jenkins will get this file daily,so if you need,you can do it.
            Hide
            tdxmgy mgy tdxmgy added a comment -
            Show
            tdxmgy mgy tdxmgy added a comment - y g
            Hide
            orrc Christopher Orr added a comment -

            Daniel Beck: What do you think?

            Could we just set http://updates.jenkins-ci.org/ as the connectivity check URL in the JSON? It is reliable, and is what the code currently checks anyway at the moment (after checking Google):
            https://github.com/jenkinsci/jenkins/blob/jenkins-1.647/core/src/main/java/hudson/model/UpdateCenter.java#L1062

            If you can't reach the Jenkins update server, then you have problems anyway. In the worst case, if that host really is down, then the user would be informed, and asked if they need to make proxy changes. But that should be rare, and the same would happen anyway for people in countries where Google can end up being blocked.

            Just wondering, as somebody was asking about the connection check URL here:
            https://github.com/jenkinsci/backend-update-center2/pull/40#issuecomment-183517346

            Show
            orrc Christopher Orr added a comment - Daniel Beck : What do you think? Could we just set http://updates.jenkins-ci.org/ as the connectivity check URL in the JSON? It is reliable, and is what the code currently checks anyway at the moment (after checking Google): https://github.com/jenkinsci/jenkins/blob/jenkins-1.647/core/src/main/java/hudson/model/UpdateCenter.java#L1062 If you can't reach the Jenkins update server, then you have problems anyway. In the worst case, if that host really is down, then the user would be informed, and asked if they need to make proxy changes. But that should be rare, and the same would happen anyway for people in countries where Google can end up being blocked. Just wondering, as somebody was asking about the connection check URL here: https://github.com/jenkinsci/backend-update-center2/pull/40#issuecomment-183517346
            Hide
            rtyler R. Tyler Croy added a comment -

            I have no idea if this helps at all, but Sean Wang you might be to hit our mirrors directly for your update-center.json.

            A list of the mirrors can be found here and from each mirror listed you should be able to navigate to updates/ and then select either the latest update-center.json or the LTS version (stable/update-center.json)

            Show
            rtyler R. Tyler Croy added a comment - I have no idea if this helps at all, but Sean Wang you might be to hit our mirrors directly for your update-center.json. A list of the mirrors can be found here and from each mirror listed you should be able to navigate to updates/ and then select either the latest update-center.json or the LTS version ( stable/update-center.json )

              People

              • Assignee:
                Unassigned
                Reporter:
                seganw Sean Wang
              • Votes:
                1 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated: