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

Multi-Branch-Job with Subversion repo which contains externals fails on checkout

      When the multi-branch-job is configured with secured (credentials) svn repository which has external links, the checkout fails sometimes with an NullpointerException (It seems only the initial CO) or with an authentication cancelled error.

      Fetching '<some-external-link>' at -1 into '<jenkins-workspace>'
      java.lang.NullPointerException
      	at java.util.ArrayList.addAll(ArrayList.java:559)
      	at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:894)
      	at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:830)
      	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109)
      	at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:108)
      	at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:85)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:206)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:410)
      
      Fetching '<some-external-link>' at -1 into '<jenkins-workspace>'
      org.tmatesoft.svn.core.SVNCancelException: svn: E200015: authentication cancelled
      

      Maybe its related to JENKINS-21785 but in a multi-branch-job I can not add additional credentials in the job config.

          [JENKINS-35227] Multi-Branch-Job with Subversion repo which contains externals fails on checkout

          Niels Wegner added a comment -

          This issue seems to be more related to the multibranch plugin, added that as component

          Niels Wegner added a comment - This issue seems to be more related to the multibranch plugin, added that as component

          Remi Van Goethem added a comment - - edited

          Is there a reason why the pipeline multibranch plugin does not allow to add Additional Credential as part of the job definition?

          Normal pipeline plugin does allow to define Additional Credential.

          I do not mean in the Jenkinsfile but as job definition (before any Jenkinsfile code being executed)

          We are failing 50% of our build as a result. Would it be possible to add the same feature on the multibranch pipeline?

          Remi Van Goethem added a comment - - edited Is there a reason why the pipeline multibranch plugin does not allow to add Additional Credential as part of the job definition? Normal pipeline plugin does allow to define Additional Credential. I do not mean in the Jenkinsfile but as job definition (before any Jenkinsfile code being executed) We are failing 50% of our build as a result. Would it be possible to add the same feature on the multibranch pipeline?

          Éric Louvard added a comment -

          I also can observe this error when the SVN repository has externals and the Multi-Branch Pipeline tries to detect changes.
          I'm pasting hier a typical stacktrace when the Master tries do access the SVN repository.
          This Error do not happens each time. in most case, the job could be restarted manually and works.

          hudson.util.IOException2: revision check failed on https://svn.easysoft.....
          	at hudson.scm.SubversionChangeLogBuilder.buildModule(SubversionChangeLogBuilder.java:208)
          	at hudson.scm.SubversionChangeLogBuilder.run(SubversionChangeLogBuilder.java:138)
          	at hudson.scm.SubversionSCM.calcChangeLog(SubversionSCM.java:725)
          	at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:860)
          	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109)
          	at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:130)
          	at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:107)
          	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:232)
          	at hudson.model.ResourceController.execute(ResourceController.java:97)
          	at hudson.model.Executor.run(Executor.java:405)
          Caused by: org.tmatesoft.svn.core.SVNCancelException: svn: E200015: E200015: ISVNAuthentication provider did not provide credentials; HTTP authorization cancelled.
          svn: E200015: ISVNAuthentication provider did not provide credentials; HTTP authorization cancelled.
          	at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:66)
          	at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:57)
          	at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:798)
          	at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:391)
          	at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:379)
          	at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.performHttpRequest(DAVConnection.java:862)
          	at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.exchangeCapabilities(DAVConnection.java:698)
          	at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.open(DAVConnection.java:118)
          	at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.openConnection(DAVRepository.java:1049)
          	at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getLatestRevision(DAVRepository.java:189)
          	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)
          	... 9 more
          Caused by: org.tmatesoft.svn.core.SVNCancelException: svn: E200015: ISVNAuthentication provider did not provide credentials; HTTP authorization cancelled.
          	at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:728)
          	... 27 more
          Finished: FAILURE
          

          Regards, Éric.

          Éric Louvard added a comment - I also can observe this error when the SVN repository has externals and the Multi-Branch Pipeline tries to detect changes. I'm pasting hier a typical stacktrace when the Master tries do access the SVN repository. This Error do not happens each time. in most case, the job could be restarted manually and works. hudson.util.IOException2: revision check failed on https: //svn.easysoft..... at hudson.scm.SubversionChangeLogBuilder.buildModule(SubversionChangeLogBuilder.java:208) at hudson.scm.SubversionChangeLogBuilder.run(SubversionChangeLogBuilder.java:138) at hudson.scm.SubversionSCM.calcChangeLog(SubversionSCM.java:725) at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:860) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109) at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:130) at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:107) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:232) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:405) Caused by: org.tmatesoft.svn.core.SVNCancelException: svn: E200015: E200015: ISVNAuthentication provider did not provide credentials; HTTP authorization cancelled. svn: E200015: ISVNAuthentication provider did not provide credentials; HTTP authorization cancelled. at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:66) at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:57) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:798) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:391) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:379) at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.performHttpRequest(DAVConnection.java:862) at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.exchangeCapabilities(DAVConnection.java:698) at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.open(DAVConnection.java:118) at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.openConnection(DAVRepository.java:1049) at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getLatestRevision(DAVRepository.java:189) 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) ... 9 more Caused by: org.tmatesoft.svn.core.SVNCancelException: svn: E200015: ISVNAuthentication provider did not provide credentials; HTTP authorization cancelled. at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:728) ... 27 more Finished: FAILURE Regards, Éric.

          David Aldrich added a comment -

          This seems to be a show-stopper for multibranch pipeline jobs that run from a Subversion repo.

          The way to fix svn: E200015 seems to be to specify additional credentials, but the multibranch pipeline GUI doesn't support that.

          David Aldrich added a comment - This seems to be a show-stopper for multibranch pipeline jobs that run from a Subversion repo. The way to fix svn: E200015 seems to be to specify additional credentials, but the multibranch pipeline GUI doesn't support that.

          Jesse Glick added a comment -

          Is there a reason why the pipeline multibranch plugin does not allow to add Additional Credential as part of the job definition?

          Becuase no one has implemented this so far for SubversionSCMSource. Probably not difficult.

          Jesse Glick added a comment - Is there a reason why the pipeline multibranch plugin does not allow to add Additional Credential as part of the job definition? Becuase no one has implemented this so far for SubversionSCMSource . Probably not difficult.

          Rafael Funke added a comment -

          I implemented that and created a pull request: https://github.com/jenkinsci/subversion-plugin/pull/189

           

          Rafael Funke added a comment - I implemented that and created a pull request: https://github.com/jenkinsci/subversion-plugin/pull/189  

          David Aldrich added a comment -

          How can we get rfunke's pull request released?

          David Aldrich added a comment - How can we get rfunke 's pull request released?

          Hi,

          We have a number of subversion repositories which use external references.

          At some times, every build we try to perform fails with the "authentication cancelled" exception.

          This makes it pretty time-consuming when we need to release of our software.

          Can this issue be:

          1. given a higher priority
          2. assigned to someone so that the code gets integrated? (I tried the "automatic" assignee, but no one gets assigned...)

          Thank you in advance!

          With best regards,

          Tom.

          Tom Ghyselinck added a comment - Hi, We have a number of subversion repositories which use external references. At some times, every build we try to perform fails with the " authentication cancelled " exception. This makes it pretty time-consuming when we need to release of our software. Can this issue be: given a higher priority assigned to someone so that the code gets integrated? (I tried the " automatic " assignee, but no one gets assigned...) Thank you in advance! With best regards, Tom.

            Unassigned Unassigned
            larsmeynberg Lars Meynberg
            Votes:
            18 Vote for this issue
            Watchers:
            22 Start watching this issue

              Created:
              Updated:
              Resolved: