首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何修复--“`ERROR com.intuit.karate - http请求失败”

如何修复--“`ERROR com.intuit.karate - http请求失败”
EN

Stack Overflow用户
提问于 2019-07-20 16:26:44
回答 1查看 5.8K关注 0票数 1
  1. 我已经使用Springboot将mongoDb与SSL &Certs(信任、关键)连接起来。
代码语言:javascript
复制
System.setProperty("javax.net.ssl.trustStore", trustStoreFilePath.getPath());
System.setProperty("javax.net.ssl.trustStorePassword", truststorePassword);
System.setProperty("javax.net.ssl.keyStore", keyStoreFilePath.getPath());
System.setProperty("javax.net.ssl.keyStorePassword", keystorePassword);
  1. 然后,能够成功地连接
  2. 然后,尝试在https://xxxxxx.net/api/v1/login上调用REST

添加并尝试以下选项- karate.configure(' ssl ',true);-*配置ssl= true

我的错误越来越少-

代码语言:javascript
复制
admin_login.feature
21:43:28.106 [ForkJoinPool-1-worker-1] ERROR com.intuit.karate - 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, http call failed after 943 milliseconds for URL: https://xxxxxx.net/api/v1/login
21:43:28.107 [ForkJoinPool-1-worker-1] ERROR com.intuit.karate - http request failed: 
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
21:43:28.114 [ForkJoinPool-1-worker-1] ERROR com.intuit.karate - feature call failed: classpath:admin_login.feature
arg: [object Object]
admin_login.feature:8 - 
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
21:43:28.116 [ForkJoinPool-1-worker-1] ERROR com.intuit.karate - javascript function call failed: 
admin_login.feature:8 - 
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
  1. 如果我没有将db与ssl连接起来。能够打电话给所有的休息电话,请帮忙。
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-07-20 16:59:45

SSL可能很棘手,您可能需要时间和耐心。

通常,* configure ssl = true应该只在空手道中工作,因为它将禁用证书验证。听起来,这里你已经设置了一些系统属性,这些属性也是由空手道获得的。参考https://github.com/intuit/karate#system-properties-for-ssl-and-http-proxy

所以,如果您使用configure ssl,您可以让它工作。

请记住,如果仍然被困,需要更多的支持,请按以下说明操作:https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57126580

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档