简体   繁体   English

SVN 签出有时在 Jenkins 中失败

[英]SVN checkout sometimes fails in Jenkins

We have been experiencing a problem for a while now with SVN checkouts in Jenkins.一段时间以来,我们在 Jenkins 中的 SVN 结账时遇到了问题。 It sometimes fails with the following error:它有时会失败并出现以下错误:

 org.tmatesoft.svn.core.SVNException: svn: E175002: Connection reset svn: E175002: REPORT request failed on '/Our-project/.svn/vcc/default' at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager:java.112) at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager:java.96) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection:java.765) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection:java.352) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection:java.340) at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.performHttpRequest(DAVConnection:java.910) at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.doReport(DAVConnection:java.363) at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.runReport(DAVRepository:java.1349) at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.update(DAVRepository:java.847) at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.updateInternal(SvnNgAbstractUpdate:java.263) at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.update(SvnNgAbstractUpdate:java.115) at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.checkout(SvnNgAbstractUpdate:java.877) at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgCheckout.run(SvnNgCheckout:java.26) at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgCheckout.run(SvnNgCheckout:java.11) at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgOperationRunner.run(SvnNgOperationRunner:java.20) at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner:java.21) at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory:java.1239) at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation:java.294) at hudson.scm.subversion.CheckoutUpdater$SubversionUpdateTask.perform(CheckoutUpdater:java.132) at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater:java.168) at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater:java.176) at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater:java.133) at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater:java.168) at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM:java.1040) at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM:java.1016) at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM:java.989) at hudson.FilePath$FileCallableWrapper.call(FilePath:java.3052) at hudson.remoting.UserRequest.perform(UserRequest:java.212) at hudson.remoting.UserRequest.perform(UserRequest:java.54) at hudson.remoting.Request$2.run(Request:java.369) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService:java.72) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at hudson.remoting.Engine$1.lambda$newThread$0(Engine:java.93) at java.lang.Thread:run(Unknown Source) Caused by. java.net:SocketException: Connection reset

Recently it has started to happen a lot more and it happens when the combination of one specific repo is checked out by one specific Jenkins node.最近它开始发生更多,当一个特定的回购组合被一个特定的 Jenkins 节点签出时,就会发生这种情况。 We have other nodes which are pretty much identical to this one where it practically never happens.我们还有其他节点与这个几乎从未发生过的节点几乎相同。 We have other repos (both significantly larger and smaller) which are being checked out just as much as this one, but hardly ever causes this problem.我们还有其他 repos(大得多和小得多),它们与这个 repos 一样多,但几乎不会导致这个问题。 This combination of repo and node seems to be very unfavourable.这种 repo 和 node 的组合似乎很不利。

It is worth noting that we are using a Jenkins plugin and doing the checkout via Groovy in the following way:值得注意的是,我们正在使用 Jenkins 插件并通过 Groovy 以下列方式进行结帐:

checkout(
    [$class: 'SubversionSCM',
    locations: 
    [
        [credentialsId: '6615cd79-bd58-42f8-1111-6fa9e5692f92',
         remote: <SVN URL>,
         local: 'our_dir']
    ],
    workspaceUpdater: [$class: 'UpdateWithCleanUpdater']])

When we instead checkout by running SVN command directly, we never run into this problem, meaning that the instability must reside in the plug-in.当我们通过直接运行 SVN 命令来检查时,我们从未遇到过这个问题,这意味着不稳定必须存在于插件中。 We do however need to keep using the plug-in for other reasons.但是,出于其他原因,我们确实需要继续使用该插件。

It also seems to happen more frequently when the node is stressed, ie when it is running multiple checkouts simultaneously on different executors.当节点受到压力时,它似乎也更频繁地发生,即当它同时在不同的执行器上运行多个检查时。

Any input on how to resolve this would be appreciated.任何有关如何解决此问题的意见将不胜感激。

We have unsuccessfully tried to use the -Dhudson.spool-svn flag discussed [here].我们尝试使用 [here] 讨论的-Dhudson.spool-svn标志未成功。 1 1

@m1haus I think I got it. @m1haus 我想我明白了。 It is occurring because it's fetching too many files from svn and timing out.这是因为它从 svn 获取太多文件并超时。 I just reduced the number of files and it worked我只是减少了文件的数量并且它起作用了

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM