我正在尝试从 Ubuntu 12.10 (amd/x64) 上的 Eclipse Juno (4.2) 获取更新并安装新插件。
我已经尝试了这个论坛上针对以前版本发布的每个解决方案(更改代理设置、更改 Java/jdk 设置、安装 gtk、在 /etc/eclipse.ini 中添加“-Djava.net.preferIPv4Stack=true”... 等等)。
我总是得到以下信息:
'eclipse.buildId=M20120914-1800
java.version=1.7.0_15
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments: -os linux -ws gtk -arch x86_64
Error
Fri Feb 22 15:15:07 BRT 2013
Communication with repository at http://download.eclipse.org/releases/juno failed.
java.net.SocketTimeoutException: Connect timed out
at java.net.SocksSocketImpl.readSocksReply(SocksSocketImpl.java:126)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:459)
at java.net.Socket.connect(Socket.java:579)
at org.eclipse.ecf.provider.filetransfer.events.socket.SocketEventCreateUtil.createSocket(SocketEventCreateUtil.java:43)
at org.eclipse.ecf.internal.provider.filetransfer.httpclient.ECFHttpClientProtocolSocketFactory.createSocket(ECFHttpClientProtocolSocketFactory.java:81)
at org.eclipse.ecf.internal.provider.filetransfer.httpclient.ECFHttpClientProtocolSocketFactory.createSocket(ECFHttpClientProtocolSocketFactory.java:73)
at org.eclipse.ecf.internal.provider.filetransfer.httpclient.ECFHttpClientProtocolSocketFactory.createSocket(ECFHttpClientProtocolSocketFactory.java:65)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
at org.eclipse.ecf.provider.filetransfer.httpclient.HttpClientFileSystemBrowser.runRequest(HttpClientFileSystemBrowser.java:232)
at org.eclipse.ecf.provider.filetransfer.browse.AbstractFileSystemBrowser$DirectoryJob.run(AbstractFileSystemBrowser.java:69)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
答案1
嗯,这个问题的答案相当令人惊讶,我无法解释为什么下面的解决方案有效,但事实上它确实有效!
您不需要在配置文件中执行任何操作,也不需要为 eclipse 命令添加任何命令行参数(启动 eclipse 时)。
需要做的就是:将代理设置为手动模式,并为代理仅设置 HTTP 和 HTTPS 值。确保将 SOCKS 代理保留为空。
这帮我解决了这个问题!