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

Fetching changes fails with SVNAuthenticationException due many svn:externals

    XMLWordPrintable

Details

    Description

      We have projects, which make heavy use of svn:externals inside the same subversion repository. Before updating to a new buildserver we used hudson on ubuntu 12.04 and had no problems ever. Now switching to ubuntu 16.04.2 LTS and jenkins 2.60.2, we observe the following issue:

      Whenever there is made a change to some library code, the first build after the change fails on jenkins, while jenkins tries to get the change history. The message is:
      No changes for svn://localhost/projects/project1/mainproject/trunk since the previous build
      No changes for svn://localhost/projects/project1/subproject1/trunk since the previous build
      Using sole credentials <none> in realm ‘<svn://localhost:3690> 17f7f5c1-6bce-49a2-b114-55f687de97a3’
      org.tmatesoft.svn.core.SVNAuthenticationException: svn: E170001: Authentication required for '17f7f5c1-6bce-49a2-b114-55f687de97a3'
      at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:68)
      at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:57)
      at org.tmatesoft.svn.core.internal.io.svn.sasl.SVNSaslAuthenticator.createSaslClient(SVNSaslAuthenticator.java:318)
      at org.tmatesoft.svn.core.internal.io.svn.sasl.SVNSaslAuthenticator.authenticate(SVNSaslAuthenticator.java:92)
      at org.tmatesoft.svn.core.internal.io.svn.SVNConnection.authenticate(SVNConnection.java:198)
      at org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.authenticate(SVNRepositoryImpl.java:1296)
      at org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.openConnection(SVNRepositoryImpl.java:1274)
      at org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.getLatestRevision(SVNRepositoryImpl.java:172)
      at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgRepositoryAccess.getRevisionNumber(SvnNgRepositoryAccess.java:119)
      at org.tmatesoft.svn.core.internal.wc2.SvnRepositoryAccess.getLocations(SvnRepositoryAccess.java:195)
      at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgRepositoryAccess.createRepositoryFor(SvnNgRepositoryAccess.java:46)
      at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteLog.run(SvnRemoteLog.java:160)
      at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteLog.run(SvnRemoteLog.java:35)
      at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)
      at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1235)
      at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
      at org.tmatesoft.svn.core.wc.SVNLogClient.doLog(SVNLogClient.java:968)
      at org.tmatesoft.svn.core.wc.SVNLogClient.doLog(SVNLogClient.java:873)
      at hudson.scm.SubversionChangeLogBuilder.buildModule(SubversionChangeLogBuilder.java:194)
      Caused: hudson.util.IOException2: revision check failed on svn://localhost/libraries/lib1/trunk
      at hudson.scm.SubversionChangeLogBuilder.buildModule(SubversionChangeLogBuilder.java:208)
      at hudson.scm.SubversionChangeLogBuilder.run(SubversionChangeLogBuilder.java:138)
      at hudson.scm.SubversionSCM.calcChangeLog(SubversionSCM.java:730)
      at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:865)
      at hudson.scm.SCM.checkout(SCM.java:495)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1276)
      at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:560)
      at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:485)
      at hudson.model.Run.execute(Run.java:1735)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:97)
      at hudson.model.Executor.run(Executor.java:405)
      I managed to reproduce the error with a clean standalone repository in the hope, this gives a help to fix the problem. So here is, how to reproduce it (using the scripts attached):

      • Step 1:
        Create an empty folder, change into that folder and run "build-svn-repo.sh"
        This will create a local svn repository and start an svnserve process on that repo.
      • Step 2:
        Create a jenkins job. Important settings:
        Subversion url: svn://localhost/projects/project1/mainproject/trunk
        Credentials : user "jenkins" password "testit"
        Ignore externals must NOT be set
      • Step 3:
        Manually run that job once (will pass)
      • Step 4:
        Add some changes to the repository using script "touch-project.sh"
      • Step 5:
        Manually run the job on jenkins again.
        It will fail with the exception

       

      If you have any questions, please comment this issue...

       

      Attachments

        Issue Links

          Activity

            jjvbintec Jørgen von Bargen created issue -
            jjvbintec Jørgen von Bargen made changes -
            Field Original Value New Value
            Description We have projects, which make heavy use of svn:externals inside the same subversion repository. Before updating to a new buildserver we used hudson on ubuntu 12.04 and had no problems ever. Now switching to ubuntu 16.04.2 LTS and jenkins 2.60.2, we observe the following issue:

            _Whenever_ there is made a change to some library code, the first build after the change fails on jenkins, while jenkins tries to get the change history. The message is:
            No changes for svn://localhost/projects/project1/mainproject/trunk since the previous build
            No changes for svn://localhost/projects/project1/subproject1/trunk since the previous build
            Using sole credentials <none> in realm ‘<svn://localhost:3690> 17f7f5c1-6bce-49a2-b114-55f687de97a3’
            org.tmatesoft.svn.core.SVNAuthenticationException: svn: E170001: Authentication required for '17f7f5c1-6bce-49a2-b114-55f687de97a3'
            at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:68)
            at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:57)
            at org.tmatesoft.svn.core.internal.io.svn.sasl.SVNSaslAuthenticator.createSaslClient(SVNSaslAuthenticator.java:318)
            at org.tmatesoft.svn.core.internal.io.svn.sasl.SVNSaslAuthenticator.authenticate(SVNSaslAuthenticator.java:92)
            at org.tmatesoft.svn.core.internal.io.svn.SVNConnection.authenticate(SVNConnection.java:198)
            at org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.authenticate(SVNRepositoryImpl.java:1296)
            at org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.openConnection(SVNRepositoryImpl.java:1274)
            at org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.getLatestRevision(SVNRepositoryImpl.java:172)
            at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgRepositoryAccess.getRevisionNumber(SvnNgRepositoryAccess.java:119)
            at org.tmatesoft.svn.core.internal.wc2.SvnRepositoryAccess.getLocations(SvnRepositoryAccess.java:195)
            at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgRepositoryAccess.createRepositoryFor(SvnNgRepositoryAccess.java:46)
            at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteLog.run(SvnRemoteLog.java:160)
            at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteLog.run(SvnRemoteLog.java:35)
            at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)
            at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1235)
            at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
            at org.tmatesoft.svn.core.wc.SVNLogClient.doLog(SVNLogClient.java:968)
            at org.tmatesoft.svn.core.wc.SVNLogClient.doLog(SVNLogClient.java:873)
            at hudson.scm.SubversionChangeLogBuilder.buildModule(SubversionChangeLogBuilder.java:194)
            Caused: hudson.util.IOException2: revision check failed on svn://localhost/libraries/lib1/trunk
            at hudson.scm.SubversionChangeLogBuilder.buildModule(SubversionChangeLogBuilder.java:208)
            at hudson.scm.SubversionChangeLogBuilder.run(SubversionChangeLogBuilder.java:138)
            at hudson.scm.SubversionSCM.calcChangeLog(SubversionSCM.java:730)
            at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:865)
            at hudson.scm.SCM.checkout(SCM.java:495)
            at hudson.model.AbstractProject.checkout(AbstractProject.java:1276)
            at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:560)
            at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
            at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:485)
            at hudson.model.Run.execute(Run.java:1735)
            at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
            at hudson.model.ResourceController.execute(ResourceController.java:97)
            at hudson.model.Executor.run(Executor.java:405)
            I managed to reproduce the error with a clean standalone repository in the hope, this gives a help to fix the problem. So here is, how to reproduce it (using the scripts in the attached archive):
             * Step 1:
            Create an empty folder, change into that folder and run "build-svn-repo.sh"
            This will create a local svn repository and start an svnserve process on that repo.
             * Step 2:
            Create a jenkins job. Important settings:
            Subversion url: svn://localhost/projects/project1/mainproject/trunk
            Credentials : user "jenkins" password "testit"
            Ignore externals must NOT be set
             * Step 3:
            Manually run that job once (will pass)


             * Step 4:
            Add some changes to the repository using script "touch-project.sh"


             * Step 5:
            Manually run the job on jenkins again.
            It will fail with the exception

             

            If you have any questions, please comment this issue...

             
            We have projects, which make heavy use of svn:externals inside the same subversion repository. Before updating to a new buildserver we used hudson on ubuntu 12.04 and had no problems ever. Now switching to ubuntu 16.04.2 LTS and jenkins 2.60.2, we observe the following issue:

            _Whenever_ there is made a change to some library code, the first build after the change fails on jenkins, while jenkins tries to get the change history. The message is:
             No changes for svn://localhost/projects/project1/mainproject/trunk since the previous build
             No changes for svn://localhost/projects/project1/subproject1/trunk since the previous build
             Using sole credentials <none> in realm ‘<svn://localhost:3690> 17f7f5c1-6bce-49a2-b114-55f687de97a3’
             org.tmatesoft.svn.core.SVNAuthenticationException: svn: E170001: Authentication required for '17f7f5c1-6bce-49a2-b114-55f687de97a3'
             at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:68)
             at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:57)
             at org.tmatesoft.svn.core.internal.io.svn.sasl.SVNSaslAuthenticator.createSaslClient(SVNSaslAuthenticator.java:318)
             at org.tmatesoft.svn.core.internal.io.svn.sasl.SVNSaslAuthenticator.authenticate(SVNSaslAuthenticator.java:92)
             at org.tmatesoft.svn.core.internal.io.svn.SVNConnection.authenticate(SVNConnection.java:198)
             at org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.authenticate(SVNRepositoryImpl.java:1296)
             at org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.openConnection(SVNRepositoryImpl.java:1274)
             at org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.getLatestRevision(SVNRepositoryImpl.java:172)
             at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgRepositoryAccess.getRevisionNumber(SvnNgRepositoryAccess.java:119)
             at org.tmatesoft.svn.core.internal.wc2.SvnRepositoryAccess.getLocations(SvnRepositoryAccess.java:195)
             at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgRepositoryAccess.createRepositoryFor(SvnNgRepositoryAccess.java:46)
             at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteLog.run(SvnRemoteLog.java:160)
             at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteLog.run(SvnRemoteLog.java:35)
             at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)
             at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1235)
             at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
             at org.tmatesoft.svn.core.wc.SVNLogClient.doLog(SVNLogClient.java:968)
             at org.tmatesoft.svn.core.wc.SVNLogClient.doLog(SVNLogClient.java:873)
             at hudson.scm.SubversionChangeLogBuilder.buildModule(SubversionChangeLogBuilder.java:194)
             Caused: hudson.util.IOException2: revision check failed on svn://localhost/libraries/lib1/trunk
             at hudson.scm.SubversionChangeLogBuilder.buildModule(SubversionChangeLogBuilder.java:208)
             at hudson.scm.SubversionChangeLogBuilder.run(SubversionChangeLogBuilder.java:138)
             at hudson.scm.SubversionSCM.calcChangeLog(SubversionSCM.java:730)
             at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:865)
             at hudson.scm.SCM.checkout(SCM.java:495)
             at hudson.model.AbstractProject.checkout(AbstractProject.java:1276)
             at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:560)
             at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
             at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:485)
             at hudson.model.Run.execute(Run.java:1735)
             at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
             at hudson.model.ResourceController.execute(ResourceController.java:97)
             at hudson.model.Executor.run(Executor.java:405)
             I managed to reproduce the error with a clean standalone repository in the hope, this gives a help to fix the problem. So here is, how to reproduce it (using the scripts attached):
             * Step 1:
             Create an empty folder, change into that folder and run "build-svn-repo.sh"
             This will create a local svn repository and start an svnserve process on that repo.
             * Step 2:
             Create a jenkins job. Important settings:
             Subversion url: svn://localhost/projects/project1/mainproject/trunk
             Credentials : user "jenkins" password "testit"
             Ignore externals must NOT be set
             * Step 3:
             Manually run that job once (will pass)

             * Step 4:
             Add some changes to the repository using script "touch-project.sh"

             * Step 5:
             Manually run the job on jenkins again.
             It will fail with the exception

             

            If you have any questions, please comment this issue...

             
            jjvbintec Jørgen von Bargen made changes -
            Environment Jenkins 2.60.2
            Ubuntu 16.04.2 LTS
            standard installation from apt
            Jenkins 2.60.2, 2.60.3
            Ubuntu 16.04.2 LTS
            standard installation from apt

            Seems to be fixed with Jenkins 2.73.1

            jjvbintec Jørgen von Bargen added a comment - Seems to be fixed with Jenkins 2.73.1
            jjvbintec Jørgen von Bargen made changes -
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Closed [ 6 ]

            Now it did happen with Jenkins 2.73.1 too :-/

            jjvbintec Jørgen von Bargen added a comment - Now it did happen with Jenkins 2.73.1 too :-/
            jjvbintec Jørgen von Bargen made changes -
            Assignee Emilio Escobar [ escoem ]
            Resolution Fixed [ 1 ]
            Status Closed [ 6 ] Reopened [ 4 ]
            ifernandezcalvo Ivan Fernandez Calvo made changes -
            Link This issue duplicates JENKINS-32167 [ JENKINS-32167 ]
            ifernandezcalvo Ivan Fernandez Calvo made changes -
            Resolution Duplicate [ 3 ]
            Status Reopened [ 4 ] Closed [ 6 ]

            Code changed in jenkins
            User: Liya
            Path:
            src/main/java/hudson/scm/SubversionChangeLogBuilder.java
            src/main/java/hudson/scm/SubversionSCM.java
            http://jenkins-ci.org/commit/subversion-plugin/9547f74d23d65545e06fc26d340d92db165e5eb9
            Log:
            JENKINS-45801 and JENKINS-49219, when calculate change log of externals, add module location's credentials as default credentials (#212)

            • when calculate change log of externals add module location's credentials as default credentials, fix JENKINS-45801 and JENKINS-49219

            *NOTE:* This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

            Functionality will be removed from GitHub.com on January 31st, 2019.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Liya Path: src/main/java/hudson/scm/SubversionChangeLogBuilder.java src/main/java/hudson/scm/SubversionSCM.java http://jenkins-ci.org/commit/subversion-plugin/9547f74d23d65545e06fc26d340d92db165e5eb9 Log: JENKINS-45801 and JENKINS-49219 , when calculate change log of externals, add module location's credentials as default credentials (#212) when calculate change log of externals add module location's credentials as default credentials, fix JENKINS-45801 and JENKINS-49219 * NOTE: * This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/ Functionality will be removed from GitHub.com on January 31st, 2019.

            Resolved with JENKINS-32167

            jjvbintec Jørgen von Bargen added a comment - Resolved with JENKINS-32167

            People

              Unassigned Unassigned
              jjvbintec Jørgen von Bargen
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: