Rubicon
Rubicon

Reputation: 31

Eclipse. MarketplaceDiscoveryStrategy failed with an error

enter image description here

PFA. Unable to open eclipse market place with error:

MarketplaceDiscoveryStrategy failed with an error
Cannot complete request to https://marketplace.eclipse.org/api/p?client=org.eclipse.epp.mpc.core&os=win32&platform.version=4.19: 
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

How to resolve it?

Upvotes: 3

Views: 7537

Answers (3)

Supercoder
Supercoder

Reputation: 1204

I had the same error when accessing the Eclipse Marketplace, I just had to install the certificate on my Local Machine according to the Eclipse Marketplace (Path) where the Eclipse had Failed then MAKE SURE TO REBOOT YOUR PC ONCE IT IS INSTALLED.

Following are the steps to perform this task: I find it easier to use the browser "Edge" as an example to get the certificate from the url had failed.

  1. Open Edge with the url that had failed on: https://marketplace.eclipse.org/api/p?client=org.eclipse.epp.mpc.core&os=win32&platform.version=4.19
  2. Click on the Lock Icon URL then click on the Connection is Secure
  3. From the Connection is Secure link then click on the Certificate Icon as per below: Certificate from the browser
  4. From the Certificate Viewer window, click on the Details TAB then Export the _.eclipse.org.crt into your PC or Desktop then right click on the .crt file to install it. Install the Certificate
  5. From the Certificate Import Wizard, select the Store Location to "Local Machine" then click Next
  6. Leave as Default "Automatically select the certificate store based on the type of certificate" then click Next
  7. Click Finish.
  8. Make sure to Reboot your PC then Launch Eclipse (Go to Help > Eclipse Marketplace, no error should appear now)

Upvotes: 1

tarekahf
tarekahf

Reputation: 1002

In my case, I could not open Eclipse Marketplace and got the same error reported in the question of this thread. I was able to solve this problem by getting instructions from the admin since I am connected using VPN. If I disconnect the VPN, it will work without any problem. I am using Eclipse Version: 2022-09 (4.25.0) - Build id: 20220908-1902.

Steps (Windows):

  1. Get the certificate definition files and store them under this folder for example: <user-home>\.certificate\my-certs.pem. If you have more than one certificate, combine the definitions in this file my-cert.pem. In my case I was provided two certificates, they are XXXROOTCA and XXXCERTnn.
  2. If you have more than one certificate, store each in a separate file in the same folder for example file1.crt and file2.crt.
  3. From the command line with admin rights, use the Java keytool to import the certificates:
%JAVA_HOME%\bin\keytool -import -alias XXXROOTCA -file %HOME%\.certificates\file1.crt -cacerts
%JAVA_HOME%\bin\keytool -import -alias XXXCERTnn -file %HOME%\.certificates\file2.crt -cacerts

Note: Make sure to associate the certificate alias with the correct file in the above command lines. 3. You may have to pass the password for the above command lines. Add the parameter -storepass changeit if the password is still changeit and you didn't change it which is the default.

  1. For NodeJS, execute the following command (if required):
setx NODE_EXTRA_CA_CERTS %HOME%\.certificates\my-certs.pem

Now you should be able to open Eclipse Marketplace.

Upvotes: 0

Rubicon
Rubicon

Reputation: 31

I was using the client machine and this error is resolved once I added the windows->preference->N/w connection in General settings--> Made the provider manual and edited http and https with the client added authentication and it worked.

Upvotes: 0

Related Questions