Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get Hudson to update through Proxy

We run a corporate proxy with authentication and we're running Hudson as our CI platform. Hudson can get to the outside world to tell which plugins need updating, but when we tell Hudson to download the updates to the plugins, we get the following error.

java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied.  )"
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:603)
at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:812)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Caused by: java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied.  )"
at sun.net.www.protocol.http.HttpURLConnection.doTunneling(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown Source)
at java.net.URLConnection.getHeaderFieldInt(Unknown Source)
at java.net.URLConnection.getContentLength(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getContentLength(Unknown Source)
at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:602)
... 7 more

Does anyone know how I can configure Hudson or our JRE or whatever needs configuring, to allow Hudson to update via the GUI? Sure we can download updates manually but that gets annoying after a while.

Currently we have Hudson installed as a service on windows server 2008 and its using the built in server that came with Hudson to host it. Also, I've set the proxy configuration via the "Advanced" tab

like image 715
Allen Rice Avatar asked Dec 29 '09 16:12

Allen Rice


1 Answers

Two things to do

1.  Pop over into the plugin manager and select advanced, enter the settings in there
2.  Set the properties of the JRE http://java.sun.com/javase/6/docs/technotes/guides/net/properties.html

You can set properties using the -Dproperty.name=some.value syntax when starting up hudson.

like image 74
stimms Avatar answered Oct 02 '22 00:10

stimms