简体   繁体   中英

Eclipse Frustration

I've been trying forever to get Eclipse to work and for some reason I am unable to install plugins, updates, or even access the marketplace. After conducting some research, I discovered that in most cases it is a proxy issue but I'm on a private home network. Can anyone help me? I've been at it for days.

This is the error I get:

Cannot open Eclipse Marketplace
Cannot install remote marketplace locations: Connection failed

This is most often caused by a problem with your internet connection. Please check your internet connection and retry.
Cannot complete request to http://marketplace.eclipse.org/catalogs/api/p: Unable to read repository at http://marketplace.eclipse.org/catalogs/api/p.
Unable to read repository at http://marketplace.eclipse.org/catalogs/api/p.
Permission denied: connect
Connection failed

This is most often caused by a problem with your internet connection. Please check your internet connection and retry.
Permission denied: connect

This sounds like a general OS/Java Networking problem I have seen before on Windows. It is for example caused by Cisco AnyConnect VPN software, but it can be other malware scanner or personal firewealls as well I guess.

It is related to IPv6 (dual stack) support in Java 7. The quickest solution (if you dont need IPv6) would be to turn the IPv6 support off, by appending this to vmargs argument of the eclipse.ini file:

-vmargs
-Xmx512m
...
-Djava.net.preferIPv4Stack=true

(end restart Eclipse).

You're quite right. This can be a very frustrating experience.

There are a number of things to consider. Depending on your platform. I've given up on Windoze eons ago so my 2cts might not applicable for you. It's more for users in some cases. 用户。 So here it goes.

  1. The proxy settings in n Windows => preferences => General => Network Connections.
    Pitfall: if you have already set your global proxy settings either though Gnome network manager or through java properties in the eclipse.ini or though environment variables, eclipse will 'sense' the settings and use a 'Native' configuration. Try to switch to mode. 模式。 Some plugins like it better.
    Pitfall: This is not necessarily used by all plugins.
    • IIRC, The XML validation plugin prefers 'manual' in some versions of eclipse
    • In true subversion philosophy, subclipse uses its own file (eg $HOME/.subversion/server)
    • A Maven installation will use the global settings.xml or the user settings xml (depending upon your maven upgrade policy, use one or the other). I'm assuming an external maven installation here.

2 - As I already hinted you can also set:
- -Dhttp.proxyPort=
- -Dhttp.proxyHost=
- -Dnetwork.proxy_host=
- -Dnetwork.proxy_port=

3 - For Linux, you can set environment variables
- http_proxy
- https_proxy
They will also result in 'Native' config for eclipse.

More pitfalls

Finally, just to make it more fun, there are situations when the entries in your (see the network preferences for well known DTDs or XSDs) are corrupt because they store 40x HTML responses and it often takes some time to realize. 的条目(请参阅众所周知的DTD或XSD的网络首选项)已损坏,因为它们存储了40x HTML响应,并且通常需要一些时间才能实现。 In the past when my company (a top dog in the network suppliers domain !!!) was enforcing a corporate proxy I ended up copying the cached files and catalogue from one eclipse instance to the next...
You can also use the DTD/XSD catalogue. You know you run into this kind of pb because developing in the office is a PiA (each time you save file, the XML validator kicks in and you have to wait for the timeout) and developing at home is a breeze.

An even older story: in another top level company, they thought that we were using internet too much and only the proxy could resolve DNS. Of course no eclipse site update was accessible. I ended up writing a DNS that would use the corporate DNS for local names and a web service client that would interrogate other internet DNS exposing a web service interface... But that was more than 10 years ago. Yous situation is probably not that bad.

This problem was solved by setting Active Provider "Native". Probably corporate firewall creating problem.Enter your company proxy with port like this. 在此输入图像描述

Do you have any firewall setting which could be blocking the connection? Checking antivirus/firewall settings for Program permissions could help.

For what's worth, I just had the same error on Neon. The typical solutions (proxy settings) did not apply.

However, just by trial and error this is my solution: which I just tried a few minutes ago. I did an update.

That's all. Whatever got updated included the means for Neon to reach to the marketplace end point. It is working now.

This is what I would suggest first to anyone who runs into this. Might not work in all cases, but it certainly worked for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM