如何更改 Eclipse 更新管理器的“读取超时”值?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1489149/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 18:57:12  来源:igfitidea点击:

How to change value of 'Read timeout' of Eclipse's Update Manager?

eclipsepluginsequinox

提问by Alex Siman

How to change value of 'Read timeout' of Eclipse's Update Manager?

如何更改 Eclipse 更新管理器的“读取超时”值?

I have slow internet connection and I cannot install any plugin, because Eclipse's Update manager throws me exception:

我的互联网连接速度很慢,我无法安装任何插件,因为 Eclipse 的更新管理器向我抛出异常:

Transfer Exception

java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(Unknown Source)
at java.io.BufferedInputStream.read1(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at org.apache.commons.httpclient.ContentLengthInputStream.read(ContentLengthInputStream.java:170)
at java.io.FilterInputStream.read(Unknown Source)
at org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:108)
at java.io.FilterInputStream.read(Unknown Source)
at org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:127)
at org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer.performFileTransfer(AbstractRetrieveFileTransfer.java:140)
at org.eclipse.ecf.filetransfer.FileTransferJob.run(FileTransferJob.java:73)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) 

回答by scottyab

As Frank mentioned you can set the timeout options in the eclipse.ini, here's the documentation.

正如 Frank 提到的,您可以在 eclipse.ini 中设置超时选项,这是文档

"use -DpropName=propValue as a VM argument to the Java VM, set the desired property in the config.ini file in the appropriate configuration area"

“使用 -DpropName=propValue 作为 Java VM 的 VM 参数,在相应配置区域的 config.ini 文件中设置所需的属性”

I set the following to get round my timeout issue:

我设置了以下内容来解决我的超时问题:

-Dorg.eclipse.ecf.provider.filetransfer.retrieve.closeTimeout=3000
-Dorg.eclipse.ecf.provider.filetransfer.retrieve.readTimeout=3000

回答by Frank

I got the error a lot with version 3.6, but adding the following line to the eclipse.ini helped me a lot:

我在 3.6 版中遇到了很多错误,但是在 eclipse.ini 中添加以下行对我有很大帮助:

-Dsun.net.client.defaultReadTimeout=30000

Add it right after the line with -vmargs

在带有 -vmargs 的行之后添加它

回答by Ben S

The easiest way to get around this would be to download the .jarfile of the plug-in you're trying to install and perform an offline installation.

解决此问题的最简单方法是下载.jar您尝试安装的插件文件并执行离线安装。

Edit:I tried to find a link to a how-to, but eclipse.orgkept timing out on me.

编辑:我试图找到指向操作方法的链接,但eclipse.org一直超时。

回答by Ben S

I believe that you were getting these timeout problems during the rollout of 3.5.1. Eclipse.org had several server and mirroring issues during this time, and this caused manhy people to experience timeouts when trying to update.

我相信您在 3.5.1 推出期间遇到了这些超时问题。在此期间 Eclipse.org 有几个服务器和镜像问题,这导致许多人在尝试更新时遇到超时。

In the future, when you see problems like this, you can try installing from a specific mirror. I find that installing from here tends to work well even when Eclipse.org is not:

以后遇到这样的问题,可以尝试从特定的镜像安装。我发现即使 Eclipse.org 不是,从这里安装也能很好地工作:

http://eclipse.unixheads.org/

http://eclipse.unixheads.org/

回答by Alim ?zdemir

The timeout is not the cause, it's just the symptom, there might be "zombie" entries in the update sites.

超时不是原因,只是症状,更新站点中可能存在“僵尸”条目。

Like:

喜欢:

update sites with zombie entries

使用僵尸条目更新站点

After removing those with empty "name" column it should work (faster).

删除那些带有空“名称”列的内容后,它应该可以工作(更快)。