如何修复-错误com.intuit.karate-HTTP请求失败 [英] How to fix - `ERROR com.intuit.karate - http request failed`

查看:187
本文介绍了如何修复-错误com.intuit.karate-HTTP请求失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  1. 我已将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);

  1. 然后,就可以成功连接
  2. 然后,尝试在https://xxxxxx.net/api/v1/login
  3. 上进行REST调用
  1. Then, able to connect successfully
  2. 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

  1. 如果我未将db与ssl连接.能够呼叫所有REST呼叫 请对此提供帮助.
  1. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆