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

半世苍凉 提交于 2019-12-09 05:25:53

问题


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

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

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$1.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) 

回答1:


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

"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"

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



回答2:


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

-Dsun.net.client.defaultReadTimeout=30000

Add it right after the line with -vmargs




回答3:


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

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




回答4:


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.

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:

http://eclipse.unixheads.org/




回答5:


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

Like:

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



来源:https://stackoverflow.com/questions/1489149/how-to-change-value-of-read-timeout-of-eclipses-update-manager

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!