我正在尝试运行jenkins构建.以下是我的配置.
jenkins版本:1.445
部署:作为WAR
Java:1.7(服务器64位)
Tomcat Ver:7.0.23
它给出以下错误:
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)
问题是它不会一直失败.但是,它失败了70-80%的时间.
svn repo的凭据和URL是正确的.
更新:我现在已经尝试了所有可能性.问题依然存在.
我尝试使用JDK 6(32位和64位).问题不会发生.
我正在研究RHEL 5.6.有人可以帮忙吗?
解决方法
我注意到这一行:
Caused by: org.tmatesoft.svn.core.SVNException: svn: OPTIONS request Failed on '/svn/repos/myrepo' svn: unknown host
每当我遇到Jenkins问题时,我都会以运行Jenkins的用户身份登录Jenkins系统,转到Jenkins内部的工作目录,并从命令行尝试做Jenkins尝试做的事情(比如更新我的工作目录) .这通常可以帮助您指出一个特定的错误.
尝试从Jenkin的工作目录中运行几次更新,看看是否收到相同的错误.如果这样做,它可能会指出网络问题(未知主机).
如果您可以在作业的工作目录中的Jenkins服务器上的工作目录中运行更新,那么问题可能在于SVNKit本身.您使用的是什么版本的Subversion和SVNKit?
尝试删除工作目录,看看干净的结账是否有帮助.