Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-33800

java.io.FileNotFoundException: /var/jenkins_home/secrets/initialAdminPassword when upgrading from 1.642.2 LTS to 2.0-beta-1

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      When upgrading from 1.662.2 LTS i got this issue when connecting to main page:

      INFO: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@8ba8667: display name [Root WebApplicationContext]; startup date [Thu Mar 24 22:45:02 UTC 2016]; root of context hierarchy
      Mar 24, 2016 10:45:02 PM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
      INFO: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@8ba8667]: org.springframework.beans.factory.support.DefaultListableBeanFactory@11787592
      Mar 24, 2016 10:45:02 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
      INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@11787592: defining beans [filter,legacy]; root of factory hierarchy
      Mar 24, 2016 10:45:02 PM jenkins.util.groovy.GroovyHookScript execute
      INFO: Executing /var/jenkins_home/init.groovy.d/tcp-slave-agent-port.groovy
      Mar 24, 2016 10:45:02 PM hudson.model.AsyncPeriodicWork$1 run
      INFO: Started Download metadata
      Mar 24, 2016 10:45:02 PM hudson.model.AsyncPeriodicWork createListener
      INFO: Moved /var/jenkins_home/Download metadata.log to /var/jenkins_home/logs/tasks/Download metadata.log.1
      Mar 24, 2016 10:45:02 PM hudson.model.AsyncPeriodicWork$1 run
      INFO: Finished Download metadata. 6 ms
      Mar 24, 2016 10:45:02 PM org.jenkinsci.main.modules.sshd.SSHD start
      INFO: Started SSHD at port 50000
      Mar 24, 2016 10:45:11 PM hudson.model.UpdateSite updateData
      INFO: Obtained the latest update center data file for UpdateSource default
      Mar 24, 2016 10:45:11 PM jenkins.InitReactorRunner$1 onAttained
      INFO: Completed initialization
      Mar 24, 2016 10:45:11 PM hudson.util.BootFailure publish
      SEVERE: Failed to initialize Jenkins
      hudson.util.HudsonFailedToLoad: java.io.FileNotFoundException: /var/jenkins_home/secrets/initialAdminPassword (No such file or directory)
              at hudson.WebAppMain$3.run(WebAppMain.java:237)
      Caused by: java.io.FileNotFoundException: /var/jenkins_home/secrets/initialAdminPassword (No such file or directory)
              at java.io.FileInputStream.open0(Native Method)
              at java.io.FileInputStream.open(FileInputStream.java:195)
              at java.io.FileInputStream.<init>(FileInputStream.java:138)
              at hudson.FilePath.read(FilePath.java:1751)
              at hudson.FilePath.readToString(FilePath.java:1852)
              at jenkins.install.SetupWizard.<init>(SetupWizard.java:110)
              at jenkins.model.Jenkins.<init>(Jenkins.java:880)
              at hudson.model.Hudson.<init>(Hudson.java:85)
              at hudson.model.Hudson.<init>(Hudson.java:81)
              at hudson.WebAppMain$3.run(WebAppMain.java:225)
      
      Mar 24, 2016 10:45:11 PM jenkins.model.Jenkins cleanUp
      INFO: Stopping Jenkins
      Mar 24, 2016 10:45:11 PM jenkins.model.Jenkins _cleanUpDisconnectComputers
      INFO: Starting node disconnection
      

      On 1.642.2 security through LDAP was enabled.

        Attachments

          Issue Links

            Activity

            Hide
            danielbeck Daniel Beck added a comment -

            Thanks for your report!

            Did your Jenkins instance have any jobs defined, or was it "empty"? Did you ever view and save the global configuration form before updating to 2.0 beta?

            Show
            danielbeck Daniel Beck added a comment - Thanks for your report! Did your Jenkins instance have any jobs defined, or was it "empty"? Did you ever view and save the global configuration form before updating to 2.0 beta?
            Hide
            lautou Laurent TOURREAU added a comment -

            It was empty (no jobs defined).
            I viewed and save the global configuration form (updating security settings : I enabled LDAP authentication and
            "Enable Slave → Master Access Control").

            Show
            lautou Laurent TOURREAU added a comment - It was empty (no jobs defined). I viewed and save the global configuration form (updating security settings : I enabled LDAP authentication and "Enable Slave → Master Access Control").
            Hide
            danielbeck Daniel Beck added a comment -

            Thank you.

            Either having a job defined, or having saved the global config (not security config) once is currently required for Jenkins to correctly determine it's an existing instance. However, and here's the more severe problem, the SetupWizard uses a different scheme to determine that.

            Show
            danielbeck Daniel Beck added a comment - Thank you. Either having a job defined, or having saved the global config (not security config) once is currently required for Jenkins to correctly determine it's an existing instance. However, and here's the more severe problem, the SetupWizard uses a different scheme to determine that.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: kzantow
            Path:
            core/src/main/java/jenkins/install/SetupWizard.java
            core/src/main/resources/jenkins/model/Jenkins/login.jelly
            http://jenkins-ci.org/commit/jenkins/da3bb81fadc966cc2df74b18c20a6eb01cf4806e
            Log:
            JENKINS-33800 - fileNotFound exception if jenkins 1 installed, security
            settings saved but global config is not - show normal login in this case

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: kzantow Path: core/src/main/java/jenkins/install/SetupWizard.java core/src/main/resources/jenkins/model/Jenkins/login.jelly http://jenkins-ci.org/commit/jenkins/da3bb81fadc966cc2df74b18c20a6eb01cf4806e Log: JENKINS-33800 - fileNotFound exception if jenkins 1 installed, security settings saved but global config is not - show normal login in this case
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: kzantow
            Path:
            core/src/main/java/hudson/ExtensionFinder.java
            core/src/main/java/hudson/model/ItemGroupMixIn.java
            core/src/main/java/hudson/model/View.java
            core/src/main/java/hudson/model/ViewDescriptor.java
            core/src/main/java/jenkins/model/Jenkins.java
            core/src/main/resources/hudson/model/AllView/noJob.jelly
            core/src/main/resources/lib/hudson/ballColorTd.jelly
            test/src/test/java/hudson/jobs/CreateItemTest.java
            test/src/test/java/hudson/model/ViewDescriptorTest.java
            test/src/test/java/hudson/model/ViewTest.java
            war/src/main/webapp/css/style.css
            http://jenkins-ci.org/commit/jenkins/ae5c36979a3e1ad93ef66f2090898bfdf6de1d18
            Log:
            Merge remote-tracking branch 'primary/2.0' into JENKINS-33800-initial-password-file-not-found

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: kzantow Path: core/src/main/java/hudson/ExtensionFinder.java core/src/main/java/hudson/model/ItemGroupMixIn.java core/src/main/java/hudson/model/View.java core/src/main/java/hudson/model/ViewDescriptor.java core/src/main/java/jenkins/model/Jenkins.java core/src/main/resources/hudson/model/AllView/noJob.jelly core/src/main/resources/lib/hudson/ballColorTd.jelly test/src/test/java/hudson/jobs/CreateItemTest.java test/src/test/java/hudson/model/ViewDescriptorTest.java test/src/test/java/hudson/model/ViewTest.java war/src/main/webapp/css/style.css http://jenkins-ci.org/commit/jenkins/ae5c36979a3e1ad93ef66f2090898bfdf6de1d18 Log: Merge remote-tracking branch 'primary/2.0' into JENKINS-33800 -initial-password-file-not-found
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: kzantow
            Path:
            core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java
            core/src/main/java/jenkins/install/InstallUtil.java
            core/src/main/java/jenkins/install/SetupWizard.java
            core/src/main/resources/hudson/model/View/newJob.jelly
            core/src/main/resources/hudson/model/View/newJob.properties
            core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/setupWizardFirstUser.jelly
            core/src/main/resources/jenkins/install/SetupWizard/authenticate-security-token.jelly
            core/src/main/resources/jenkins/install/SetupWizard/setupWizardFirstUser.jelly
            core/src/main/resources/jenkins/install/UpgradeWizard/footer.jelly
            core/src/main/resources/jenkins/install/UpgradeWizard/footer.properties
            core/src/main/resources/jenkins/install/pluginSetupWizard.properties
            core/src/main/resources/lib/form/repeatableDeleteButton.jelly
            core/src/main/resources/lib/layout/html.jelly
            war/src/main/js/add-item.js
            war/src/main/js/add-item.less
            war/src/main/js/api/pluginManager.js
            war/src/main/js/api/securityConfig.js
            war/src/main/js/pluginSetupWizardGui.js
            war/src/main/js/templates/errorPanel.hbs
            war/src/main/js/templates/firstUserPanel.hbs
            war/src/main/js/widgets/add/addform.less
            war/src/main/less/pluginSetupWizard.less
            http://jenkins-ci.org/commit/jenkins/28302ea16371a09bcf34a85eef4a9cb37ee2a622
            Log:
            Merge remote-tracking branch 'primary/2.0' into JENKINS-33800-initial-password-file-not-found

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: kzantow Path: core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java core/src/main/java/jenkins/install/InstallUtil.java core/src/main/java/jenkins/install/SetupWizard.java core/src/main/resources/hudson/model/View/newJob.jelly core/src/main/resources/hudson/model/View/newJob.properties core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/setupWizardFirstUser.jelly core/src/main/resources/jenkins/install/SetupWizard/authenticate-security-token.jelly core/src/main/resources/jenkins/install/SetupWizard/setupWizardFirstUser.jelly core/src/main/resources/jenkins/install/UpgradeWizard/footer.jelly core/src/main/resources/jenkins/install/UpgradeWizard/footer.properties core/src/main/resources/jenkins/install/pluginSetupWizard.properties core/src/main/resources/lib/form/repeatableDeleteButton.jelly core/src/main/resources/lib/layout/html.jelly war/src/main/js/add-item.js war/src/main/js/add-item.less war/src/main/js/api/pluginManager.js war/src/main/js/api/securityConfig.js war/src/main/js/pluginSetupWizardGui.js war/src/main/js/templates/errorPanel.hbs war/src/main/js/templates/firstUserPanel.hbs war/src/main/js/widgets/add/addform.less war/src/main/less/pluginSetupWizard.less http://jenkins-ci.org/commit/jenkins/28302ea16371a09bcf34a85eef4a9cb37ee2a622 Log: Merge remote-tracking branch 'primary/2.0' into JENKINS-33800 -initial-password-file-not-found
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: kzantow
            Path:
            changelog.html
            core/src/main/java/hudson/Functions.java
            core/src/main/java/hudson/TcpSlaveAgentListener.java
            core/src/main/java/hudson/diagnosis/NullIdDescriptorMonitor.java
            core/src/main/java/hudson/init/Initializer.java
            core/src/main/java/hudson/init/TaskMethodFinder.java
            core/src/main/java/hudson/init/Terminator.java
            core/src/main/java/jenkins/install/SetupWizard.java
            core/src/main/java/jenkins/model/Jenkins.java
            core/src/main/java/jenkins/model/Uptime.java
            core/src/main/java/jenkins/security/RekeySecretAdminMonitor.java
            core/src/main/java/jenkins/slaves/NioChannelSelector.java
            core/src/main/resources/hudson/TcpSlaveAgentListener/index.jelly
            pom.xml
            test/pom.xml
            test/src/test/groovy/hudson/cli/BuildCommandTest.groovy
            test/src/test/java/hudson/model/UpdateCenter2Test.java
            test/src/test/java/hudson/model/UpdateCenterTest.java
            test/src/test/java/hudson/slaves/CommandLauncherTest.java
            test/src/test/java/hudson/slaves/NodeProvisionerTest.java
            test/src/test/java/hudson/tasks/FingerprinterTest.java
            http://jenkins-ci.org/commit/jenkins/265aeceda84f22fa18adb3f6460d9f9dd83a2066
            Log:
            Merge remote-tracking branch 'primary/2.0' into JENKINS-33800-initial-password-file-not-found

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: kzantow Path: changelog.html core/src/main/java/hudson/Functions.java core/src/main/java/hudson/TcpSlaveAgentListener.java core/src/main/java/hudson/diagnosis/NullIdDescriptorMonitor.java core/src/main/java/hudson/init/Initializer.java core/src/main/java/hudson/init/TaskMethodFinder.java core/src/main/java/hudson/init/Terminator.java core/src/main/java/jenkins/install/SetupWizard.java core/src/main/java/jenkins/model/Jenkins.java core/src/main/java/jenkins/model/Uptime.java core/src/main/java/jenkins/security/RekeySecretAdminMonitor.java core/src/main/java/jenkins/slaves/NioChannelSelector.java core/src/main/resources/hudson/TcpSlaveAgentListener/index.jelly pom.xml test/pom.xml test/src/test/groovy/hudson/cli/BuildCommandTest.groovy test/src/test/java/hudson/model/UpdateCenter2Test.java test/src/test/java/hudson/model/UpdateCenterTest.java test/src/test/java/hudson/slaves/CommandLauncherTest.java test/src/test/java/hudson/slaves/NodeProvisionerTest.java test/src/test/java/hudson/tasks/FingerprinterTest.java http://jenkins-ci.org/commit/jenkins/265aeceda84f22fa18adb3f6460d9f9dd83a2066 Log: Merge remote-tracking branch 'primary/2.0' into JENKINS-33800 -initial-password-file-not-found
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Daniel Beck
            Path:
            core/src/main/java/hudson/PluginManager.java
            core/src/main/java/hudson/model/UpdateCenter.java
            core/src/main/java/jenkins/install/InstallState.java
            core/src/main/java/jenkins/install/InstallUtil.java
            core/src/main/java/jenkins/install/SetupWizard.java
            core/src/main/java/jenkins/model/Jenkins.java
            core/src/main/resources/jenkins/model/Jenkins/login.jelly
            core/src/main/resources/jenkins/model/Jenkins/loginError.jelly
            http://jenkins-ci.org/commit/jenkins/37c00cf2aff05dcefca78c60f498875ce20d911e
            Log:
            Merge pull request #2185 from kzantow/JENKINS-33800-initial-password-file-not-found

            JENKINS-33800 - fileNotFound exception / more accurately determine if this is an upgrade

            Compare: https://github.com/jenkinsci/jenkins/compare/e3ae36860d08...37c00cf2aff0

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Beck Path: core/src/main/java/hudson/PluginManager.java core/src/main/java/hudson/model/UpdateCenter.java core/src/main/java/jenkins/install/InstallState.java core/src/main/java/jenkins/install/InstallUtil.java core/src/main/java/jenkins/install/SetupWizard.java core/src/main/java/jenkins/model/Jenkins.java core/src/main/resources/jenkins/model/Jenkins/login.jelly core/src/main/resources/jenkins/model/Jenkins/loginError.jelly http://jenkins-ci.org/commit/jenkins/37c00cf2aff05dcefca78c60f498875ce20d911e Log: Merge pull request #2185 from kzantow/ JENKINS-33800 -initial-password-file-not-found JENKINS-33800 - fileNotFound exception / more accurately determine if this is an upgrade Compare: https://github.com/jenkinsci/jenkins/compare/e3ae36860d08...37c00cf2aff0

              People

              • Assignee:
                kzantow Keith Zantow
                Reporter:
                lautou Laurent TOURREAU
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: