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

SVNAuthenticationException while estimating the SVN server's timestamp

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • subversion-plugin
    • None

      The Subversion plugin of Hudson tries to estimate the remote timestamp of the Subversion server. It uses the root URL of the Subversion Repository, which fails if the Subversion Repository has a special security configuration that denies access to the root of the Subversion repository.

      Example:

      https://server/svn --> Hudson has no access
      https://server/svn/project --> Hudson has access

      The project's subversion location is https://server/svn/project, but Hudson tries to estimate the remote timestamp with the URL https://server/svn.

      This exception is logged:

      hudson.subversion.SubversionSCM: Failed to estimate the remote timestamp
      org.tmatesoft.svn.core.SVNAuthenticationException: svn: PROPFIND of '/svn': 403 Forbidden

      Possible solutions to the problem:

      • Use the full URL to estimate the remote timestamp
      • Catch the SVNAuthenticationException and try again with the full URL

          [JENKINS-5750] SVNAuthenticationException while estimating the SVN server's timestamp

          mka2 added a comment -

          Please try this patch (hudson/plugins/subversion/src/main/java/hudson/scm/SubversionSCM.java):

          Replace the line
          SVNDirEntry dir = manager.createRepository(l.getSVNURL(),true).info("/",-1);

          with this line:
          SVNDirEntry dir = manager.createRepository(l.getSVNURL(),true).info("",-1);

          mka2 added a comment - Please try this patch (hudson/plugins/subversion/src/main/java/hudson/scm/SubversionSCM.java): Replace the line SVNDirEntry dir = manager.createRepository(l.getSVNURL(),true).info("/",-1); with this line: SVNDirEntry dir = manager.createRepository(l.getSVNURL(),true).info("",-1);

          DahuChaoo added a comment -

          It's very strange because just after the HUDSON Job creation, the connexion goes ok. But after one execution, when i edit the configuration of the JOB, i can see this message just after the "URL du repository" field :
          Unable to access http://n44024f1t40pro:82/svn/mosaic/tronc/mosu1 : svn: OPTIONS of '/svn/mosaic/tronc/mosu1': 403 Forbidden (http://n44024f1t40pro:82) (show details)

          org.tmatesoft.svn.core.SVNAuthenticationException: svn: OPTIONS of '/svn/mosaic/tronc/mosu1': 403 Forbidden (http://n44024f1t40pro:82)

          DahuChaoo added a comment - It's very strange because just after the HUDSON Job creation, the connexion goes ok. But after one execution, when i edit the configuration of the JOB, i can see this message just after the "URL du repository" field : Unable to access http://n44024f1t40pro:82/svn/mosaic/tronc/mosu1 : svn: OPTIONS of '/svn/mosaic/tronc/mosu1': 403 Forbidden ( http://n44024f1t40pro:82 ) (show details) org.tmatesoft.svn.core.SVNAuthenticationException: svn: OPTIONS of '/svn/mosaic/tronc/mosu1': 403 Forbidden ( http://n44024f1t40pro:82 )

          mkm13 added a comment -

          I have a similar problem when updating a project that has externals. The SVN-User hudson is using has no rights to the base URL of the repo. Updating some non-external files seems to work fine, but then I get an exception similar to that of dahuchaoo:

          Updating https://svn.company.com/svn/REPO1/PROJECT/trunk
          AU src/com/company/package-info.java
          AU ...
          ERROR: Failed to update https://svn.company.com/svn/REPO1/PROJECT/trunk
          org.tmatesoft.svn.core.SVNAuthenticationException: svn: OPTIONS of '/svn/REPO1': 403 Forbidden (https://svn.company.com)
          at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:62)
          at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)
          at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:610)

          A clean checkout works fine, so my current workaround is to do just that on every build, but regularly pulling 100+MB from a remote server is not something I'd call a permanent solution. Could someone please fix this?

          mkm13 added a comment - I have a similar problem when updating a project that has externals. The SVN-User hudson is using has no rights to the base URL of the repo. Updating some non-external files seems to work fine, but then I get an exception similar to that of dahuchaoo: Updating https://svn.company.com/svn/REPO1/PROJECT/trunk AU src/com/company/package-info.java AU ... ERROR: Failed to update https://svn.company.com/svn/REPO1/PROJECT/trunk org.tmatesoft.svn.core.SVNAuthenticationException: svn: OPTIONS of '/svn/REPO1': 403 Forbidden ( https://svn.company.com ) at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:62) at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:610) A clean checkout works fine, so my current workaround is to do just that on every build, but regularly pulling 100+MB from a remote server is not something I'd call a permanent solution. Could someone please fix this?

          jan_ruzicka added a comment -

          Is this caused by old version of SVN server?

          jan_ruzicka added a comment - Is this caused by old version of SVN server?

          Xiaru Yang added a comment -

          I met the same problem. Is it fixed?

          Xiaru Yang added a comment - I met the same problem. Is it fixed?

            Unassigned Unassigned
            mka2 mka2
            Votes:
            9 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated: