错误 - trustAnchors 参数必须为非空

2022-01-30 00:00:00 jenkins hudson java jakarta-mail

我正在尝试在 Jenkins/Hudson 上配置我的电子邮件,但我不断收到错误消息:

I'm trying to configure my e-mail on Jenkins/Hudson, and I constantly receive the error:

java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be
    non-empty

我在网上看到了大量关于该错误的信息,但我没有得到任何工作.我在 Fedora Linux(不是 OpenJDK)上使用 Sun 的 JDK.

I've seen a good amount of information online about the error, but I have not gotten any to work. I'm using Sun's JDK on Fedora Linux (not OpenJDK).

这是我尝试过的一些事情.我尝试遵循此 post 中的建议,但从Windows 到我的托管 Jenkins 的 Fedora 盒子没有工作.我尝试按照 本指南 尝试将 Gmail 配置为我的 SMTP 服务器,但它没有也不行.我还尝试手动下载和移动这些 cacert 文件,然后使用 本指南.

Here are a few things I've tried. I tried following the advice from this post, but copying the cacerts from Windows over to my Fedora box hosting Jenkins didn't work. I tried following this guide as I'm trying to configure Gmail as my SMTP server, but it didn't work either. I also tried to download and move those cacert files manually and move them over to my Java folder using a variation of the commands on this guide.

我愿意接受任何建议,因为我目前陷入困境.我已经让它在 Windows Hudson 服务器上工作,但我在 Linux 上苦苦挣扎.

I am open to any suggestions as I'm currently stuck right now. I have gotten it to work from a Windows Hudson server, but I am struggling on Linux.

推荐答案

这个奇怪的消息意味着你指定的 trustStore 是:

This bizarre message means that the trustStore you specified was:

  • 空,
  • 未找到,或
  • 无法打开
    • (由于错误/缺少 trustStorePassword,或
    • 文件访问权限,例如).

    另请参阅@AdamPlumb 的答案.

    See also @AdamPlumb's answer below.

相关文章