简体   繁体   中英

How do I fix my SVN checkout on my Jenkins Slave?

I have spent a few days trying to get Jenkins working with svn.

On the master, when I configure the svn url, it validates the URL.

I can do a checkout manually, and am running the slave as the same user as I did the test manual checkout.

I have tried selecting all the different versions of svn on the jenkins config page.

I have checked that entering the incorrect creds on the subversion enterCredential page results in an error, and entering the correct creds allows it to pass.

We are using basic svn auth over http (on port 8080).

The URL validation in the job config passes okay, but the job running on the slave still throws the below exception.

From my various readings of information gleened from the net I am pretty sure this is an authentication issue.

The slave is a Mac OS X, the master is a Windows Server 2008.

Jenkins in running 1.504 (Tried with 1.502). We are using svn 1.6.

Here is the exception:

Building remotely on Mac OS Test Node in workspace /Users/buildmachine/jenkins/xcode
hudson.util.IOException2: remote file operation failed: /Users/buildmachine/jenkins/xcode at hudson.remoting.Channel@1695eeb:Mac OS Test Node
at hudson.FilePath.act(FilePath.java:861)
at hudson.FilePath.act(FilePath.java:838)
at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:843)
at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:781)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1342)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:683)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:588)
at hudson.model.Run.execute(Run.java:1568)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:237)
Caused by: java.io.IOException: Remote call on Mac OS Test Node failed
at hudson.remoting.Channel.call(Channel.java:681)
at hudson.FilePath.act(FilePath.java:854)
... 11 more
Caused by: java.lang.NoSuchMethodError: org.tmatesoft.svn.core.wc.SVNBasicClient.getOperationsFactory()Lorg/tmatesoft/svn/core/wc2/SvnOperationFactory;
at hudson.scm.SvnClientManager.wrapUp(SvnClientManager.java:46)
at hudson.scm.SvnClientManager.getUpdateClient(SvnClientManager.java:67)
at hudson.scm.subversion.CheckoutUpdater$1.perform(CheckoutUpdater.java:71)
at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:153)
at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:903)
at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:884)
at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:867)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2348)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Finished: FAILURE

I had to remove the newer jar as well:
cd /var/lib/jenkins/plugins/subversion/WEB-INF/lib
mv svnkit-1.7.10-jenkins-1.jar /tmp
/etc/init.d/jenkins restart and it worked! Great Find!

Found the problem..

There was an old svnkit-1.3.6.1-jenkins-2.jar in C:\\Program Files (x86)\\Jenkins\\plugins\\subversion\\WEB-INF\\lib

Shutting down jenkins and deleting this file solved the issue.

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