如何修复-错误com.intuit.karate-HTTP请求失败 [英] How to fix - `ERROR com.intuit.karate - http request failed`
问题描述
- 我已将mongoDb与SSL&使用Springboot的证书(信任,密钥库)
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);
- 然后,就可以成功连接
- 然后,尝试在
https://xxxxxx.net/api/v1/login
上进行REST调用
- Then, able to connect successfully
- Then, tried REST call on
https://xxxxxx.net/api/v1/login
添加并尝试了以下选项 -karate.configure('ssl',true); -*配置ssl = true
Added and tried below options - karate.configure('ssl', true); - * configure ssl = true
我遇到错误-
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
- 如果我未将db与ssl连接.能够呼叫所有REST呼叫 请对此提供帮助.
- if i'm not connecting db with ssl. able to call all REST calls Please help on this.
推荐答案
SSL可能很棘手,您可能需要时间和耐心.
SSL can be tricky, you may need time and patience.
通常* configure ssl = true
应该只在空手道中工作,因为它将禁用证书验证.听起来这里您已经设置了一些空手道也要拾取的系统属性.请参考 https://github.com/intuit/karate #system-properties-for-ssl-and-http-proxy
Normally * configure ssl = true
should just work in Karate because it will disable certificate validation. Sounds like here you have set some System properties that is being picked up by Karate also. Refer https://github.com/intuit/karate#system-properties-for-ssl-and-http-proxy
因此,如果您使用 configure ssl
的高级形式,您可能会可以使它正常工作.
So maybe if you use the advanced form of configure ssl
you can get it it work.
请记住,如果仍然遇到问题,需要更多支持,请按照此处的说明进行操作: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue
Remember if are still stuck and you need more support, follow the instructions here: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue
这篇关于如何修复-错误com.intuit.karate-HTTP请求失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!