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

妖精的绣舞 提交于 2020-12-11 10:01:30

问题


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).


回答1:


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.




回答2:


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.




回答3:


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>


来源:https://stackoverflow.com/questions/50174579/jenkins-subversion-checkout-failing-e175002-crlf-expected-at-end-of-chunk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!