Jenkins启动问题(hudson.util.HudsonFailedToLoad:java.lang.Error:无法加载密钥:hudson.util.Secret)

时间:2018-04-12 12:27:42

标签: java jenkins selenium-webdriver jenkins-plugins jenkins-pipeline

您好我想将我的selenium自动化框架从bitbucket集成到Jenkins。我已经安装了 jenkins-2.107.2(jenkins.msi),之后我下载了jenkins war(2.116)文件并尝试执行 来自存在war文件的相应路径中的命令提示符(java -jar jenkins.war)

,但在cmd提示符下,我收到以下错误。

enter code here

C:\ Jenkins> java -jar jenkins.war

仅从cmd提示中复制并粘贴了错误部分

←[31mApr 12, 2018 5:50:54 PM hudson.util.BootFailure publishSEVERE: Failedto initialize Jenkinshudson.util.HudsonFailedToLoad: java.lang.Error: Failed toloadthe key: hudson.util.Secret

在推出localhost http://localhost:8080/时,我收到以下错误

java.nio.file.AccessDeniedException: C:\Users\SSUSEEL\.jenkins\secrets\hudson.util.Secret
at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsFileSystemProvider.newByteChannel(Unknown Source)
at java.nio.file.spi.FileSystemProvider.newOutputStream(Unknown Source)
at java.nio.file.Files.newOutputStream(Unknown Source)
at jenkins.security.DefaultConfidentialStore.store(DefaultConfidentialStore.java:79)
at jenkins.security.ConfidentialKey.store(ConfidentialKey.java:51)
at jenkins.security.CryptoConfidentialKey.getKey(CryptoConfidentialKey.java:44)

Caused: java.lang.Error: Failed to load the key: hudson.util.Secret
    at jenkins.security.CryptoConfidentialKey.getKey(CryptoConfidentialKey.java:53)
    at jenkins.security.CryptoConfidentialKey.decrypt(CryptoConfidentialKey.java:134)
    at hudson.util.HistoricalSecrets.decrypt(HistoricalSecrets.java:49)
    at hudson.util.Secret.decrypt(Secret.java:207)
    at hudson.util.Secret.fromString(Secret.java:249)
    at jenkins.security.ApiTokenProperty.<init>(ApiTokenProperty.java:86)
    at jenkins.security.ApiTokenProperty$DescriptorImpl.newInstance(ApiTokenProperty.java:179)
    at jenkins.security.ApiTokenProperty$DescriptorImpl.newInstance(ApiTokenProperty.java:164)
    at hudson.model.User.load(User.java:209)
    at hudson.model.User.<init>(User.java:161)
    at hudson.model.User.getOrCreate(User.java:531)
    at hudson.model.User.getOrCreate(User.java:479)
    at hudson.model.User.getById(User.java:636)
    at hudson.security.HudsonPrivateSecurityRealm.createAccount(HudsonPrivateSecurityRealm.java:406)
    at jenkins.install.SetupWizard.init(SetupWizard.java:110)
    at jenkins.install.InstallState$4.initializeState(InstallState.java:110)
    at jenkins.model.Jenkins.setInstallState(Jenkins.java:1035)
    at jenkins.install.InstallUtil.proceedToNextStateFrom(InstallUtil.java:97)
    at jenkins.install.InstallState$1.initializeState(InstallState.java:55)
    at jenkins.model.Jenkins.<init>(Jenkins.java:923)
    at hudson.model.Hudson.<init>(Hudson.java:85)
    at hudson.model.Hudson.<init>(Hudson.java:81)
    at hudson.WebAppMain$3.run(WebAppMain.java:233)
Caused: hudson.util.HudsonFailedToLoad
    at hudson.WebAppMain$3.run(WebAppMain.java:24

有人可以帮助我..谢谢。

1 个答案:

答案 0 :(得分:0)

您还没有编写什么是您的操作系统,我认为它是Windows,因为您已经下载了msi文件。

我会坚持使用当前的LTS版本2.107.2和msi。 msi应该已将Jenkins主服务器安装为Windows service。我不会尝试在Windows上使用war文件2.116。它目前不是LTS版本,可能不够稳定。 这个thread可以帮到你。