eclipse 在eclipse Neon上安装aws toolkit时如何解决连接问题?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/40371726/
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
How to solve the connection when install aws toolkit on eclipse Neon?
提问by user2613603
I am in a company, and need set proxy to connect to the Internet. The proxy setting is ok, because I can connect to other website, e.g. Neon - http://download.eclipse.org/releases/neon, but not for http://aws.amazon.com/eclipse.
我在一家公司,需要设置代理才能上网。代理设置没问题,因为我可以连接到其他网站,例如 Neon - http://download.eclipse.org/releases/neon,但不能连接到http://aws.amazon.com/eclipse。
The error message is:
错误信息是:
Unable to read repository at https://aws.amazon.com/eclipse/content.xml. Unable to read repository at https://aws.amazon.com/eclipse/content.xml. sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target.
无法在https://aws.amazon.com/eclipse/content.xml读取存储库 。无法在https://aws.amazon.com/eclipse/content.xml读取存储库。sun.security.validator.ValidatorException:PKIX 路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到请求目标的有效认证路径。
The specific stack is:
具体堆栈为:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.ssl.Alerts.getSSLException(Unknown Source) at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source) at sun.security.ssl.Handshaker.fatalSE(Unknown Source) at sun.security.ssl.Handshaker.fatalSE(Unknown Source) at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source) at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source) at sun.security.ssl.Handshaker.processLoop(Unknown Source) at sun.security.ssl.Handshaker.process_record(Unknown Source) at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) at org.apache.http.conn.ssl.SSLSocketFactory.createLayeredSocket(SSLSocketFactory.java:554) at org.apache.http.conn.ssl.SSLSocketFactory.createLayeredSocket(SSLSocketFactory.java:435) at org.apache.http.impl.conn.DefaultClientConnectionOperator.updateSecureConnection(DefaultClientConnectionOperator.java:216) at org.apache.http.impl.conn.ManagedClientConnectionImpl.layerProtocol(ManagedClientConnectionImpl.java:394) at org.apache.http.impl.client.DefaultRequestDirector.establishRoute(DefaultRequestDirector.java:814) at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:615) 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:263) at org.eclipse.ecf.provider.filetransfer.browse.AbstractFileSystemBrowser$DirectoryJob.run(AbstractFileSystemBrowser.java:69) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.validator.PKIXValidator.doBuild(Unknown Source) at sun.security.validator.PKIXValidator.engineValidate(Unknown Source) at sun.security.validator.Validator.validate(Unknown Source) at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source) at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source) at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source) ... 20 more Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.provider.certpath.SunCertPathBuilder.build(Unknown Source) at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source) at java.security.cert.CertPathBuilder.build(Unknown Source) ... 26 more
javax.net.ssl.SSLHandshakeException:sun.security.validator.ValidatorException:PKIX 路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法在 sun.security.ssl.Alerts.getSSLException 处找到请求目标的有效认证路径(来源不明)在 sun.security.ssl.SSLSocketImpl.fatal(来源不明)在 sun.security.ssl.Handshaker.fatalSE(来源不明)在 sun.security.ssl.Handshaker.fatalSE(来源不明)在 sun.security .ssl.ClientHandshaker.serverCertificate(Unknown Source) at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source) at sun.security.ssl.Handshaker.processLoop(Unknown Source) at sun.security.ssl.Handshaker.process_record(Unknown)来源)在 sun.security.ssl.SSLSocketImpl。readRecord(Unknown Source) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) at org. apache.http.conn.ssl.SSLSocketFactory.createLayeredSocket(SSLSocketFactory.java:554) 在 org.apache.http.conn.ssl.SSLSocketFactory.createLayeredSocket(SSLSocketFactory.java:435) 在 org.apache.http.impl.conn。 DefaultClientConnectionOperator.updateSecureConnection(DefaultClientConnectionOperator.java:216) at org.apache.http.impl.conn.ManagedClientConnectionImpl.layerProtocol(ManagedClientConnectionImpl.java:394) at org.apache.http.impl.client.DefaultRequestDirector.establishRoute(DefaultRequestDirector.java: 814) 在 org.apache.http.impl.client。DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:615) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446) at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java: 863) 在 org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) 在 org.eclipse.ecf.provider.filetransfer.httpclient4.HttpClientFileSystemBrowser.runRequest(HttpClientFileSystemBrowser.java:263) 在 org.eclipse .ecf.provider.filetransfer.browse.AbstractFileSystemBrowser$DirectoryJob.run(AbstractFileSystemBrowser.java:69) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) 引起:sun.security.validator .ValidatorException:PKIX 路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法在 sun.security.validator.PKIXValidator.doBuild(Unknown Source) at sun.security.validator.PKIXValidator.engineValidate(Unknown Source) at sun.security.validator.Validator.validate(Unknown Source) 找到请求目标的有效认证路径) 在 sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source) at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source) at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source) ... 20 多个: sun.security.provider.certpath.SunCertPathBuilderException: 无法在 sun.security.provider.certpath.SunCertPathBuilder 的 sun.security.provider.certpath.SunCertPathBuilder.build(Unknown Source) 上找到请求目标的有效认证路径。engineBuild(Unknown Source) at java.security.cert.CertPathBuilder.build(Unknown Source) ... 26 更多
采纳答案by positivecrux
This is because java is not recognizing root certificate authority (CA) SSL certificate of https://aws.amazon.com.
这是因为 java 无法识别https://aws.amazon.com 的根证书颁发机构 (CA) SSL 证书。
Solution is to add that certificate to java cacerts file so that it got permanently accepted.
解决方案是将该证书添加到 java cacerts 文件中,以便它被永久接受。
Step 1 : Get root certificate of https://aws.amazon.com
第 1 步:获取https://aws.amazon.com 的根证书
CHROME BROWSER
铬浏览器
- Open https://aws.amazon.com
- Select Inspect from context menu(right clicking on page) and navigate to security tab
- Click on view certificates
- Click on top most certificate on hierarchy and confirm it is tailed with Root CA phrase.
- drag and drop that image which you saw written certificate on desktop.
- 打开https://aws.amazon.com
- 从上下文菜单中选择检查(右键单击页面)并导航到安全选项卡
- 点击查看证书
- 单击层次结构中最上面的证书,并确认它带有根 CA 短语。
- 拖放您在桌面上看到书面证书的图像。
FIREFOX BROWSER
火狐浏览器
- Open https://aws.amazon.com
- click on the green lock button "show certificate"
- tab "details", "export"
- 打开https://aws.amazon.com
- 单击绿色锁定按钮“显示证书”
- 选项卡“详细信息”,“导出”
Thats it! you got your root certificate!
就是这样!您已获得根证书!
Step 2 : Get that certificate added to java cacerts file.
第 2 步:将该证书添加到 java cacerts 文件中。
- use keytool.exe inside your jre bin folder.
- fire following command to place your certificate inside cacerts file
- 在 jre bin 文件夹中使用 keytool.exe。
- 触发以下命令将您的证书放入 cacerts 文件中
keytool –import –noprompt –trustcacerts –alias ALIASNAME -file /PATH/TO/YOUR/DESKTOP/CertificateName.cer -keystore /PATH/TO/YOUR/JDK/jre/lib/security/cacerts -storepass changeit
keytool –import –noprompt –trustcacerts –alias ALIASNAME -file /PATH/TO/YOUR/DESKTOP/CertificateName.cer -keystore /PATH/TO/YOUR/JDK/jre/lib/security/cacerts -storepass changeit
That is it! you got your problem resolved.
这就对了!你的问题解决了。
PLEASE NOTE
请注意
- Do confirm that the jre which is giving you this PKIX error(JRE used by eclipse or your app after deployment) that is where you are performing STEP 2. If you would try with another jre problem would be as it is.
- 请确认给您这个 PKIX 错误(Eclipse 或您的应用程序在部署后使用的 JRE)的 jre 是您正在执行第 2 步的地方。如果您尝试解决另一个 jre 问题,将会是原样。
回答by Satheesh
Go to Eclipse -> Window -> Preferences -> Network Settings Change Active Provider to Direct Save Go back to Install Software Try again to pull from AWS Repo This time it will work
转到 Eclipse -> 窗口 -> 首选项 -> 网络设置 将活动提供程序更改为直接保存 返回安装软件 再次尝试从 AWS Repo 中提取 这一次它将起作用
回答by Sakthivel Subbaiyan
Just flow the below steps in eclipse, 1) go to windows -> preference - > search for network connections 2) Change the active provider to direct.
只需在 Eclipse 中执行以下步骤,1) 转到 windows -> 首选项 -> 搜索网络连接 2) 将活动提供程序更改为direct。
Then try install software in eclipse and search for http://aws.amazon.com/eclipse. It will work.
然后尝试在 eclipse 中安装软件并搜索http://aws.amazon.com/eclipse。它会起作用。
回答by BPeela
Try changing the Window/Preferences/Network settings from Native to Direct. Launch eclipse from CLI using "eclipse.exe -clean" Retry the update
尝试将窗口/首选项/网络设置从本机更改为直接。使用“eclipse.exe -clean”从 CLI 启动 eclipse 重试更新