Eclipse: MarketplaceDiscoveryStrategy failed with an error
Asked Answered
M

13

18

I've just installed Eclipse Helios version 3.6.1 on my Windows 7 64 bits machine. But, when I want to open Eclipse MarketPlace I get this error:

MarketplaceDiscoveryStrategy failed with an error.

Unable to read repository at 
http://marketplace.eclipse.org/api/p?product=org.eclipse.epp.package.jee.product&os=win32&runtime.version=3.6.0.v20100505&client=org.eclipse.epp.mpc.core&java.version=1.7.0_07&product.version=1.3.2.20110218-0812&ws=win32. 
Address family not supported by protocol family: connect

Any solution please?

Message answered 3/10, 2012 at 19:11 Comment(1)
I found a solution to this issue. Check this post for details: https://mcmap.net/q/673165/-eclipse-marketplacediscoverystrategy-failed-with-an-errorAventurine
C
30

You can solve u r problem like this, In Eclipse IDE go to Windows --> preference --> General --> Network Connection --> Select Active provider to Direct --> Apply --> Ok.

Cirilo answered 21/8, 2014 at 5:19 Comment(4)
Thank for the quick help.Phalanstery
Mine is already set to Direct and it used to work but now it isn't working.Dorman
Perfect solution.Appropriation
I am still getting the same error, after " Selecting option Active provider to Direct"Mccubbin
F
14

The only way I could fix this was by importing the certificate into "cacerts"

here are the steps to follow:

  • copy the link that eclipse is having problem to access, by using details button, then paste it to google chrome browser and press enter.

in my case link was: https://marketplace.eclipse.org/api/p?client=org.eclipse.epp.mpc.core&os=win32&platform.version=4.21

  • just beside the link in your browser there is Lock icon, hover over it, should show "view site information"

  • click on the lock icon -> click on "connection is secure" -> click on "certificate is valid" and a dialog called "certificate" should pop up.

  • go to the tab "details" and click on the button "copy to file..."

  • follow the export wizard steps to export certificate file (.CER) Export the file on format "DER encoded binary X.509 (.CER)"

  • save the file to desktop with name "marketplacecert.cer"

  • now copy this certificate file to the folder where the jre is located in your eclipse folder installation

    in my case: C:\eclipse-cpp-2021-09-R-win32-x86_64\eclipse\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_16.0.2.v20210721-1149\jre\lib\security

    in this folder you should find a file called "cacerts", where we gonna import the certificate through "keytool.exe"

  • now open CMD prompt and go to the folder: cd C:\eclipse-cpp-2021-09-R-win32-x86_64\eclipse\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_16.0.2.v20210721-1149\jre\lib\security

  • we gonna have to use a tool called "keytool.exe" to import the certificate file, which is located at: "C:\eclipse-cpp-2021-09-R-win32-x86_64\eclipse\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_16.0.2.v20210721-1149\jre\bin" two folders up from our current location, to execute it we gonna use the relative path ....\bin\keytool.exe

    run the following command on CMD prompt: ....\bin\keytool.exe -import -alias alias -keystore cacerts -file marketplacecert.cer

    keytool.exe will ask for a password, which is "changeit"

    keytool.exe will ask to trust the certificate, type "yes" and press enter.

    done. Now restart eclipse and marketplace should be working.

    Refer to this link for more details: https://thebasictechinfo.com/java-8/pkixunable-to-find-valid-certification-path-to-requested-target-fix/

Flyaway answered 26/10, 2021 at 1:0 Comment(2)
this is exactly the correct way to solve this problem (y)Llewellyn
software field is making "things very easy".🙂Roger
P
13

i had the same problem the sulotion was to copy my ...security/cacert from my JRE and then paste it in my eclipse .....\eclipse\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.1.v20201027-0507\jre\lib\security (replace cacert of the eclipse by cacert of JRE)

Phyle answered 12/3, 2021 at 15:28 Comment(4)
This worked, but I don't understand why Eclipse has it's own cacerts and not using the JDK/jre cacerts file?Pilchard
This worked. Thanks.Chiekochien
It didn't work for me with eclipse ide 2021-12Wavawave
JRE cacerts patha in macos: /Library/Java/JavaVirtualMachines/zulu-sa-1.8.0_232.jdk/Contents/Home/jre/lib/security Below is the eclipse cacerts path in mac: /Library/Java/JavaVirtualMachines/zulu-sa-1.8.0_232.jdk/Contents/Home/jre/lib/security/cacerts /Applications/Eclipse.app/Contents/Eclipse/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.macosx.x86_64_15.0.1.v20201027-0507/jre/lib/security/cacertsShrive
H
3

Verify you can reach that URL by command line or so.
If you are connected with VPN, disconnect VPN and try again. It works for me.

Heartrending answered 4/9, 2020 at 15:42 Comment(1)
Disabling my vpn helped me connect to the Market Place - THANKS :)Improvise
S
1

This is because your pc cann't connect to the http://marketplace.eclipse.org/api/p?product=org.eclipse.epp.package.jee.product&os=win32&runtime.version=3.6.0.v20100505&client=org.eclipse.epp.mpc.core&java.version=1.7.0_07&product.version=1.3.2.20110218-0812&ws=win32

You can set a network proxy on Windows--> Preferece --> Network connection.

Spokane answered 24/4, 2013 at 8:58 Comment(0)
N
1

I have the same problem and it occurs when you download Eclipse Standard 4.3.1 . You have to download Eclipse IDE for Java EE Developers.

Niche answered 2/10, 2013 at 13:56 Comment(0)
C
1

Uninstall current version of Java. Go to www.java.com, download recommended version of java. After successful install. Verify java installed (located on home page - www.java.com). Should work then... Mine did.

Coelom answered 24/1, 2017 at 18:39 Comment(0)
D
1

Add below args :

-Djava.net.preferIPv4Stack=true

to the end of the eclipse.ini file and it should work.

Deepsea answered 2/7, 2018 at 10:34 Comment(0)
B
1

if you are in an organisation try to ask your colleague developer that have an active marketplace for there casert.cer file and replace it in your jdk

Boswall answered 19/5, 2021 at 15:5 Comment(0)
N
1

Yes, I did face the same issue. Here is the fix

Problem:

eclipse.buildId=4.21.0.I20210906-0500
    java.version=16.0.2
    java.vendor=Oracle Corporation
    BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
    Command-line arguments: -os win32 -ws win32 -arch x86_64 -product 
    org.eclipse.epp.package.jee.product
    org.eclipse.epp.mpc.core
**Error**
Thu Sep 16 13:07:14 IST 2021
Cannot complete request to https://marketplace.eclipse.org/api/p?client=org.eclipse.epp.mpc.core&os=win32&platform.version=4.21: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
org.eclipse.core.runtime.CoreException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at org.eclipse.epp.internal.mpc.core.transport.httpclient.HttpClientTransport.stream(HttpClientTransport.java:117)

Solution:

In order to resolve this issue, I copied my security/cacert file from my JRE (java-se-8u41/jre/lib/security/cacert) to my eclipse (/eclipse/../jre/lib/security/cacert) e.g. /eclipse/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_16.0.2.v20210721-1149/jre/lib/security/cacert

Reference: For more detail and step by step guide along with screen-shots, you may refer the following url : https://thebasictechinfo.com/java-8/pkixunable-to-find-valid-certification-path-to-requested-target-fix/

Enjoy 🙂

Nawrocki answered 16/9, 2021 at 8:48 Comment(1)
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.Skees
W
0

To fix this, edit the config.ini file located in the Eclipse installation directory/configuration folder and modify the following line:

  • If "com.genuitec.pulse.delivery.mpc.include.patterns" exists, then modify it to:

    com.genuitec.pulse.delivery.mpc.include.patterns=^https://marketplace.eclipse.org.*

  • If it doesn't exist then simply add this line in the end of config.ini file: com.genuitec.pulse.delivery.mpc.include.patterns=^https://marketplace.eclipse.org.*

Weirick answered 16/11, 2022 at 6:44 Comment(0)
M
0

I tried updating the certs as others suggest, but they just become outdated and then the same problem repeats itself.

What you have to do on windows is to configure java to use the MS cert store, instead of javas.

So in the same directory as the eclipse.exe, find eclipse.ini. In it find the line:

-vmargs

and on the lines just after that, insert

-Djavax.net.ssl.trustStore=NUL
-Djavax.net.ssl.trustStoreType=Windows-ROOT

Save the file and then restart Eclipse.

Reference: SSL and cert keystore

Magnum answered 28/3 at 19:42 Comment(0)
N
-1

We just had the same problem and apparently the answer TODAY is just wait it out.. This is for anyone experiencing this problem in modern 2020.03 versions of Eclipse.. Its a problem from Eclipse's servers that are sometimes not reachable.. Just wait an hour or so and try again later.. It should work as long as it has worked before of course..

Neigh answered 16/6, 2020 at 12:6 Comment(1)
I can access from the browser, so the server is available.Wavawave

© 2022 - 2024 — McMap. All rights reserved.