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

"java.net.SocketTimeoutException: Read timed out" error during jenkins upgrade automatically

    Details

    • Similar Issues:

      Description

      When I am trying to upgrade jenkins automatically I am getting the following error:

      hudson.util.IOException2: Failed to download from http://updates.jenkins-ci.org/download/war/2.11/jenkins.war (redirected to: http://ftp-nyc.osuosl.org/pub/jenkins/war/2.11/jenkins.war)

      (....)

      Caused by: java.net.SocketTimeoutException: Read timed out

      -------

      The proxy configuration is fine because I am able to update plugins. I belive I have timeout only when updting jenkins.war because of the size of the file.

      I notice this error since Jenkins version 1.6

      -------

      Solution for the problem:

      I need a way to configure this timeout

        Attachments

          Activity

          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Maybe default Socket timeout on your system is not high enough. Could you provide the full stacktrace?

          Show
          oleg_nenashev Oleg Nenashev added a comment - Maybe default Socket timeout on your system is not high enough. Could you provide the full stacktrace?
          Hide
          dmpossa Daniel Possamai added a comment -

          Installing Plugins/Upgrades

          Preparation
          Checking internet connectivity
          Checking update center connectivity
          Success
          jenkins.war
          Failure -
          hudson.util.IOException2: Failed to download from http://updates.jenkins-ci.org/download/war/2.14/jenkins.war (redirected to: http://ftp-chi.osuosl.org/pub/jenkins/war/2.14/jenkins.war)
          at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1153)
          at hudson.model.UpdateCenter$DownloadJob._run(UpdateCenter.java:1650)
          at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1624)
          at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
          at java.util.concurrent.FutureTask.run(Unknown Source)
          at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110)
          at java.lang.Thread.run(Unknown Source)
          Caused by: java.net.SocketTimeoutException: Read timed out
          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$10.run(Unknown Source)
          at sun.net.www.protocol.http.HttpURLConnection$10.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.getInputStream0(Unknown Source)
          at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
          at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1105)
          ... 6 more
          Caused by: java.net.SocketTimeoutException: Read timed out
          at java.net.SocketInputStream.socketRead0(Native Method)
          at java.net.SocketInputStream.socketRead(Unknown Source)
          at java.net.SocketInputStream.read(Unknown Source)
          at java.net.SocketInputStream.read(Unknown Source)
          at java.io.BufferedInputStream.fill(Unknown Source)
          at java.io.BufferedInputStream.read1(Unknown Source)
          at java.io.BufferedInputStream.read(Unknown Source)
          at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
          at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
          at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(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.getHeaderFieldLong(Unknown Source)
          at java.net.URLConnection.getContentLengthLong(Unknown Source)
          at java.net.URLConnection.getContentLength(Unknown Source)
          at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1104)
          ... 6 more

          Show
          dmpossa Daniel Possamai added a comment - Installing Plugins/Upgrades Preparation Checking internet connectivity Checking update center connectivity Success jenkins.war Failure - hudson.util.IOException2: Failed to download from http://updates.jenkins-ci.org/download/war/2.14/jenkins.war (redirected to: http://ftp-chi.osuosl.org/pub/jenkins/war/2.14/jenkins.war ) at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1153) at hudson.model.UpdateCenter$DownloadJob._run(UpdateCenter.java:1650) at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1624) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110) at java.lang.Thread.run(Unknown Source) Caused by: java.net.SocketTimeoutException: Read timed out 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$10.run(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection$10.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.getInputStream0(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1105) ... 6 more Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.socketRead(Unknown Source) at java.net.SocketInputStream.read(Unknown Source) at java.net.SocketInputStream.read(Unknown Source) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read1(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source) at sun.net.www.http.HttpClient.parseHTTP(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(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.getHeaderFieldLong(Unknown Source) at java.net.URLConnection.getContentLengthLong(Unknown Source) at java.net.URLConnection.getContentLength(Unknown Source) at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1104) ... 6 more
          Hide
          kushal1989 Kushal Gangan added a comment -

          facing below issue, please suggest is this relevant to this JIRA:

          hudson.util.IOException2: Failed to download from http://updates.jenkins-ci.org/download/plugins/git-client/2.2.1/git-client.hpi (redirected to: http://ftp.tsukuba.wide.ad.jp/software/jenkins/plugins/git-client/2.2.1/git-client.hpi)
          at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1172)
          at hudson.model.UpdateCenter$DownloadJob._run(UpdateCenter.java:1678)
          at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1876)
          at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1652)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110)
          at java.lang.Thread.run(Thread.java:745)
          Caused by: java.net.SocketTimeoutException: Read timed out
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
          at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
          at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1926)

          Show
          kushal1989 Kushal Gangan added a comment - facing below issue, please suggest is this relevant to this JIRA: hudson.util.IOException2: Failed to download from http://updates.jenkins-ci.org/download/plugins/git-client/2.2.1/git-client.hpi (redirected to: http://ftp.tsukuba.wide.ad.jp/software/jenkins/plugins/git-client/2.2.1/git-client.hpi ) at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1172) at hudson.model.UpdateCenter$DownloadJob._run(UpdateCenter.java:1678) at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1876) at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1652) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110) at java.lang.Thread.run(Thread.java:745) Caused by: java.net.SocketTimeoutException: Read timed out at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1926)
          Hide
          dereckson Sébastien Santoro added a comment - - edited

          I can repro after un upgrade from Jenkins 2.35 to Jenkins 2.42.

          Can't update plugins either.

          java.net.SocketTimeoutException: connect timed out
          	at java.net.PlainSocketImpl.socketConnect(Native Method)
          	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
          	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
          	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
          	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
          	at java.net.Socket.connect(Socket.java:589)
          	at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
          
          Show
          dereckson Sébastien Santoro added a comment - - edited I can repro after un upgrade from Jenkins 2.35 to Jenkins 2.42. Can't update plugins either. java.net.SocketTimeoutException: connect timed out at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
          Hide
          ben3d Benjamin Hoffstadt added a comment -

          Hello all,

          We had have the same Issue today in Jenkins Version 2.121.1, I searched a workarround and uninstalled the Plugin but timeout still exist, even on a new installation.

          It would be nice, if you could give us a work arround to install the plugin, without an timeout issue.

          Our Jenkins is running in a Debian Server.

          Kind Regards
          Ben

          Show
          ben3d Benjamin Hoffstadt added a comment - Hello all, We had have the same Issue today in Jenkins Version 2.121.1, I searched a workarround and uninstalled the Plugin but timeout still exist, even on a new installation. It would be nice, if you could give us a work arround to install the plugin, without an timeout issue. Our Jenkins is running in a Debian Server. Kind Regards Ben
          Hide
          devel Marek Freemorgan added a comment -

          Hi, I'm joining Benjamin Hoffstadt question. 

          Show
          devel Marek Freemorgan added a comment - Hi, I'm joining Benjamin Hoffstadt question. 

            People

            • Assignee:
              Unassigned
              Reporter:
              dmpossa Daniel Possamai
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated: