开发者

ClearTool Error: Operation "get cleartext" failed: Permission denied

开发者 https://www.devze.com 2022-12-12 07:03 出处:网络
When trying to compile a project with TeamCity, I am getting an error from cleartool: \"get cleartext\" failed: Permission denied.

When trying to compile a project with TeamCity, I am getting an error from cleartool:

"get cleartext" failed: Permission denied.

The command that is failing is a call to cleartool get:

cleartool get -to C:\TeamCity\temp\cc_35875temp V:\andrew_CI_view\My_vob\MyProject@@\main\branch\7\Apps\main\branch\1\MyProject.Apps.FileTransferUtility\main\branch\1\App.xaml\main\branch\1

What's strange though, is that if I manually execute this command from the command line, it works fine (ERRORLEVEL is 0, no error messages, etc).

Has anyone else seen such a message, or have any idea what could be wrong?


Here are the details of my setup:

  • TeamCity Professional Version 4.5.5 (build 9103)
  • TeamCity is using the my user account for its Build Agent.
  • TeamCity is attempting to connect to a ClearCase Dynamic view: D:\CCdata\snapview\andrew_CI_view

Settings from the Administration > Edit Build Configuration > Edit VCS Root Page:

  • Type of VCS: ClearCase
  • ClearCase View Path: V:\andrewCIview
  • Relative path within the view: My_vob\MyProject
  • Use ClearCase: BASE
  • No Checkout Rules

ClearCase 7.0.开发者_如何学C1.3-IFIX01

Config Spec for Dynamic View:

element * CHECKEDOUT
element * .../MyProject/LATEST

Here are the relevant lines from the teamcity-vcs.log

[2009-11-25 13:20:20,905]   INFO [ Cached pool 12] -      jetbrains.buildServer.VCS - ClearCase executing cleartool get -to C:\TeamCity\temp\cc_35875temp V:\andrew_CI_view\My_vob\MyProject@@\main\branch\7\Apps\main\branch\1\MyProject.Apps.FileTransferUtility\main\branch\1\App.xaml\main\branch\1
[2009-11-25 13:20:20,905]   INFO [ Cached pool 12] - .clearcase.ClearCaseConnection - interactive execute: cleartool get -to C:\TeamCity\temp\cc_35875temp V:\andrew_CI_view\My_vob\MyProject@@\main\branch\7\Apps\main\branch\1\MyProject.Apps.FileTransferUtility\main\branch\1\App.xaml\main\branch\1
[2009-11-25 13:20:21,155]   INFO [ Cached pool 12] -      jetbrains.buildServer.VCS - ClearCase executing cleartool quit
[2009-11-25 13:20:21,155]   INFO [ Cached pool 12] - .clearcase.ClearCaseConnection - interactive execute: cleartool quit
[2009-11-25 13:20:21,155]   WARN [ Cached pool 12] -      jetbrains.buildServer.VCS - Failed to build patch for build #15, build id: 17, VCS root: ClearCaseVCS, due to error: java.io.IOException: cleartool: Error: Operation "get cleartext" failed: Permission denied.
jetbrains.buildServer.vcs.VcsException: java.io.IOException: cleartool: Error: Operation "get cleartext" failed: Permission denied.
    at jetbrains.buildServer.buildTriggers.vcs.clearcase.CCPatchProvider.loadFile(CCPatchProvider.java:171)
    at jetbrains.buildServer.buildTriggers.vcs.clearcase.CCPatchProvider.access$200(CCPatchProvider.java:31)
    at jetbrains.buildServer.buildTriggers.vcs.clearcase.CCPatchProvider$2.processFile(CCPatchProvider.java:111)
    at jetbrains.buildServer.buildTriggers.vcs.clearcase.structure.CacheProcessor.processAllRevisions(CacheProcessor.java:71)
    at jetbrains.buildServer.buildTriggers.vcs.clearcase.structure.CacheElement.processAllVersionsInternal(CacheElement.java:178)
    at jetbrains.buildServer.buildTriggers.vcs.clearcase.structure.CacheElement.processAllVersions(CacheElement.java:96)
    at jetbrains.buildServer.buildTriggers.vcs.clearcase.ClearCaseConnection.processAllVersions(ClearCaseConnection.java:665)
    at jetbrains.buildServer.buildTriggers.vcs.clearcase.CCPatchProvider.buildPatch(CCPatchProvider.java:52)
    at jetbrains.buildServer.buildTriggers.vcs.clearcase.ClearCaseSupport.buildPatchForConnection(ClearCaseSupport.java:294)
    at jetbrains.buildServer.buildTriggers.vcs.clearcase.ClearCaseSupport.buildPatch(ClearCaseSupport.java:281)
    at jetbrains.buildServer.buildTriggers.vcs.clearcase.ClearCaseSupport$7.buildPatch(ClearCaseSupport.java:755)
    at jetbrains.buildServer.serverSide.impl.projectSources.BuildPatchUtil$1.buildPatch(BuildPatchUtil.java:2)
    at jetbrains.buildServer.vcs.VcsSupportUtil.buildPatch(VcsSupportUtil.java:81)
    at jetbrains.buildServer.serverSide.impl.projectSources.BuildPatchUtil.buildPatch(BuildPatchUtil.java:2)
    at jetbrains.buildServer.serverSide.impl.projectSources.PatchComposer.buildCleanPatchToStream(PatchComposer.java:121)
    at jetbrains.buildServer.serverSide.impl.projectSources.PatchComposer.access$100(PatchComposer.java:65)
    at jetbrains.buildServer.serverSide.impl.projectSources.PatchComposer$2.constructPatch(PatchComposer.java:1)
    at jetbrains.buildServer.serverSide.impl.projectSources.SmallPatchCache.getCachedCleanPatch(SmallPatchCache.java:36)
    at jetbrains.buildServer.serverSide.impl.projectSources.PatchCacheImpl.requestCachedPatch(PatchCacheImpl.java:25)
    at jetbrains.buildServer.serverSide.impl.projectSources.PatchComposer.getOrMakeCacheableCleanPatch(PatchComposer.java:140)
    at jetbrains.buildServer.serverSide.impl.projectSources.PatchComposer.makePatch(PatchComposer.java:36)
    at jetbrains.buildServer.serverSide.impl.projectSources.PatchComposer.buildPatchForRoot(PatchComposer.java:71)
    at jetbrains.buildServer.serverSide.impl.projectSources.PatchComposer.buildPatch(PatchComposer.java:125)
    at jetbrains.buildServer.serverSide.impl.BuildTypeImpl.buildPatch(BuildTypeImpl.java:290)
    at jetbrains.buildServer.serverSide.impl.BuildTypeImpl$$FastClassByCGLIB$$a84db719.invoke(<generated>)
    at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
    at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at jetbrains.buildServer.serverSide.impl.auth.TeamCityMethodSecurityInterceptor.invoke(TeamCityMethodSecurityInterceptor.java:33)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at org.springframework.aop.framework.Cglib2AopProxy$FixedChainStaticTargetInterceptor.intercept(Cglib2AopProxy.java:582)
    at jetbrains.buildServer.serverSide.impl.BuildTypeImpl$$EnhancerByCGLIB$$effc1aaa.buildPatch(<generated>)
    at jetbrains.buildServer.serverSide.impl.BuildStarter$2.call(BuildStarter.java:5)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
    at java.util.concurrent.FutureTask.run(FutureTask.java:123)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
    at java.lang.Thread.run(Thread.java:595)
Caused by: java.io.IOException: cleartool: Error: Operation "get cleartext" failed: Permission denied.
    at jetbrains.buildServer.buildTriggers.vcs.clearcase.process.InteractiveProcess.executeAndReturnProcessInput(InteractiveProcess.java:64)
    at jetbrains.buildServer.buildTriggers.vcs.clearcase.ClearCaseConnection$ClearCaseInteractiveProcess.copyFileContentTo(ClearCaseConnection.java:997)
    at jetbrains.buildServer.buildTriggers.vcs.clearcase.ClearCaseConnection.loadFileContent(ClearCaseConnection.java:308)
    at jetbrains.buildServer.buildTriggers.vcs.clearcase.CCPatchProvider.loadFile(CCPatchProvider.java:141)
    ... 37 more


Found the solution from this thread:

http://www.jetbrains.net/devnet/thread/283380

Looks like this was caused by having the wrong user assigned to the TeamCity Web Server service. Changing the user from the local SYSTEM account to my user account fixed the problem.


This is generally due to insufficient right from the user executing this access on the client machine:

The MyVob.vbs/s/sdft pool may have permission to load not compatible with the CLEARCASE_PRIMARY_GROUP declared by the user

You can try to go directly sdft pool from the user machine and try to add a file.

Check what user is actually used by the TeamCity process.


If it works for you in command-line, you have to make sure that the environment that runs it from TeamCity is equivalent to your command-line environment.

Tamir, GoMidjets

0

精彩评论

暂无评论...
验证码 换一张
取 消