简体   繁体   English

Jenkins Build因SVNException而失败

[英]Jenkins Build fails with SVNException

I am trying to run a jenkins build. 我正在尝试运行jenkins构建。 The below is my configuration. 以下是我的配置。

Jenkins Version : 1.445 詹金斯版本:1.445
Deployment : as a WAR 部署:作为WAR
Java : 1.7 (Server 64 bit) Java:1.7(服务器64位)
Tomcat Ver : 7.0.23 Tomcat Ver:7.0.23

It gives the following error: 它给出以下错误:

Started by user jenkins-admin
Updating https://myrepo.mycompany.com/svn/repos/myrepo
ERROR: Failed to update https://myrepo.mycompany.com/svn/repos/myrepo
    org.tmatesoft.svn.core.SVNException: svn: OPTIONS /svn/repos/myrepo failed
    at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:298)
    at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:283)
    at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:271)
    at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.exchangeCapabilities(DAVConnection.java:533)
    at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.open(DAVConnection.java:98)
    at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.openConnection(DAVRepository.java:1011)
    at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getRepositoryUUID(DAVRepository.java:148)
    at org.tmatesoft.svn.core.wc.SVNBasicClient.createRepository(SVNBasicClient.java:342)
    at org.tmatesoft.svn.core.wc.SVNBasicClient.createRepository(SVNBasicClient.java:330)
    at org.tmatesoft.svn.core.wc.SVNUpdateClient.update(SVNUpdateClient.java:535)
    at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:401)
    at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:135)
    at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:136)
    at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:787)
    at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:768)
    at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:752)
    at hudson.FilePath.act(FilePath.java:783)
    at hudson.FilePath.act(FilePath.java:765)
    at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:742)
    at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:684)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1195)
    at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:571)
    at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:460)
    at hudson.model.Run.run(Run.java:1404)
    at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:481)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:238)
Caused by: org.tmatesoft.svn.core.SVNErrorMessage: svn: OPTIONS /svn/repos/myrepo failed
    at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:200)
    at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:146)
    at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:89)
    ... 27 more
Caused by: org.tmatesoft.svn.core.SVNException: svn: OPTIONS request failed on '/svn/repos/myrepo'
svn: unknown host
    at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64)
    at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)

The problem is it does NOT fail all the time. 问题是它不会一直失败。 However, it fails 70-80% of the time. 但是,它失败了70-80%的时间。 The credentials and the URL for svn repo are correct. svn repo的凭据和URL是正确的。

UPDATE : I have tried every possibility now. 更新 :我现在已经尝试了所有可能性。 The problem persists. 问题依然存在。 I tried with JDK 6 (both 32 and 64 bit). 我尝试使用JDK 6(32位和64位)。 The problem does NOT go. 问题不会发生。

I am working on RHEL 5.6. 我正在研究RHEL 5.6。 Can anybody please help? 有人可以帮忙吗?

I noticed this line: 我注意到这一行:

Caused by: org.tmatesoft.svn.core.SVNException: svn: OPTIONS request failed on '/svn/repos/myrepo'
svn: unknown host

Whenever I have a problem with Jenkins, I log into the Jenkins system as the user running Jenkins, go to the working directory inside Jenkins, and from a command line, try to do whatever Jenkins is attempting to do (like update my working directory). 每当我遇到Jenkins问题时,我都会以运行Jenkins的用户身份登录Jenkins系统,转到Jenkins内部的工作目录,并从命令行尝试做Jenkins尝试做的事情(比如更新我的工作目录) 。 That usually will help you point out a particular error. 这通常可以帮助您指出特定的错误。

Try running an update a few times from the Jenkin's job's working directory and see if you get the same error. 尝试从Jenkin的工作目录中运行几次更新,看看是否收到同样的错误。 If you do, it could point out a network issue (unknown host). 如果这样做,它可能指出网络问题(未知主机)。

If you can run updates from the working directory on your Jenkins server in your job's working directory, then the problem may lie with SVNKit itself. 如果您可以在作业的工作目录中的Jenkins服务器上的工作目录中运行更新,那么问题可能在于SVNKit本身。 What version of Subversion and SVNKit are you using? 您使用的是什么版本的Subversion和SVNKit?

Try deleting the working directory and see if a clean checkout helps. 尝试删除工作目录,看看干净的结帐是否有帮助。

I noticed this error after upgrading my "Jenkins Subversion Plugin" from v1.42 to v1.44. 将我的“Jenkins Subversion插件”从v1.42升级到v1.44后,我注意到了这个错误。

To Fix: Please check the version of "Jenkins Subversion plugin" if it v1.44, downgrade to lower version. 修复:请检查“Jenkins Subversion插件”的版本,如果它是v1.44,降级到较低版本。

Seems like we have some issues with the new Subversion Plugin. 好像我们在使用新的Subversion插件时遇到了一些问题。

I have faced the same issue in Jenkins. 我在詹金斯遇到过同样的问题。 It was kept on failing during checking out the code. 在检查代码时它一直处于失败状态。 I tried to increase Jenkins work space but it was prompted for the crowd authentication. 我试图增加Jenkins的工作空间但是它被提示进行人群认证。 It was failed to update and I tried clear the authentication date from subversion and restarted my build server (You can log out with your credentials and log-in). 它无法更新,我尝试从subversion清除身份验证日期并重新启动我的构建服务器(您可以使用您的凭据注销并登录)。 This will work. 这会奏效。

The node running the build can not resolve the host name. 运行构建的节点无法解析主机名。 Possibly a fully qualified name is required: rather than mysvnbox something like mysvnbox.mydomain.com; 可能需要一个完全限定的名称:而不是像mysvnbox.mydomain.com这样的mysvnbox; Or possibly the node is blocked by a firewall. 或者可能该节点被防火墙阻止。 The fact that it works sometimes would seem to indicate at least one node has visibility or can use an abbreviated domain specification. 它有时工作的事实似乎表明至少有一个节点具有可见性或可以使用缩写域规范。 Good luck. 祝好运。

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

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