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

Free-style projects touch subversion authentication credentials file

    XMLWordPrintable

Details

    Description

      We have around 100 free-style projects on our Jenkins installation. Jenkins is deployed to tomcat container. There is one Linux master and two Linux slaves. We use subversion as SCM. Subversion post-commit hooks have been configured to notify Jenkins when commits take place. Idea is that Jenkins should handle work copy updates and checkouts while our build tools should handle the logic related to building. Our build tools are simply a collection of bash shell scripts. Builds themselves are mostly maven builds.

      The account, which is used to run Jenkins, has a normal subversion config directory under its home directory. The file of interest is the one containing authentication credentials: ~/.subversion/auth/svn.simple/XXX.

      Jenkins changes the time stamp of this file every time a new build for a free-style project is triggered, either manually, or by post-commit hook. We produce around 300 builds a day. This means the file is under constant change. The file content stays the same before and after the change of time stamp. I have not monitored how the file is manipulated.

      Our build tools do some subversion operations before and after the actual maven build. Needed subversion authentication credentials are searched from the same above mentioned file. Now that the file is constantly modified, there are times when our build scripts fail to authenticate and the whole build fails. About 20 builds a day fail with error message like this: authorization failed: Could not authenticate to server: rejected Basic challenge.

      Fortunately, there is a workaround. I can create a copy of subversion configuration directory and configure our build tools to use that. However, I still feel that this is a bug in Jenkins or its subversion plugin, because there should not be a need to update the file.

      Out of curiosity, I created a maven2/3 project in my sandbox environment (Jenkins 1.448, Subversion plugin 1.37). Strangely, maven project did not touch the subversion credentials file the same way the free-style project did.

      Attachments

        Issue Links

          Activity

            salsa Sami Salonen added a comment -

            Problem was present with Jenkins 1.480.2 and Subversion plugin 1.39 (comes with 1.480.2), but after plugin upgrade to 1.45 problem was gone.

            salsa Sami Salonen added a comment - Problem was present with Jenkins 1.480.2 and Subversion plugin 1.39 (comes with 1.480.2), but after plugin upgrade to 1.45 problem was gone.
            salsa Sami Salonen added a comment -

            Issue is no longer reproducible with Jenkins 1.480.2 and Subversion plugin 1.45.

            salsa Sami Salonen added a comment - Issue is no longer reproducible with Jenkins 1.480.2 and Subversion plugin 1.45.
            evernat evernat added a comment -

            Is it reproduced with recent versions of Jenkins and of the subversion plugin?

            evernat evernat added a comment - Is it reproduced with recent versions of Jenkins and of the subversion plugin?
            salsa Sami Salonen added a comment -

            There is another workaround. If I change the scheme of the subversion URL from https to svn+ssh, the file ~/.subversion/auth/svn.simple/XXX is no longer touched.

            salsa Sami Salonen added a comment - There is another workaround. If I change the scheme of the subversion URL from https to svn+ssh, the file ~/.subversion/auth/svn.simple/XXX is no longer touched.

            People

              Unassigned Unassigned
              salsa Sami Salonen
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: