1

Hi I wanted to integrate my selenium automation framework from bitbucket to Jenkins . I have installed jenkins-2.107.2(jenkins.msi) , after that i downloaded jenkins war(2.116) file and tried to execute from command prompt (java -jar jenkins.war) from the respective path where war file is present

but in cmd prompt i get below error.

enter code here

C:\Jenkins>java -jar jenkins.war

Have copied and pasted only the error part from cmd prompt

←[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

While lauching localhost http://localhost:8080/ i get the below error

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

Can some one help me .. Thank you .

1 Answers1

0

You have not written what is your OS, I assume it is Windows because you have downloaded msi file.

I would stick to the current LTS version 2.107.2 and the msi. The msi should have installed the Jenkins master as Windows service. I would not attempt to use the war file 2.116 on Windows. It is currently not the LTS version and could be not stable enough. This thread can help you.

K. B.
  • 3,342
  • 3
  • 19
  • 32