Anyone else having trouble with Jenkins Update?

1,023 views
Skip to first unread message

scott crook

unread,
Jun 6, 2014, 3:40:21 PM6/6/14
to jenkins...@googlegroups.com
I run a couple of Jenkins servers for a small development team. I was looking to upgrade some of my plugins today through the control panel within the web interface in jenkins. As a sanity check I tried downloading the latest version of Jenkins from the web using the link that is front and center on Jenkins-CI.org (http://mirrors.jenkins-ci.org/war/latest/jenkins.war) and I get a 'connection reset' error.

I have found that I can download from the mirror at Oregon State University however.

Is anyone else having this problem?

Daniel Beck

unread,
Jun 6, 2014, 3:54:01 PM6/6/14
to jenkins...@googlegroups.com
http://mirrors.jenkins-ci.org/status.html

It looks like the xmission mirror was unavailable today for a while, and the Chinese mirror has been broken for a while.

From 1.565 Jenkins tells you in the error message which mirror it tries to download from, so you can check whether it got redirected to a mirror that was offline.
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

scott crook

unread,
Jun 6, 2014, 4:26:26 PM6/6/14
to jenkins...@googlegroups.com, m...@beckweb.net
Thanks for the info Daniel.

Is there a configuration setting in Jenkins that I could just point it at the U Oregon mirror directly? I have looked but I don't see a setting that is obvious. Maybe there's something in a config XML file on the hard drive?

Daniel Beck

unread,
Jun 6, 2014, 5:30:49 PM6/6/14
to jenkins...@googlegroups.com
On 06.06.2014, at 22:26, scott crook <smc...@gmail.com> wrote:

> Is there a configuration setting in Jenkins that I could just point it at the U Oregon mirror directly? I have looked but I don't see a setting that is obvious. Maybe there's something in a config XML file on the hard drive?

The download URLs are provided in the configured update center URL (e.g. http://updates.jenkins-ci.org/update-center.json ). They get stored on disk in the 'updates' folder. Since the UC metadata points you to update.jenkins-ci.org, which redirects to one of the mirrors, you'll need to replace those URLs.

You have quite a few options I can think of:

----

Option 1:
If you're behind a proxy, you might be able to configure it to automatically redirect your requests to a specific mirror whenever you're trying to access a URL of the form http://updates.jenkins-ci.org/updates/...

----

Option 2:
Provide your own update center (e.g. using a rewriting proxy, or a periodic download job that edits the file afterwards and makes it available via HTTP) and change the metadata to point to a specific mirror. Setting the undocumented system property hudson.model.DownloadService.noSignatureCheck to 'true' will help as the update center metadata is digitally signed, and failed checks prevent use of the data. Changing the update center URL is probably easiest with the UpdateSites Manager Plugin.

----

Option 3:
Rewrite the contents of the cached metadata files in JENKINS_HOME/updates (e.g. default.json). Jenkins should immediately pick up these changes, as it always checks the modification time of the file on disk.

----

Option 4:
Run your own UC metadata update process within Jenkins, e.g. by running the following in Script Console (or as System Groovy build step, or in Scriptler, ...):

==
def originalurl = 'http://updates.jenkins-ci.org/download/'
def mirroredurl = 'http://jenkins.mirror.isppower.de/' // change to whatever works for you
def ucUrl = new URL('http://updates.jenkins-ci.org/update-center.json')

// loadJSON is not considered public API
def json = hudson.model.DownloadService.loadJSON(ucUrl).replace(originalurl, mirroredurl)

def site = Jenkins.instance.updateCenter.getById('default')

// updateData is not public API either; false means don't verify the signature
def result = site.updateData(json, false)
==

As you can see, this uses a lot of private API, so it might break in any Jenkins update. Also, the regular update process is unchanged, so whenever it runs (which should only happen when manually triggered from Manage Plugin » Advanced if you schedule this script for periodic execution), the URLs are set back to the original values.

Reply all
Reply to author
Forward
0 new messages