Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins Subversion Checkout Failing - "E175002: CRLF expected at end of chunk: -1/-1"

I have a Jenkins v2.107.2 instance (running as a Windows service) which is checking out several projects via Subversion from a Visual SVN Server (on a seperate Windows PC).

One of the projects (the largest - ~2.7GB) is occasionally, but then consistently failing with the following error when attempting to checkout:

ERROR: Failed to check out https://example.com/myrepo
org.tmatesoft.svn.core.SVNException: svn: E175002: CRLF expected at end of chunk: -1/-1
svn: E175002: REPORT request failed on '/svn/REPO/!svn/vcc/default'
    at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:112)

In addition, when checking the logs of the Visual SVN Server, I can see the following:

Error writing base64 data: The timeout specified has expired  [500, #70007]
A failure occurred while driving the update report editor  [500, #70007]
Provider encountered an error while streaming a REPORT response.  [500, #0]

Previously, some combination of downgrading Jenkins & the Subversion plugin by one version resolved this error, but despite having not changed versions since, this no longer works.

From looking online, there seems to be some sort of timeout built into Subversion where requests will be killed if going over a certain time. However, the instructions all refer to the Subversion config that should be in %APPDATA%\Roaming, which I do not seem to have.

The Jenkins Subversion documentation suggests C:\Windows\SysWOW64\config\systemprofile\AppData\Roaming, but again I have nothing there. I've installed TortoiseSVN, which did create the Subversion configuration folder. I've modified the http-timeout, and then put this configuration in all the locations suggested by the documentation, but this has not made any difference (but whether it's because it doesn't fix the issue, or it's not being picked up - I'm not sure).

like image 300
Jakg Avatar asked May 04 '18 12:05

Jakg


3 Answers

This error E175002: CRLF expected at end of chunk: -1/-1 can occur with products that use SVNKit to support Subversion - Jenkins, Fisheye, Crucible etc. The bug should not occur with svn.exe, TortoiseSVN or native JavaHL libraries.

Per my experience, the following solution solves the problem - enable Spooling in SVNKit. See these tickets:

  • https://issues.jenkins-ci.org/browse/JENKINS-44307
  • https://issues.tmatesoft.com/issue/SGT-989.

The error is produced by SVNKit which is used in Jenkins to enable SVN client capabilities. SVNKit is a separate re-implementation of Subversion and SVNKit might have its own specifics that could result in issues or errors that does not occur with actual Apache Subversion client. I'm not an expert in SVNKit, but it seems to me that you've encountered such SVNKit-specific issue or at least error wording.

like image 64
bahrep Avatar answered Sep 28 '22 18:09

bahrep


You need to enable spooling.

See this Jenkins support issue, although this dupe issue describes the solution better:

Set the -Dhudson.spool-svn=true system property or increase timeout on the server.

like image 40
Jakg Avatar answered Sep 28 '22 16:09

Jakg


For Jenkins on Windows you need to edit jenkins.xml file located in Jenkins installation directory (e.g. C:\Program Files\Jenkins\jenkins.xml).

Add an option for Hudson to use SVN spooling

<service>
  ...
  <arguments>
     ...
     -Dhudson.spool-svn=true
     ...
   </arguments>
   ...
</service>
like image 39
dizarter Avatar answered Sep 28 '22 18:09

dizarter