在Windows上,Jenkins构建失败并出现GitLockFailedException

时间:2014-01-20 13:14:34

标签: c++ git jenkins

我正在建立一个运行Windows XP的Jenkins'奴隶,以构建一个基于C++的项目。空作业运行良好,因此我得出结论基本功能正常。但是,当我尝试添加git repo进行克隆时,我收到错误:

19:50:34 Started by user a.rogozhnikov
19:50:34 Собирается удаленно на build-winxp in workspace c:\jenkins\workspace\ATM-windows
19:50:34 java.io.IOException: remote file operation failed: c:\jenkins\workspace\ATM-windows at hudson.remoting.Channel@223813db:build-winxp
19:50:34    at hudson.FilePath.act(FilePath.java:910)
19:50:34    at hudson.FilePath.act(FilePath.java:887)
19:50:34    at org.jenkinsci.plugins.gitclient.Git.getClient(Git.java:66)
19:50:34    at hudson.plugins.git.GitSCM.createClient(GitSCM.java:569)
19:50:34    at hudson.plugins.git.GitSCM.createClient(GitSCM.java:561)
19:50:34    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:866)
19:50:34    at hudson.model.AbstractProject.checkout(AbstractProject.java:1414)
19:50:34    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:652)
19:50:34    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
19:50:34    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:561)
19:50:34    at hudson.model.Run.execute(Run.java:1678)
19:50:34    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
19:50:34    at hudson.model.ResourceController.execute(ResourceController.java:88)
19:50:34    at hudson.model.Executor.run(Executor.java:231)
19:50:34 Caused by: java.io.IOException: Remote call on build-winxp failed
19:50:34    at hudson.remoting.Channel.call(Channel.java:731)
19:50:34    at hudson.FilePath.act(FilePath.java:903)
19:50:34    ... 13 more
19:50:34 Caused by: java.lang.NoClassDefFoundError: hudson/plugins/git/GitLockFailedException
19:50:34    at org.jenkinsci.plugins.gitclient.Git$1.invoke(Git.java:63)
19:50:34    at org.jenkinsci.plugins.gitclient.Git$1.invoke(Git.java:54)
19:50:34    at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2461)
19:50:34    at hudson.remoting.UserRequest.perform(UserRequest.java:118)
19:50:34    at hudson.remoting.UserRequest.perform(UserRequest.java:48)
19:50:34    at hudson.remoting.Request$2.run(Request.java:328)
19:50:34    at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
19:50:34    at java.util.concurrent.FutureTask.run(Unknown Source)
19:50:34    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
19:50:34    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
19:50:34    at hudson.remoting.Engine$1$1.run(Engine.java:63)
19:50:34    at java.lang.Thread.run(Unknown Source)
19:50:34 Caused by: java.lang.ClassNotFoundException: hudson.plugins.git.GitLockFailedException
19:50:34    at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1365)
19:50:34    at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1315)
19:50:34    at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1068)
19:50:34    at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
19:50:34    at hudson.remoting.RemoteClassLoader$ClassLoaderProxy.fetch4(RemoteClassLoader.java:742)
19:50:34    at hudson.remoting.RemoteClassLoader$ClassLoaderProxy.fetch3(RemoteClassLoader.java:784)
19:50:34    at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
19:50:34    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
19:50:34    at java.lang.reflect.Method.invoke(Method.java:622)
19:50:34    at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:299)
19:50:34    at hudson.remoting.Request$2.run(Request.java:328)
19:50:34    at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
19:50:34    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
19:50:34    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
19:50:34    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
19:50:34    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
19:50:34    at java.lang.Thread.run(Thread.java:701)
19:50:34 Finished: FAILURE

搜索GitLockFailedException没有任何线索,我想我错过了一些东西。 我尝试以常规用户身份运行Jenkins Slave Service(没有帮助),尝试在git clone构建步骤中手动Run Windows Command(工作,但需要更多努力)。 可能是什么问题?

1 个答案:

答案 0 :(得分:1)

我想说你必须将Jenkins更新到最新版本。很有可能它会解决这个问题。

并且不要忘记在配置 - >节点属性 - >工具位置中覆盖Windows节点的git设置。