在做CDH集群加密的过程中,把签名后的证书 信息导入到秘钥库时报如下错误
keytool error: java.lang.Exception: Failed to establish chain from reply
百度找到好多文章,都没解决问题,后来搜到一篇英文的文章 https://www.veritas.com/support/en_US/article.000021204
提到如下:
Problem
When importing an SSL certificate to Clearwell's keystore, an error is encountered.
Error Message
keytool error: java.lang.Exception: Failed to establish chain from reply
Cause
Root and/or Intermediate certificates have not been imported properly or in the correct order.
我检查了一下,是把原来的一步注释了没执行
即把自签名证书(即我的根证书) 信息导入到服务器秘钥库
修改以下,先执行这一步,后面在执行即正常。
总结:证书导入秘钥库的顺序很重要,如果有根证书或者多层级证书颁发机构,必须按从上到下一层一层顺序导入。