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

Tools download does not appear to respect proxy settings

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Solaris, Glassfish v2, hudson 1.336

      Our hudson install is behind a http proxy. Therefor I have setup a HTTP proxy under the advanced settings for the plugin manager. Plugins download fine, but when using the auto download and install tools the proxy appears not to be used.

      Exception when trying to auto install JDK

      udson.util.IOException2: Failed to access https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=jdk-6u17-oth-JPR@CDS-CDS_Developer
      at hudson.tools.JDKInstaller.locateStage1(JDKInstaller.java:308)
      at hudson.tools.JDKInstaller.locate(JDKInstaller.java:278)
      at hudson.tools.JDKInstaller.performInstallation(JDKInstaller.java:115)
      at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:61)
      at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:99)
      at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:155)
      at hudson.model.JDK.forNode(JDK.java:121)
      at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:657)
      at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:77)
      at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:58)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:577)
      at hudson.model.Build$RunnerImpl.build(Build.java:165)
      at hudson.model.Build$RunnerImpl.doRun(Build.java:133)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:417)
      at hudson.model.Run.run(Run.java:1176)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:123)
      Caused by: java.net.NoRouteToHostException: No route to host
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
      at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1225)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1219)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:906)
      at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234)
      at hudson.tools.JDKInstaller.locateStage1(JDKInstaller.java:296)
      ... 18 more
      Caused by: java.net.NoRouteToHostException: No route to host
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
      at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
      at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
      at java.net.Socket.connect(Socket.java:520)
      at java.net.Socket.connect(Socket.java:470)
      at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
      at sun.net.www.http.HttpClient.openServer(HttpClient.java:388)
      at sun.net.www.http.HttpClient.openServer(HttpClient.java:523)
      at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:278)
      at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:335)
      at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:176)
      at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:765)
      at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:162)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:934)
      at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:1923)
      at sun.net.www.protocol.https.HttpsURLConnectionImpl.getHeaderField(HttpsURLConnectionImpl.java:271)
      at hudson.tools.JDKInstaller.locateStage1(JDKInstaller.java:290)
      ... 18 more

      And the exception from installing maven
      java.net.NoRouteToHostException: No route to host
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
      at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
      at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
      at java.net.Socket.connect(Socket.java:520)
      at java.net.Socket.connect(Socket.java:470)
      at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
      at sun.net.www.http.HttpClient.openServer(HttpClient.java:388)
      at sun.net.www.http.HttpClient.openServer(HttpClient.java:523)
      at sun.net.www.http.HttpClient.<init>(HttpClient.java:231)
      at sun.net.www.http.HttpClient.New(HttpClient.java:304)
      at sun.net.www.http.HttpClient.New(HttpClient.java:321)
      at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:813)
      at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:765)
      at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:690)
      at hudson.FilePath.installIfNecessaryFrom(FilePath.java:537)
      at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:72)
      at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:61)
      at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:99)
      at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:155)
      at hudson.tasks.Maven$MavenInstallation.forNode(Maven.java:499)
      at hudson.tasks.Maven.perform(Maven.java:239)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:577)
      at hudson.model.Build$RunnerImpl.build(Build.java:165)
      at hudson.model.Build$RunnerImpl.doRun(Build.java:133)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:417)
      at hudson.model.Run.run(Run.java:1176)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:123)

          [JENKINS-5271] Tools download does not appear to respect proxy settings

          lynggaard created issue -

          Code changed in hudson
          User: : kohsuke
          Path:
          trunk/hudson/main/core/src/main/java/hudson/FilePath.java
          trunk/hudson/main/core/src/main/java/hudson/ProxyConfiguration.java
          trunk/hudson/main/core/src/main/java/hudson/tools/JDKInstaller.java
          trunk/hudson/main/core/src/main/java/hudson/tools/ZipExtractionInstaller.java
          trunk/hudson/main/core/src/main/java/hudson/util/FormFieldValidator.java
          trunk/hudson/main/core/src/main/java/hudson/util/FormValidation.java
          trunk/www/changelog.html
          http://fisheye4.cenqua.com/changelog/hudson/?cs=25811
          Log:
          [FIXED JENKINS-5271] in 1.342. Automatic tool installation wasn't honoring proxy setting.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : kohsuke Path: trunk/hudson/main/core/src/main/java/hudson/FilePath.java trunk/hudson/main/core/src/main/java/hudson/ProxyConfiguration.java trunk/hudson/main/core/src/main/java/hudson/tools/JDKInstaller.java trunk/hudson/main/core/src/main/java/hudson/tools/ZipExtractionInstaller.java trunk/hudson/main/core/src/main/java/hudson/util/FormFieldValidator.java trunk/hudson/main/core/src/main/java/hudson/util/FormValidation.java trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=25811 Log: [FIXED JENKINS-5271] in 1.342. Automatic tool installation wasn't honoring proxy setting.
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          erwan_q added a comment -

          I think after this correction I had now a pb to skip automatic installation. The correction is correct? The dir /database/products/ci/tools/ant_1.7.0 exist. Thanks

          Before:
          Skipping installation of http://archive.apache.org/dist/ant/binaries/apache-ant-1.7.0-bin.zip to /database/products/ci/tools/ant_1.7.0: java.net.UnknownHostException: archive.apache.org
          [repository] $ /database/products/ci/tools/ant_1.7.0/bin/ant -file build.xml -Dlabel=sun4sol
          Buildfile: build.xml

          Now:
          Unpacking http://archive.apache.org/dist/ant/binaries/apache-ant-1.7.0-bin.zip to /database/products/ci/tools/ant_1.7.0 on Hudson
          FATAL: Failed to install http://archive.apache.org/dist/ant/binaries/apache-ant-1.7.0-bin.zip to /database/products/ci/tools/ant_1.7.0
          hudson.util.IOException2: Failed to install http://archive.apache.org/dist/ant/binaries/apache-ant-1.7.0-bin.zip to /database/products/ci/tools/ant_1.7.0
          at hudson.FilePath.installIfNecessaryFrom(FilePath.java:574)
          at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:72)
          at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:61)
          at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:99)
          at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:155)
          at hudson.tasks.Ant$AntInstallation.forNode(Ant.java:385)
          at hudson.tasks.Ant.perform(Ant.java:138)
          at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
          at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:582)
          at hudson.model.Build$RunnerImpl.build(Build.java:165)
          at hudson.model.Build$RunnerImpl.doRun(Build.java:132)
          at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416)
          at hudson.model.Run.run(Run.java:1198)
          at hudson.matrix.MatrixRun.run(MatrixRun.java:130)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:122)
          Caused by: java.net.UnknownHostException: archive.apache.org
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
          at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
          at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1360)
          at java.security.AccessController.doPrivileged(Native Method)
          at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1354)
          at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1008)
          at org.jvnet.robust_http_client.RetryableHttpStream.getStream(RetryableHttpStream.java:75)
          at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:68)
          at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:51)
          at hudson.FilePath.installIfNecessaryFrom(FilePath.java:560)
          ... 15 more
          Caused by: java.net.UnknownHostException: archive.apache.org
          at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
          at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
          at java.net.Socket.connect(Socket.java:519)
          at java.net.Socket.connect(Socket.java:469)
          at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
          at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
          at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
          at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)
          at sun.net.www.http.HttpClient.New(HttpClient.java:306)
          at sun.net.www.http.HttpClient.New(HttpClient.java:323)
          at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:852)
          at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:793)
          at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:718)
          at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1041)
          at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2165)
          at java.net.URLConnection.getHeaderFieldInt(URLConnection.java:579)
          at java.net.URLConnection.getContentLength(URLConnection.java:474)
          at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:67)
          ... 17 more

          erwan_q added a comment - I think after this correction I had now a pb to skip automatic installation. The correction is correct? The dir /database/products/ci/tools/ant_1.7.0 exist. Thanks Before: Skipping installation of http://archive.apache.org/dist/ant/binaries/apache-ant-1.7.0-bin.zip to /database/products/ci/tools/ant_1.7.0: java.net.UnknownHostException: archive.apache.org [repository] $ /database/products/ci/tools/ant_1.7.0/bin/ant -file build.xml -Dlabel=sun4sol Buildfile: build.xml Now: Unpacking http://archive.apache.org/dist/ant/binaries/apache-ant-1.7.0-bin.zip to /database/products/ci/tools/ant_1.7.0 on Hudson FATAL: Failed to install http://archive.apache.org/dist/ant/binaries/apache-ant-1.7.0-bin.zip to /database/products/ci/tools/ant_1.7.0 hudson.util.IOException2: Failed to install http://archive.apache.org/dist/ant/binaries/apache-ant-1.7.0-bin.zip to /database/products/ci/tools/ant_1.7.0 at hudson.FilePath.installIfNecessaryFrom(FilePath.java:574) at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:72) at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:61) at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:99) at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:155) at hudson.tasks.Ant$AntInstallation.forNode(Ant.java:385) at hudson.tasks.Ant.perform(Ant.java:138) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:582) at hudson.model.Build$RunnerImpl.build(Build.java:165) at hudson.model.Build$RunnerImpl.doRun(Build.java:132) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416) at hudson.model.Run.run(Run.java:1198) at hudson.matrix.MatrixRun.run(MatrixRun.java:130) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:122) Caused by: java.net.UnknownHostException: archive.apache.org at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1360) at java.security.AccessController.doPrivileged(Native Method) at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1354) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1008) at org.jvnet.robust_http_client.RetryableHttpStream.getStream(RetryableHttpStream.java:75) at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:68) at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:51) at hudson.FilePath.installIfNecessaryFrom(FilePath.java:560) ... 15 more Caused by: java.net.UnknownHostException: archive.apache.org at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:519) at java.net.Socket.connect(Socket.java:469) at sun.net.NetworkClient.doConnect(NetworkClient.java:163) at sun.net.www.http.HttpClient.openServer(HttpClient.java:394) at sun.net.www.http.HttpClient.openServer(HttpClient.java:529) at sun.net.www.http.HttpClient.<init>(HttpClient.java:233) at sun.net.www.http.HttpClient.New(HttpClient.java:306) at sun.net.www.http.HttpClient.New(HttpClient.java:323) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:852) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:793) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:718) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1041) at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2165) at java.net.URLConnection.getHeaderFieldInt(URLConnection.java:579) at java.net.URLConnection.getContentLength(URLConnection.java:474) at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:67) ... 17 more

          dadoonet added a comment -

          Same as previous comment :

          I have HUDSON 1.342 running on Linux behind a proxy.

          I set up the network settings for plugins to use my company proxy.
          It works. I'm able to download new version of any plugin.

          When I setup the automatic install for jdk or maven, it doesn't work.
          Here is the log :
          Choosing the download bundle
          Downloading http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jdk-6u17-linux-i586.bin?BundledLineItemUUID=j45IBe.mDSQAAAEmj59imI3r&OrderID=xGtIBe.m8kYAAAEmf59imI3r&ProductID=lBFIBe.oSOMAAAEkGehn5G0y&FileName=/jdk-6u17-linux-i586.bin
          ERROR: Echec à la lecture des POMs
          java.net.UnknownHostException: cds.sun.com
          at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
          at java.net.Socket.connect(Socket.java:519)
          at java.net.Socket.connect(Socket.java:469)
          at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
          at sun.net.www.http.HttpClient.openServer(HttpClient.java:382)
          at sun.net.www.http.HttpClient.openServer(HttpClient.java:494)
          at sun.net.www.http.HttpClient.<init>(HttpClient.java:231)
          at sun.net.www.http.HttpClient.New(HttpClient.java:304)
          at sun.net.www.http.HttpClient.New(HttpClient.java:316)
          at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:817)
          at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:769)
          at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:694)
          at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:938)
          at java.net.URL.openStream(URL.java:1007)
          at hudson.FilePath.copyFrom(FilePath.java:585)
          at hudson.tools.JDKInstaller.performInstallation(JDKInstaller.java:120)
          at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:61)
          at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:99)
          at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:155)
          at hudson.model.JDK.forNode(JDK.java:121)
          at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:676)
          at hudson.maven.MavenModuleSetBuild.getEnvironment(MavenModuleSetBuild.java:128)
          at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:384)
          at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416)
          at hudson.model.Run.run(Run.java:1198)
          at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:304)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:122)

          Java doesn't resolve the cds.sun.com name. So, does Hudson tell Java that there is a proxy ???

          dadoonet added a comment - Same as previous comment : I have HUDSON 1.342 running on Linux behind a proxy. I set up the network settings for plugins to use my company proxy. It works. I'm able to download new version of any plugin. When I setup the automatic install for jdk or maven, it doesn't work. Here is the log : Choosing the download bundle Downloading http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jdk-6u17-linux-i586.bin?BundledLineItemUUID=j45IBe.mDSQAAAEmj59imI3r&OrderID=xGtIBe.m8kYAAAEmf59imI3r&ProductID=lBFIBe.oSOMAAAEkGehn5G0y&FileName=/jdk-6u17-linux-i586.bin ERROR: Echec à la lecture des POMs java.net.UnknownHostException: cds.sun.com at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177) at java.net.Socket.connect(Socket.java:519) at java.net.Socket.connect(Socket.java:469) at sun.net.NetworkClient.doConnect(NetworkClient.java:157) at sun.net.www.http.HttpClient.openServer(HttpClient.java:382) at sun.net.www.http.HttpClient.openServer(HttpClient.java:494) at sun.net.www.http.HttpClient.<init>(HttpClient.java:231) at sun.net.www.http.HttpClient.New(HttpClient.java:304) at sun.net.www.http.HttpClient.New(HttpClient.java:316) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:817) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:769) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:694) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:938) at java.net.URL.openStream(URL.java:1007) at hudson.FilePath.copyFrom(FilePath.java:585) at hudson.tools.JDKInstaller.performInstallation(JDKInstaller.java:120) at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:61) at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:99) at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:155) at hudson.model.JDK.forNode(JDK.java:121) at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:676) at hudson.maven.MavenModuleSetBuild.getEnvironment(MavenModuleSetBuild.java:128) at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:384) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416) at hudson.model.Run.run(Run.java:1198) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:304) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:122) Java doesn't resolve the cds.sun.com name. So, does Hudson tell Java that there is a proxy ???
          dadoonet made changes -
          Resolution Original: Fixed [ 1 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]

          zombieman added a comment -

          I'm also working on a linux machine behind the proxy of our company.
          Normal plugins are downloaded correctly, but tools can't be downloaded automatically.
          My exception is a "Connection timed out". When I past the JDK url in my browser with the correct proxy setting, the url works fine.

          My version : Hudson ver. 1.348
          My OS : Ubuntu Linux 8.04.3

          Choosing the download bundle

          Downloading http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jdk-6u18-linux-x64.bin?BundledLineItemUUID=IONIBe.oPKwAAAEnkJxk1C3f&OrderID=IqFIBe.oxXUAAAEneZxk1C3f&ProductID=p_9IBe.pFJcAAAElWitRSbJV&FileName=/jdk-6u18-linux-x64.bin

          FATAL: Connection timed out

          java.net.ConnectException: Connection timed out
          at java.net.PlainSocketImpl.socketConnect(Native Method)
          at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:310)
          at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:176)
          at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:163)
          at java.net.Socket.connect(Socket.java:537)
          at java.net.Socket.connect(Socket.java:487)
          at sun.net.NetworkClient.doConnect(NetworkClient.java:174)
          at sun.net.www.http.HttpClient.openServer(HttpClient.java:409)
          at sun.net.www.http.HttpClient.openServer(HttpClient.java:530)
          at sun.net.www.http.HttpClient.<init>(HttpClient.java:240)
          at sun.net.www.http.HttpClient.New(HttpClient.java:321)
          at sun.net.www.http.HttpClient.New(HttpClient.java:338)
          at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:806)
          at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:747)
          at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:672)
          at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:997)
          at java.net.URL.openStream(URL.java:1027)
          at hudson.FilePath.copyFrom(FilePath.java:594)
          at hudson.tools.JDKInstaller.performInstallation(JDKInstaller.java:120)
          at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:61)
          at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:99)
          at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:155)
          at hudson.model.JDK.forNode(JDK.java:121)
          at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:676)
          at hudson.tasks.Maven.perform(Maven.java:211)
          at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
          at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:582)
          at hudson.model.Build$RunnerImpl.build(Build.java:165)
          at hudson.model.Build$RunnerImpl.doRun(Build.java:132)
          at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416)
          at hudson.model.Run.run(Run.java:1210)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:122)

          zombieman added a comment - I'm also working on a linux machine behind the proxy of our company. Normal plugins are downloaded correctly, but tools can't be downloaded automatically. My exception is a "Connection timed out". When I past the JDK url in my browser with the correct proxy setting, the url works fine. My version : Hudson ver. 1.348 My OS : Ubuntu Linux 8.04.3 Choosing the download bundle Downloading http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jdk-6u18-linux-x64.bin?BundledLineItemUUID=IONIBe.oPKwAAAEnkJxk1C3f&OrderID=IqFIBe.oxXUAAAEneZxk1C3f&ProductID=p_9IBe.pFJcAAAElWitRSbJV&FileName=/jdk-6u18-linux-x64.bin FATAL: Connection timed out java.net.ConnectException: Connection timed out at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:310) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:176) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:163) at java.net.Socket.connect(Socket.java:537) at java.net.Socket.connect(Socket.java:487) at sun.net.NetworkClient.doConnect(NetworkClient.java:174) at sun.net.www.http.HttpClient.openServer(HttpClient.java:409) at sun.net.www.http.HttpClient.openServer(HttpClient.java:530) at sun.net.www.http.HttpClient.<init>(HttpClient.java:240) at sun.net.www.http.HttpClient.New(HttpClient.java:321) at sun.net.www.http.HttpClient.New(HttpClient.java:338) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:806) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:747) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:672) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:997) at java.net.URL.openStream(URL.java:1027) at hudson.FilePath.copyFrom(FilePath.java:594) at hudson.tools.JDKInstaller.performInstallation(JDKInstaller.java:120) at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:61) at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:99) at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:155) at hudson.model.JDK.forNode(JDK.java:121) at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:676) at hudson.tasks.Maven.perform(Maven.java:211) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:582) at hudson.model.Build$RunnerImpl.build(Build.java:165) at hudson.model.Build$RunnerImpl.doRun(Build.java:132) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416) at hudson.model.Run.run(Run.java:1210) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:122)

          gluckies added a comment -

          Note that the fix done back in January by kohsuke has other side effects, as any plugin using open(URL) validation method now goes to proxy.
          For instance, JIRA plugin no longer works if your company proxy doesn't redirect local addresses (mine doesn't).

          Not sure about what to do in that case if we want to avoid configuring different proxy settings everywhere ...

          gluckies added a comment - Note that the fix done back in January by kohsuke has other side effects, as any plugin using open(URL) validation method now goes to proxy. For instance, JIRA plugin no longer works if your company proxy doesn't redirect local addresses (mine doesn't). Not sure about what to do in that case if we want to avoid configuring different proxy settings everywhere ...

          Same problem over here. Proxy is set up, plugins can be downloaded, tools can't.

          Choosing the download bundle
          FATAL: Connection timed out
          java.net.ConnectException: Connection timed out

          jochenhinrichsen added a comment - Same problem over here. Proxy is set up, plugins can be downloaded, tools can't. Choosing the download bundle FATAL: Connection timed out java.net.ConnectException: Connection timed out

          hubbardr added a comment -

          I had the exact same issue as described above. I was able to get around this by adding the proxy config to my app server's (jboss on ubuntu) startup script.

          export JAVA_OPTS="$JAVA_OPTS -Dhttp.proxyHost=<my proxy>
          export JAVA_OPTS="$JAVA_OPTS -Dhttp.proxyPort=<my proxy port>
          export JAVA_OPTS="$JAVA_OPTS -Dhttp.nonProxyHosts="localhost|*.garmin.com"
          export JAVA_OPTS="$JAVA_OPTS -Dhttps.proxyHost=<my proxy>
          export JAVA_OPTS="$JAVA_OPTS -Dhttps.proxyPort=<my proxy port>
          export JAVA_OPTS="$JAVA_OPTS -Dhttps.nonProxyHosts="localhost|*.garmin.com"

          Hudson was then able to auto-install the package from apache. Hudson however, hung after it extracted the package to ../tools. I checked the file system and everything looked peachy but Hudson just sat there spinning. I was finally able to abort it. The next run was perfectly fine.

          hubbardr added a comment - I had the exact same issue as described above. I was able to get around this by adding the proxy config to my app server's (jboss on ubuntu) startup script. export JAVA_OPTS="$JAVA_OPTS -Dhttp.proxyHost=<my proxy> export JAVA_OPTS="$JAVA_OPTS -Dhttp.proxyPort=<my proxy port> export JAVA_OPTS="$JAVA_OPTS -Dhttp.nonProxyHosts="localhost|*.garmin.com" export JAVA_OPTS="$JAVA_OPTS -Dhttps.proxyHost=<my proxy> export JAVA_OPTS="$JAVA_OPTS -Dhttps.proxyPort=<my proxy port> export JAVA_OPTS="$JAVA_OPTS -Dhttps.nonProxyHosts="localhost|*.garmin.com" Hudson was then able to auto-install the package from apache. Hudson however, hung after it extracted the package to ../tools. I checked the file system and everything looked peachy but Hudson just sat there spinning. I was finally able to abort it. The next run was perfectly fine.

            Unassigned Unassigned
            lynggaard lynggaard
            Votes:
            12 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: