Jenkins奴隶代理启动失败

时间:2013-06-28 13:55:30

标签: jenkins

使用“从服务器上的浏览器启动代理”选项从从属计算机启动从属代理时,它会失败。它为slave-agent.jnlp打开一个窗口,当用Java Web Start Launcher打开时,它会弹出启动应用程序,然后另一个弹出窗口显示“无法验证证书”消息。

错误详情如下:

java.security.cert.CertificateException:
java.security.cert.CertPathValidatorException:
java.security.InvalidKeyException: Wrong key usage
    at com.sun.deploy.security.TrustDecider.isAllPermissionGranted(Unknown Source)
    at com.sun.javaws.security.AppPolicy.grantUnrestrictedAccess(Unknown Source)
    at com.sun.javaws.LaunchDownload.checkSignedResourcesHelper(Unknown Source)
    at com.sun.javaws.LaunchDownload.checkSignedResources(Unknown Source)
    at com.sun.javaws.Launcher.prepareResources(Unknown Source)
    at com.sun.javaws.Launcher.prepareAllResources(Unknown Source)
    at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
    at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
    at com.sun.javaws.Launcher.launch(Unknown Source)
    at com.sun.javaws.Main.launchApp(Unknown Source)
    at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
    at com.sun.javaws.Main$1.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.security.cert.CertPathValidatorException:
 java.security.InvalidKeyException: Wrong key usage
    at sun.security.provider.certpath.OCSPResponse.verifyResponse(Unknown Source)
    at sun.security.provider.certpath.OCSPResponse.<init>(Unknown Source)
    at sun.security.provider.certpath.OCSP.check(Unknown Source)
    at sun.security.provider.certpath.OCSP.check(Unknown Source)
    at com.sun.deploy.security.TrustDecider.doOCSPEEValidation(Unknown Source)
    ... 13 more
Caused by: java.security.InvalidKeyException: Wrong key usage
    at java.security.Signature.initVerify(Unknown Source)
    ... 18 more

当我运行“if the slave is headless:”选项时,它会打开一个命令提示符并显示连接到主服务器的消息。奴隶也在仪表板上在线显示。

主设备在我的本地计算机上,我通过VPN连接到远程计算机(Windows XP)。我想将此远程用作从属服务器作为Windows服务,而不是通过命令提示符运行。我怎么能这样做?

2 个答案:

答案 0 :(得分:18)

将Jenkins slave作为服务安装后,转到slave上配置的“Remote root directory”,在文本编辑器中打开jenkins-slave.xml文件,将-noCertificateCheck添加到{ {1}}标记,然后重新启动该服务。这应该摆脱证书例外。

答案 1 :(得分:0)

首先,从控制面板中选择“Java”。选择“高级”标签。扩展“安全”。确保“启用在线证书验证”,并且取消选中“仅为发布者证书启用在线证书验证”

然后运行JNLP文件。如果Jenkins根目录不存在,则需要创建它。

最后,请关注@ sschuberth的回答。