简体   繁体   中英

Jenkins Build fails with SVNException

I am trying to run a jenkins build. The below is my configuration.

Jenkins Version : 1.445
Deployment : as a WAR
Java : 1.7 (Server 64 bit)
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. The credentials and the URL for svn repo are correct.

UPDATE : I have tried every possibility now. The problem persists. I tried with JDK 6 (both 32 and 64 bit). The problem does NOT go.

I am working on 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). 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. 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. What version of Subversion and SVNKit are you using?

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.

To Fix: Please check the version of "Jenkins Subversion plugin" if it v1.44, downgrade to lower version.

Seems like we have some issues with the new Subversion Plugin.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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