eclipse mars/luna 无法读取存储库

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/32474927/
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-19 22:50:53  来源:igfitidea点击:

eclipse mars/luna unable to read repository

eclipserepository

提问by Florian

I can't use the default repositories with eclipse mars. For example the http://download.eclipse.org/eclipse/updates/4.5/. There is no problem with the proxy. I can reach http://download.eclipse.org/eclipse/updates/4.5/with the internal web browser of eclipse. The problem is that it always tries to connect to the url http://download.eclipse.org/eclipse/updates/4.5/compositeContent.xmlwhich does not exist (getting 404 opening it in the browser). I really don't know why.

我不能在 eclipse mars 中使用默认存储库。例如http://download.eclipse.org/eclipse/updates/4.5/。代理没有问题。我可以http://download.eclipse.org/eclipse/updates/4.5/使用 eclipse 的内部网络浏览器访问。问题是它总是尝试连接到http://download.eclipse.org/eclipse/updates/4.5/compositeContent.xml不存在的 url (在浏览器中打开它时出现 404)。我真的不知道为什么。

The error is:

错误是:

Unable to connect to repository http://download.eclipse.org/eclipse/updates/4.5/compositeContent.xml

Stacktrace:

堆栈跟踪:

java.net.ConnectException: Connection timed out: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:117)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:177)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:304)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
at org.eclipse.ecf.provider.filetransfer.httpclient4.HttpClientFileSystemBrowser.runRequest(HttpClientFileSystemBrowser.java:259)
at org.eclipse.ecf.provider.filetransfer.browse.AbstractFileSystemBrowser$DirectoryJob.run(AbstractFileSystemBrowser.java:69)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

EDIT: Tried out Eclipse Luna, same problem.

编辑:尝试了 Eclipse Luna,同样的问题。

回答by Dhruv Rai Puri

I think there is 'something' wrong with the repository where this update is located and nothing wrong with your network connection or proxy.

我认为此更新所在的存储库存在“问题”,并且您的网络连接或代理没有问题。

What is this 'something' - If you look at this link https://wiki.eclipse.org/Equinox/p2/p2_index('What happens if I get it Wrong' section) - It says that if the p2.index file has an incorrect entry specifying compositeContent.xml where the repository is a content.xml will cause p2 to only look for compositeContent.xml and never look for the content.xml.

这是什么“东西” - 如果你看这个链接https://wiki.eclipse.org/Equinox/p2/p2_index('如果我弄错了会发生什么'部分) - 它说如果 p2.index 文件有一个不正确的条目指定 CompositeContent.xml ,其中存储库是 content.xml 将导致 p2 只查找 CompositeContent.xml 而从不查找 content.xml

Maybethis is what is happening in your case and since eclipse is not getting the file it is throwing the error which you are seeing.

也许这就是您的情况,因为 eclipse 没有获取文件,所以它抛出了您看到的错误。

Way ahead will be to - contact the eclipse.org on their forum/JIRA to point it out and get the p2.index file corrected.

未来的道路将是 - 在他们的论坛/JIRA 上联系 eclipse.org 指出它并纠正 p2.index 文件。

回答by John Hammond

As the stack trace says, you don't connect. As you don't make a connection with a file, a missing file could not cause the problem. The Native proxy provider does not work for you.

正如堆栈跟踪所说,您没有连接。由于您没有与文件建立连接,因此丢失的文件不会导致问题。本机代理提供商对您不起作用。

I had to switch to Manual proxy configuration and delete the (empty) SOCKS entry from the proxy configuration in order to get Mars to properly connect through our firewall.

我不得不切换到手动代理配置并从代理配置中删除(空)SOCKS 条目,以便让 Mars 通过我们的防火墙正确连接。

回答by user1953523

Uncheck "Contact all update sites during install to find required software" and try again.

取消选中“在安装过程中联系所有更新站点以查找所需软件”并重试。

If that does not work, you could goto the following link download.eclipse.org/eclipse/updates/4.5/ and click "Show Directory Contents" and download each file using "Save link as" and add them manually to eclipse.

如果这不起作用,您可以转到以下链接 download.eclipse.org/eclipse/updates/4.5/ 并单击“显示目录内容”并使用“将链接另存为”下载每个文件并手动将它们添加到 eclipse。