我正在使用 Pentaho 数据集成 (Kettle)。我的目标是通过 HTTPS 使用现有的 REST API。为此,我使用了 pdi 提供的 REST 客户端。
在我的本地环境中,我可以使用这个 API。但是,一旦我将其推送到生产服务器 (redhat) 并运行该作业,我就会遇到与 SSL 证书相关的错误:
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
为了提供目标证书,我首先使用 keytool [in/home/user/] 将其添加到新的 keystore 中:
keytool -importcert -keystore spoc.truststore -alias spoc-preprod -file cert.crt -noprompt
为了让 PDI 使用这个信任库,我已经像这样配置了其余的客户端:
Rest client SSL truststore configuration
在生产中插入相关转换并运行作业后,我遇到了不同的错误:
Keystore was tampered with, or password was incorrect
at org.pentaho.di.trans.steps.rest.Rest.setConfig(Rest.java:274)
at org.pentaho.di.trans.steps.rest.Rest.init(Rest.java:483)
at org.pentaho.di.trans.step.StepInitThread.run(StepInitThread.java:65)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.IOException: Keystore was tampered with, or password was incorrect
at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:771)
at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:38)
at java.security.KeyStore.load(KeyStore.java:1185)
at org.pentaho.di.trans.steps.rest.Rest.setConfig(Rest.java:249)
... 3 more
Caused by: java.security.UnrecoverableKeyException: Password verification failed
at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:769)
... 6 more
我确定我提供的 keystore 的路径(如果我输入虚拟路径,则文件未找到异常),而且我对密码更加确定。
在网上找了两天,没有找到类似的问题。这就是为什么我现在需要你的帮助:)
纳斯
最佳答案
我知道我可能迟到了,但几天前我遇到了同样的问题。我使用 keystore 的默认密码解决了它,如 this answer解释,这是 changeit
。
关于rest - 如何将信任库与 pentaho 数据集成/Rest 客户端一起使用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35059260/