English 中文(简体)
ClearTool Error: Operation "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	empcc_35875temp V:andrew_CI_viewMy_vobMyProject@@mainranch7Appsmainranch1MyProject.Apps.FileTransferUtilitymainranch1App.xamlmainranch1

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:CCdatasnapviewandrew_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_vobMyProject
  • Use ClearCase: BASE
  • No Checkout Rules

ClearCase 7.0.1.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	empcc_35875temp V:andrew_CI_viewMy_vobMyProject@@mainranch7Appsmainranch1MyProject.Apps.FileTransferUtilitymainranch1App.xamlmainranch1
[2009-11-25 13:20:20,905]   INFO [ Cached pool 12] - .clearcase.ClearCaseConnection - interactive execute: cleartool get -to C:TeamCity	empcc_35875temp V:andrew_CI_viewMy_vobMyProject@@mainranch7Appsmainranch1MyProject.Apps.FileTransferUtilitymainranch1App.xamlmainranch1
[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





相关问题
Teamcity and clearcase project spanning multiple vobs

I have a clearcase project spanning multiple vobs. Teamcity 5.0 appears to assume your project is on a single clearcase vob. Is it possible to have Teamcity build a clearcase project spanning ...

Clearcase UCM - Working with streams and components, how?

My co-workers and I are relatively need to the stream idea with Clearcase UCM. Currently management has created streams for each functional software package, each of which has defined interfaces and ...

Setting up TeamCity to work with ClearCase

I m trying to setup TeamCity to work with ClearCase for continuous integration, and I ve been having a few problems. TeamCity is complaining that it cannot build the patch for the build. I ve been ...

how to change views with clearcase on eclipse

I m using eclipse to work on a HUGE C project and it works generally well except for not being able to change views. I create a new project and set the project source to the clearcase vob directory ...

ClearCase UCM - best practices using components

We are migrating a fairly large codebase from VSS to Clearcase w UCM and are considering organizing our source into one or more components within a single project. What best practicespotential ...

Continuous Integration with Teamcity and Clearcase

Has anybody successfully integrated Clearcase with Teamcity (which advertises Clearcase support) to realize a productive continuous integration build environment on a decent size project?

热门标签