Jenkins 使用Tfs 插件出现 MappingConflictException 错误问题解决
FATAL: com.microsoft.tfs.core.clients.versioncontrol.exceptions.MappingConflictException: The path C:\JenkinsAgent\workspace\TestSystem is already mapped in workspace Hudson-TestSystem-XA-AT-SYSDEV;abcd. Also: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from XA-AT-SYSDEV/10.32.2.184:2013 at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1741) at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357) at hudson.remoting.Channel.call(Channel.java:955) at hudson.plugins.tfs.model.Server.execute(Server.java:233) at hudson.plugins.tfs.model.Workspaces.newWorkspace(Workspaces.java:109) at hudson.plugins.tfs.actions.CheckoutAction.getProject(CheckoutAction.java:144) at hudson.plugins.tfs.actions.CheckoutAction.checkout(CheckoutAction.java:59) at hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:352) at hudson.scm.SCM.checkout(SCM.java:504) at hudson.model.AbstractProject.checkout(AbstractProject.java:1208) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499) at hudson.model.Run.execute(Run.java:1810) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) com.microsoft.tfs.core.clients.versioncontrol.exceptions.MappingConflictException: The path C:\JenkinsAgent\workspace\TestSystem is already mapped in workspace Hudson-TestSystem-XA-AT-SYSDEV;GRAPECITY\Component Test. at com.microsoft.tfs.core.clients.versioncontrol.workspacecache.internal.InternalCache.checkForMappingConflicts(InternalCache.java:212) at com.microsoft.tfs.core.clients.versioncontrol.workspacecache.internal.InternalCache.checkForMappingConflicts(InternalCache.java:176) at com.microsoft.tfs.core.clients.versioncontrol.VersionControlClient.createWorkspace(VersionControlClient.java:1014) at com.microsoft.tfs.core.clients.versioncontrol.VersionControlClient.createWorkspace(VersionControlClient.java:950) at hudson.plugins.tfs.model.MockableVersionControlClient.createWorkspace(MockableVersionControlClient.java:114) at hudson.plugins.tfs.commands.NewWorkspaceCommand.call(NewWorkspaceCommand.java:81) at hudson.plugins.tfs.commands.NewWorkspaceCommand.call(NewWorkspaceCommand.java:24) at hudson.remoting.UserRequest.perform(UserRequest.java:212) at hudson.remoting.UserRequest.perform(UserRequest.java:54) at hudson.remoting.Request$2.run(Request.java:369) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:93) at java.lang.Thread.run(Unknown Source) Caused: java.lang.RuntimeException at hudson.plugins.tfs.model.Server.execute(Server.java:237) at hudson.plugins.tfs.model.Workspaces.newWorkspace(Workspaces.java:109) at hudson.plugins.tfs.actions.CheckoutAction.getProject(CheckoutAction.java:144) at hudson.plugins.tfs.actions.CheckoutAction.checkout(CheckoutAction.java:59) at hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:352) at hudson.scm.SCM.checkout(SCM.java:504) at hudson.model.AbstractProject.checkout(AbstractProject.java:1208) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499) at hudson.model.Run.execute(Run.java:1810) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429)
出现这个问题的原因是 TFS 的配置文件中保存的信息和现在Jenkins 服务器上配置的信息不匹配导致的。
方案1: 修改Agent 中 Remote root directory 目录位置,修改后就可以回避错误了。
方案2:使用 vs --> Source Control Explorer --> Workspace 的下拉框中选择 Workspace 打开 Manager Workspaces.
将有问题的workspace 删除就可以了。
标签:
Jenkins
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 零经验选手,Compose 一天开发一款小游戏!
· 一起来玩mcp_server_sqlite,让AI帮你做增删改查!!