c++ - Jenkins 构建在 Windows 上因 GitLockFailedException 而失败

标签 c++ git jenkins

我正在设置一个运行 Windows XP 的 Jenkins 从站来构建一个基于 C++ 的项目。空作业运行良好,因此我得出结论,基本功能正在运行。不过,当我尝试将 git 存储库添加到克隆时,我收到错误消息:

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(没有帮助),尝试在 Run Windows Command 构建步骤中手动 git clone (有效,但需要更多努力). 可能是什么问题?

最佳答案

我会说您必须将 Jenkins 更新到最新版本。它很可能会解决问题。

并且不要忘记在 Configure->Node Properties->Tool Locations 中覆盖 Windows 节点的 git 设置。

关于c++ - Jenkins 构建在 Windows 上因 GitLockFailedException 而失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21235120/

相关文章:

Git:如何从 "no branch"推送到一个新的远程分支?

ubuntu - 子域 + nginx + 反向代理 + jenkins + gitlab

Jenkins 声明式管道 - 如何获取正在使用的 Jenkinsfile 的路径?

maven - 当 github commit 触发构建时,Jenkins autobuild 进入循环

c++ - 将 GSL 与 Xcode 集成

github只能通过VPN访问

c++ - FlatBuffers 中的 original_order 和数组

git - 使用 git 进行压力测试

c++ - Curl 很慢(我假设我没有正确设置选项)

c++ - 如何从另一个类调用指向成员函数的指针?