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

Jenkins2 credentials lost during plugin install

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      We've got Jenkins2 running with 4 build slaves (via ssh).

      We're running Jenkins 2.6 presently.

      When going into the plugin manager and selecting "download now and install after restart", upon restart, the credentials used to contact the slaves are gone. In order to get things back up, we have to re-create the credential then re-connect the slaves.

      What's interesting is that we can update and install plugins, then restart jenkins via systemd, then things seem to work fine...no lost credentials, not need to re-create credentials or re-connect slaves.

      OS details:

      LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
      Distributor ID: CentOS
      Description: CentOS Linux release 7.2.1511 (Core)
      Release: 7.2.1511
      Codename: Core

      Java Details:
      java version "1.7.0_101"
      OpenJDK Runtime Environment (rhel-2.6.6.1.el7_2-x86_64 u101-b00)
      OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)

        Attachments

          Activity

          Hide
          trnsfrmrsr Ryan Frizzell added a comment -

          I forgot to add upon using the plugin updater or installing a new pluging, you need to check the box "Restart Jenkins when installation is complete and no jobs are running" in order to reproduce the issue.

          presently we workd around the issue by installing/updating plugins, then executing systemct restart jenkins

          Show
          trnsfrmrsr Ryan Frizzell added a comment - I forgot to add upon using the plugin updater or installing a new pluging, you need to check the box "Restart Jenkins when installation is complete and no jobs are running" in order to reproduce the issue. presently we workd around the issue by installing/updating plugins, then executing systemct restart jenkins
          Hide
          stephenconnolly Stephen Connolly added a comment -

          So I have tried to reproduce but it seems I cannot.

          What I suggest you do is open a second terminal on the Jenkins master and run a command similar to the following

          cd $JENKINS_HOME
          watch cat credentials.xml nodes/*/config.xml
          

          Then with that window open:

          • make your changes to the credentials... notice that the credentials.xml content gets saved when you hit the save button.
          • make your changes to the build agent configuration... notice that the <credentialsId> field gets updated when you hit the save button.
          • restart Jenkins after installing a plugin... notice that the credentials.xml and build agent config.xml files are unchanged.

          Unsure where to go from here, but perhaps you can narrow it down some more... from what I can see, though, this does not look to be an issue with the credentials api plugin

          Show
          stephenconnolly Stephen Connolly added a comment - So I have tried to reproduce but it seems I cannot. What I suggest you do is open a second terminal on the Jenkins master and run a command similar to the following cd $JENKINS_HOME watch cat credentials.xml nodes/*/config.xml Then with that window open: make your changes to the credentials... notice that the credentials.xml content gets saved when you hit the save button. make your changes to the build agent configuration... notice that the <credentialsId> field gets updated when you hit the save button. restart Jenkins after installing a plugin... notice that the credentials.xml and build agent config.xml files are unchanged. Unsure where to go from here, but perhaps you can narrow it down some more... from what I can see, though, this does not look to be an issue with the credentials api plugin

            People

            • Assignee:
              stephenconnolly Stephen Connolly
              Reporter:
              trnsfrmrsr Ryan Frizzell
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: