java.io.IOException

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
tip

Check if you didn't set RequestProperty Content-Type to the wrong type or if you're trying to send the wrong file to the server.

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • {{FilePath.installIfNecessaryFrom}}, used from {{ZipExtractionInstaller}}, is designed to log a warning but continue in case the tool is already unpacked and the server returns an error while it is checking for a newer archive. Yet this stack trace suggests that this logic is not working, because the {{IOException}} comes after {{connect}} in {{getInputStream}}: {code:none} Unpacking <URL> to <TOOLPATH> on <SLAVE> ERROR: Failed to download <URL> from slave; will retry from master java.io.IOException: remote file operation failed: <TOOLPATH> at hudson.remoting.Channel@...:<SLAVE>: java.net.ConnectException: Connection timed out at hudson.FilePath.act(FilePath.java:976) at hudson.FilePath.act(FilePath.java:958) at hudson.FilePath.installIfNecessaryFrom(FilePath.java:797) at hudson.tools.ZipExtractionInstaller.performInstallation(ZipExtractionInstaller.java:79) at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:68) at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:107) at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:205) at hudson.model.JDK.forNode(JDK.java:130) at hudson.model.AbstractProject.getEnvironment(AbstractProject.java:350) at hudson.model.AbstractProject.pollWithWorkspace(AbstractProject.java:1444) at hudson.model.AbstractProject._poll(AbstractProject.java:1421) at hudson.model.AbstractProject.poll(AbstractProject.java:1332) at jenkins.triggers.SCMTriggerItem$SCMTriggerItems$Bridge.poll(SCMTriggerItem.java:119) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:515) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:544) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: java.net.ConnectException: Connection timed out at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:579) at java.net.Socket.connect(Socket.java:528) at sun.net.NetworkClient.doConnect(NetworkClient.java:180) at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) at sun.net.www.http.HttpClient.<init>(HttpClient.java:211) at sun.net.www.http.HttpClient.New(HttpClient.java:308) at sun.net.www.http.HttpClient.New(HttpClient.java:326) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:996) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:932) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:850) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1300) at java.net.URL.openStream(URL.java:1037) at hudson.FilePath$Unpack.invoke(FilePath.java:833) at hudson.FilePath$Unpack.invoke(FilePath.java:827) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2577) at hudson.remoting.UserRequest.perform(UserRequest.java:121) at hudson.remoting.UserRequest.perform(UserRequest.java:49) at hudson.remoting.Request$2.run(Request.java:324) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) at ......remote call to <SLAVE>(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1356) at hudson.remoting.UserResponse.retrieve(UserRequest.java:221) at hudson.remoting.Channel.call(Channel.java:752) at hudson.FilePath.act(FilePath.java:969) ... 20 more FATAL: Failed to install <URL> to <TOOLPATH> java.io.IOException: Failed to install <URL> to <TOOLPATH> at hudson.FilePath.installIfNecessaryFrom(FilePath.java:822) at hudson.tools.ZipExtractionInstaller.performInstallation(ZipExtractionInstaller.java:79) at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:68) at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:107) at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:205) at hudson.model.JDK.forNode(JDK.java:130) at hudson.model.AbstractProject.getEnvironment(AbstractProject.java:350) at hudson.model.AbstractProject.pollWithWorkspace(AbstractProject.java:1444) at hudson.model.AbstractProject._poll(AbstractProject.java:1421) at hudson.model.AbstractProject.poll(AbstractProject.java:1332) at jenkins.triggers.SCMTriggerItem$SCMTriggerItems$Bridge.poll(SCMTriggerItem.java:119) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:515) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:544) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: java.io.IOException: Server returned HTTP response code: 504 for URL: <URL> at sun.reflect.GeneratedConstructorAccessor691.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1675) at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1673) at java.security.AccessController.doPrivileged(Native Method) at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1671) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1244) at org.jvnet.robust_http_client.RetryableHttpStream.getStream(RetryableHttpStream.java:98) at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:91) at hudson.ProxyConfiguration.getInputStream(ProxyConfiguration.java:248) at hudson.FilePath.installIfNecessaryFrom(FilePath.java:808) ... 18 more Caused by: java.io.IOException: Server returned HTTP response code: 504 for URL: <URL> at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1626) at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2678) at java.net.URLConnection.getHeaderFieldLong(URLConnection.java:639) at java.net.URLConnection.getContentLengthLong(URLConnection.java:511) at java.net.URLConnection.getContentLength(URLConnection.java:495) at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:90) ... 20 more {code}
    via by Jesse Glick,
  • {{FilePath.installIfNecessaryFrom}}, used from {{ZipExtractionInstaller}}, is designed to log a warning but continue in case the tool is already unpacked and the server returns an error while it is checking for a newer archive. Yet this stack trace suggests that this logic is not working, because the {{IOException}} comes after {{connect}} in {{getInputStream}}: {code:none} Unpacking <URL> to <TOOLPATH> on <SLAVE> ERROR: Failed to download <URL> from slave; will retry from master java.io.IOException: remote file operation failed: <TOOLPATH> at hudson.remoting.Channel@...:<SLAVE>: java.net.ConnectException: Connection timed out at hudson.FilePath.act(FilePath.java:976) at hudson.FilePath.act(FilePath.java:958) at hudson.FilePath.installIfNecessaryFrom(FilePath.java:797) at hudson.tools.ZipExtractionInstaller.performInstallation(ZipExtractionInstaller.java:79) at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:68) at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:107) at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:205) at hudson.model.JDK.forNode(JDK.java:130) at hudson.model.AbstractProject.getEnvironment(AbstractProject.java:350) at hudson.model.AbstractProject.pollWithWorkspace(AbstractProject.java:1444) at hudson.model.AbstractProject._poll(AbstractProject.java:1421) at hudson.model.AbstractProject.poll(AbstractProject.java:1332) at jenkins.triggers.SCMTriggerItem$SCMTriggerItems$Bridge.poll(SCMTriggerItem.java:119) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:515) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:544) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: java.net.ConnectException: Connection timed out at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:579) at java.net.Socket.connect(Socket.java:528) at sun.net.NetworkClient.doConnect(NetworkClient.java:180) at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) at sun.net.www.http.HttpClient.<init>(HttpClient.java:211) at sun.net.www.http.HttpClient.New(HttpClient.java:308) at sun.net.www.http.HttpClient.New(HttpClient.java:326) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:996) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:932) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:850) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1300) at java.net.URL.openStream(URL.java:1037) at hudson.FilePath$Unpack.invoke(FilePath.java:833) at hudson.FilePath$Unpack.invoke(FilePath.java:827) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2577) at hudson.remoting.UserRequest.perform(UserRequest.java:121) at hudson.remoting.UserRequest.perform(UserRequest.java:49) at hudson.remoting.Request$2.run(Request.java:324) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) at ......remote call to <SLAVE>(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1356) at hudson.remoting.UserResponse.retrieve(UserRequest.java:221) at hudson.remoting.Channel.call(Channel.java:752) at hudson.FilePath.act(FilePath.java:969) ... 20 more FATAL: Failed to install <URL> to <TOOLPATH> java.io.IOException: Failed to install <URL> to <TOOLPATH> at hudson.FilePath.installIfNecessaryFrom(FilePath.java:822) at hudson.tools.ZipExtractionInstaller.performInstallation(ZipExtractionInstaller.java:79) at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:68) at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:107) at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:205) at hudson.model.JDK.forNode(JDK.java:130) at hudson.model.AbstractProject.getEnvironment(AbstractProject.java:350) at hudson.model.AbstractProject.pollWithWorkspace(AbstractProject.java:1444) at hudson.model.AbstractProject._poll(AbstractProject.java:1421) at hudson.model.AbstractProject.poll(AbstractProject.java:1332) at jenkins.triggers.SCMTriggerItem$SCMTriggerItems$Bridge.poll(SCMTriggerItem.java:119) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:515) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:544) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: java.io.IOException: Server returned HTTP response code: 504 for URL: <URL> at sun.reflect.GeneratedConstructorAccessor691.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1675) at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1673) at java.security.AccessController.doPrivileged(Native Method) at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1671) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1244) at org.jvnet.robust_http_client.RetryableHttpStream.getStream(RetryableHttpStream.java:98) at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:91) at hudson.ProxyConfiguration.getInputStream(ProxyConfiguration.java:248) at hudson.FilePath.installIfNecessaryFrom(FilePath.java:808) ... 18 more Caused by: java.io.IOException: Server returned HTTP response code: 504 for URL: <URL> at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1626) at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2678) at java.net.URLConnection.getHeaderFieldLong(URLConnection.java:639) at java.net.URLConnection.getContentLengthLong(URLConnection.java:511) at java.net.URLConnection.getContentLength(URLConnection.java:495) at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:90) ... 20 more {code}
    via by Jesse Glick,
  • Can't download Subversion plugin 2.4
    via by David Aldrich,
  • Tomcat 5.0.16 "DeployTask" on NT4.0 behind proxy
    via by Unknown author,
  • Plugins fail with following error: hudson.util.IOException2: Failed to download from http://updates.jenkins-ci.org/download/plugins/durable-task/1.3/durable-task.hpi at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:796) at hudson.model.UpdateCenter$DownloadJob._run(UpdateCenter.java:1143) at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1303) at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1121) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:104) at java.lang.Thread.run(Thread.java:662) Caused by: java.io.IOException: Server returned HTTP response code: 500 for URL: http://updates.jenkins-ci.org/download/plugins/durable-task/1.3/durable-task.hpi 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:1514) at java.security.AccessController.doPrivileged(Native Method) at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1508) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1162) at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:756) ... 8 more Caused by: java.io.IOException: Server returned HTTP response code: 500 for URL: http://updates.jenkins-ci.org/download/plugins/durable-task/1.3/durable-task.hpi at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1459) at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2340) at java.net.URLConnection.getHeaderFieldInt(URLConnection.java:579) at java.net.URLConnection.getContentLength(URLConnection.java:474) at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:755) This occurs for all plugins. Jenkins is behind proxy server. Updates can be downloaded with curl/wget. Similar to follow issues, which none have had fixes: https://issues.jenkins-ci.org/browse/JENKINS-9999 https://issues.jenkins-ci.org/browse/JENKINS-10619 https://issues.jenkins-ci.org/browse/JENKINS-7736
    via by Colin D,
  • Modularization of .dtd is broken
    via by Unknown author,
    • java.io.IOException: Failed to install <URL> to <TOOLPATH> at hudson.FilePath.installIfNecessaryFrom(FilePath.java:822) at hudson.tools.ZipExtractionInstaller.performInstallation(ZipExtractionInstaller.java:79) at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:68) at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:107) at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:205) at hudson.model.JDK.forNode(JDK.java:130) at hudson.model.AbstractProject.getEnvironment(AbstractProject.java:350) at hudson.model.AbstractProject.pollWithWorkspace(AbstractProject.java:1444) at hudson.model.AbstractProject._poll(AbstractProject.java:1421) at hudson.model.AbstractProject.poll(AbstractProject.java:1332) at jenkins.triggers.SCMTriggerItem$SCMTriggerItems$Bridge.poll(SCMTriggerItem.java:119) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:515) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:544) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: java.io.IOException: Server returned HTTP response code: 504 for URL: <URL> at sun.reflect.GeneratedConstructorAccessor691.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1675) at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1673) at java.security.AccessController.doPrivileged(Native Method) at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1671) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1244) at org.jvnet.robust_http_client.RetryableHttpStream.getStream(RetryableHttpStream.java:98) at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:91) at hudson.ProxyConfiguration.getInputStream(ProxyConfiguration.java:248) at hudson.FilePath.installIfNecessaryFrom(FilePath.java:808) ... 18 more Caused by: java.io.IOException: Server returned HTTP response code: 504 for URL: <URL> at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1626) at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2678) at java.net.URLConnection.getHeaderFieldLong(URLConnection.java:639) at java.net.URLConnection.getContentLengthLong(URLConnection.java:511) at java.net.URLConnection.getContentLength(URLConnection.java:495) at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:90) ... 20 more

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    rprp
    1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    jedcuajedcua
    2 times, last one,
    45 more bugmates