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

Failure to delete old config files during rekeying on Windows

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • core
    • Jenkins as a Windows service

      Started re-keying Wed Jan 09 12:59:32 EST 2013
      Scanning C:\JenkinsService\com.michelin.cio.hudson.plugins.copytoslave.CopyToSlaveBuildWrapper.xml
      ERROR: Failed to rewrite C:\JenkinsService\hudson.scm.CVSSCM.xml
      java.io.IOException: Unable to delete C:\JenkinsService\hudson.scm.CVSSCM.xml
      	at hudson.util.AtomicFileWriter.commit(AtomicFileWriter.java:112)
      	at hudson.util.SecretRewriter.rewrite(SecretRewriter.java:121)
      	at hudson.util.SecretRewriter.rewriteRecursive(SecretRewriter.java:170)
      	at hudson.util.SecretRewriter.rewriteRecursive(SecretRewriter.java:143)
      	at jenkins.security.RekeySecretAdminMonitor$RekeyThread.run(RekeySecretAdminMonitor.java:182)
      ERROR: Failed to rewrite C:\JenkinsService\users\andrewg\config.xml
      java.io.IOException: Unable to delete C:\JenkinsService\users\andrewg\config.xml
      	at hudson.util.AtomicFileWriter.commit(AtomicFileWriter.java:112)
      	at hudson.util.SecretRewriter.rewrite(SecretRewriter.java:121)
      	at hudson.util.SecretRewriter.rewriteRecursive(SecretRewriter.java:170)
      	at hudson.util.SecretRewriter.rewriteRecursive(SecretRewriter.java:182)
      	at hudson.util.SecretRewriter.rewriteRecursive(SecretRewriter.java:182)
      	at hudson.util.SecretRewriter.rewriteRecursive(SecretRewriter.java:143)
      	at jenkins.security.RekeySecretAdminMonitor$RekeyThread.run(RekeySecretAdminMonitor.java:182)
      Completed re-keying 0 files on Wed Jan 09 12:59:33 EST 2013
      

      Jenkins always fails to edit and delete these files as the Service will have a lock on them. If I stop the service I won't be able to get to Jenkins to rerun the rekey job.

          [JENKINS-16319] Failure to delete old config files during rekeying on Windows

          dogfood added a comment -

          Integrated in jenkins_main_trunk #2205
          [FIXED JENKINS-16319] Stream ordering problem prevented SecretRewriter from working on Windows. (Revision 8b8231108fb5930bab5c7e2f20685c9a9d237749)

          Result = SUCCESS
          Jesse Glick : 8b8231108fb5930bab5c7e2f20685c9a9d237749
          Files :

          • changelog.html
          • core/src/main/java/hudson/util/SecretRewriter.java

          dogfood added a comment - Integrated in jenkins_main_trunk #2205 [FIXED JENKINS-16319] Stream ordering problem prevented SecretRewriter from working on Windows. (Revision 8b8231108fb5930bab5c7e2f20685c9a9d237749) Result = SUCCESS Jesse Glick : 8b8231108fb5930bab5c7e2f20685c9a9d237749 Files : changelog.html core/src/main/java/hudson/util/SecretRewriter.java

          cforce added a comment -

          Still not released, is it?

          cforce added a comment - Still not released, is it?

          Damien Finck added a comment -

          @cforce : You can see the changelog : http://jenkins-ci.org/changelog > "Upcomming changes" > "Rekeying operation (from SECURITY-49 fix in 1.498) failed on Windows. (issue 16319)"

          The fix will be in 1.501

          Damien Finck added a comment - @cforce : You can see the changelog : http://jenkins-ci.org/changelog > "Upcomming changes" > "Rekeying operation (from SECURITY-49 fix in 1.498) failed on Windows. (issue 16319)" The fix will be in 1.501

          Hello,

          same problem in LTS Version Jenkins 1.480.2
          please merge fix to LTS Branch.

          kr.
          hc

          Hans-Christian Starzinger added a comment - Hello, same problem in LTS Version Jenkins 1.480.2 please merge fix to LTS Branch. kr. hc

          Code changed in jenkins
          User: Jesse Glick
          Path:
          changelog.html
          core/src/main/java/hudson/util/SecretRewriter.java
          http://jenkins-ci.org/commit/jenkins/cb6f200e8663101533f08821adc471b4f6b54fe5
          Log:
          [FIXED JENKINS-16319] Stream ordering problem prevented SecretRewriter from working on Windows.(cherry picked from commit 8b8231108fb5930bab5c7e2f20685c9a9d237749)

          Conflicts:
          changelog.html

          Compare: https://github.com/jenkinsci/jenkins/compare/5f7ad6e5feee...cb6f200e8663

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html core/src/main/java/hudson/util/SecretRewriter.java http://jenkins-ci.org/commit/jenkins/cb6f200e8663101533f08821adc471b4f6b54fe5 Log: [FIXED JENKINS-16319] Stream ordering problem prevented SecretRewriter from working on Windows.(cherry picked from commit 8b8231108fb5930bab5c7e2f20685c9a9d237749) Conflicts: changelog.html Compare: https://github.com/jenkinsci/jenkins/compare/5f7ad6e5feee...cb6f200e8663

          David Odren added a comment - - edited

          An upgrade from Jenkins 1.497 to 1.500 produced the same errors about failure to rewrite the config.xml files. I am running Jenkins as a service on Windows Server 2003 R2 Standard Edition SP2.

          David Odren added a comment - - edited An upgrade from Jenkins 1.497 to 1.500 produced the same errors about failure to rewrite the config.xml files. I am running Jenkins as a service on Windows Server 2003 R2 Standard Edition SP2.

          Jesse Glick added a comment -

          @dodren I reproduced the originally reported bug and confirmed the fix. If you are still seeing an issue the you need to provide the stack trace, with current line numbers.

          Jesse Glick added a comment - @dodren I reproduced the originally reported bug and confirmed the fix. If you are still seeing an issue the you need to provide the stack trace, with current line numbers.

          Damien Finck added a comment -

          It works for me on Jenkins 1.500 !

          Windows Server 2008r2
          Jenkins 1.500

          Damien Finck added a comment - It works for me on Jenkins 1.500 ! Windows Server 2008r2 Jenkins 1.500

          cforce added a comment -

          For me too!

          cforce added a comment - For me too!

          Jesse Glick added a comment -

          @dodren I am reclosing; if you can still reproduce please file a fresh bug with a complete rekeying log and link it to this one. You might have hit some other problem needing a separate fix.

          Jesse Glick added a comment - @dodren I am reclosing; if you can still reproduce please file a fresh bug with a complete rekeying log and link it to this one. You might have hit some other problem needing a separate fix.

            Unassigned Unassigned
            jglick Jesse Glick
            Votes:
            15 Vote for this issue
            Watchers:
            20 Start watching this issue

              Created:
              Updated:
              Resolved: