简体   繁体   English

如何在Jenkins Slave上修复我的SVN结账?

[英]How do I fix my SVN checkout on my Jenkins Slave?

I have spent a few days trying to get Jenkins working with svn. 我花了几天时间试图让Jenkins和svn一起工作。

On the master, when I configure the svn url, it validates the URL. 在主服务器上,当我配置svn url时,它会验证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. 我已经尝试在jenkins配置页面上选择所有不同版本的svn。

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. 我已经检查过,在subversion enterCredential页面输入错误的信息会导致错误,输入正确的信用卡可以让它通过。

We are using basic svn auth over http (on port 8080). 我们使用基本的svn auth over http(在端口8080上)。

The URL validation in the job config passes okay, but the job running on the slave still throws the below exception. 作业配置中的URL验证通过正常,但在从属服务器上运行的作业仍会抛出以下异常。

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. 奴隶是Mac OS X,主人是Windows Server 2008。

Jenkins in running 1.504 (Tried with 1.502). 詹金斯在运行1.504(尝试1.502)。 We are using svn 1.6. 我们正在使用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: 我不得不删除新的jar:
cd /var/lib/jenkins/plugins/subversion/WEB-INF/lib cd / var / lib / jenkins / plugins / subversion / WEB-INF / lib
mv svnkit-1.7.10-jenkins-1.jar /tmp mv svnkit-1.7.10-jenkins-1.jar / tmp
/etc/init.d/jenkins restart and it worked! /etc/init.d/jenkins重启并且工作正常! 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 在C:\\ Program Files(x86)\\ Jenkins \\ plugins \\ subversion \\ WEB-INF \\ lib中有一个旧的svnkit-1.3.6.1-jenkins-2.jar

Shutting down jenkins and deleting this file solved the issue. 关闭jenkins并删除此文件解决了这个问题。

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

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