简体   繁体   中英

Jenkins build fails with GitLockFailedException on Windows

I am setting up a Jenkins' slave running Windows XP to build a C++ -based project. Empty jobs run fine, hence I conclude that basic functionality is working. Still, when I try to add a git repo to clone I get an error:

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

Searching for GitLockFailedException gives no clue and I think I'm missing something. I tried to run Jenkins Slave Service as regular user (didn't help), tried to manually git clone in the Run Windows Command build step (works, though requires more effort). What can be the problem?

I would say that you must update your Jenkins to the latest version. Very likely it will resolve the issue.

And do not forget to override git settings for Windows node in Configure->Node Properties->Tool Locations .

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