Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse Indigo "unable to connect to repository"

I'm trying to add this repository to Eclipse (Indigo):-

http://download.eclipse.org/releases/indigo

Seems okay when checked in a browser, but I keep getting "unable to connect" in Eclipse, and when I check the URL Eclipse is apparently looking for:-

http://download.eclipse.org/releases/indigo/content.xml

in a browser, I get a "404 not found". The locations for previous releases (e.g. galileo) don't seem to be there either. Have they moved? Am I misunderstanding something?

I tried some of the suggestions in this previous thread:-

Eclipse updates not working

But they don't seem to work (and I'm not using a proxy anyway).

  • Hemdoar
like image 426
hemdoar Avatar asked Sep 13 '11 23:09

hemdoar


4 Answers

This worked for me:

Open terminal. Navigate to Eclipse folder.

sudo nano eclipse.ini

at the bottom, add this line in:

-Djava.net.preferIPv4Stack = true

Then ctrl+O to save, ctrl+X to close (it says at bottom). IPv4/IPv6 problems? Solved. Then delete the cache VonC said to:

<eclipse>/p2/org.eclipse.equinox.p2.repository/cache

(This can be done using "sudo rmdir /p2/org.eclipse.equinox.p2.repository/cache" or by typing "sudo nautilus" into terminal, to open a root-priveleged filesystem browser, than navigating to, selecting the folder, and pressing the delete key). Then restart eclipse, goto Help>install new software>available software sites

Make sure the repos you want (such as "http://download.eclipse.org/egit/updates/") has a "/" right at the end. If it doesn't, delete that entry, and create a new, identical one which does, because Eclipse won't just let you edit it and click ok. Then click ok, and from the combo box choose e.g. the egit link, and lo, it will find it.

Still not working? Window>show view>internal web browser; check it can access internet. Hope that helps!

Credit to: http://drfits.com/2011/11/13/eclipse-contacting-software-sites-has-encountered-a-problem/ VonC Sep 14 '11 at 6:03

like image 51
xxjjnn Avatar answered Sep 18 '22 01:09

xxjjnn


I used VonC's answer to good effect. I also uninstalled a program called webroot. I think this had something to do with it because other programs were also having network problems.

like image 35
rockbrain Avatar answered Sep 22 '22 01:09

rockbrain


This is because windows IPV6 issue. Try adding the following VM option in the eclipse.ini

-Djava.net.preferIPv4Stack=true
like image 39
Sanjaya Athukorala Avatar answered Sep 21 '22 01:09

Sanjaya Athukorala


Can you connect to internet at all through Eclipse?

Open the internal webbrowser. In Eclipse: Window -> show view -> Other -> General: Internal web browser. Look up any normal adress, is it working? Can you connect to another update site? Try for example Eclipse Emma: http://update.eclemma.org/ Do you see anything there?

What are your proxy preferences? Go to Window -> preferences -> General: Network connections.

The active provider:

Specifies the settings profile to be used when opening connections. Choosing the Direct provider causes all the connections to be opened without the use of a proxy server. Selecting Manual causes settings defined in Eclipse to be used. On some platforms there is also a Native provider available, selecting this one causes settings that were discovered in the OS to be used.

If internet is working fine outside of Eclipse, try changing to Native. After that, try Direct.

I have encountered problems where an update site would not load, then I had to remove it and add it again. This forces Eclipse to reread the contents of the site even if it has a cached copy. So, if you still get no connection to the indigo update site, but everything else is working, try that. Go to Window -> Preferences -> Install/update: Available Software sites. Then remove and add the indigo site. Just remember to copy the adress so you can add it again.

As suggested in a comment below by @lostiniceland, this is a simpler way to achieve the above:

Goto Preferences -> Install Update -> Available Software Sites => select the entry and click the "Reload" button to the right. This is sometimes also helpful when you have a local updatesite for testing custom plugins

like image 35
Asteriskiiii Avatar answered Sep 22 '22 01:09

Asteriskiiii