Jump to content

TeamCity LDAP token expired with Plastic Cloud


Veli

Recommended Posts

Hi,

I'm setting up a TeamCity by using Plastic Cloud, and I'm getting the following error:

Failed for the root '"default" {instance id=1, parent internal id=1, parent id=DefaultVCSRoot, description: "PlasticSCM: br:/main@reponame@organization@cloud"}: Unable to retrieve the current repository state in root default: The LDAP token expired. User: name@domain.com.
CommandResult 1
Hide stacktrace
jetbrains.buildServer.vcs.VcsRootVcsException: Unable to retrieve the current repository state in root default: The LDAP token expired. User: name@domain.com.
CommandResult 1

I did the usual approach:

  • Created AWS instance
  • Installed Windows Server 2019
  • Installed TeamCity 2020.1
  • Installed the full Plastic version with local server included
  • Created connection profile for cloud
  • Copied client.conf to Plastic Client installation path under Program Files.
  • Added Plastic plugin to TeamCity
  • Created VCS Root and tested that connection works

It looked like all should be good to go, but after a moment I was getting that error on TC project view. I have previously only set TeamCity for enterprise accounts and dedicated servers, so my approach might be completely wrong here.

Does this ring a bell for anyone over here? And is there some good guides on how to setup TeamCity with Plastic Cloud?

Here is the full stack trace as well, with user account replaced with name@domain.com:

at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.createRootException(VcsChangesStatesCollector.java:119)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.getCurrentState(VcsChangesStatesCollector.java:10)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.lambda$null$1(VcsChangesStatesCollector.java:88)
at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:75)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.lambda$getCollectStatesTasks$2(VcsChangesStatesCollector.java:107)
at jetbrains.buildServer.vcs.impl.ImmediateFutureExecService$2.call(ImmediateFutureExecService.java:5)
at jetbrains.buildServer.serverSide.impl.ImmediateFuture.get(ImmediateFuture.java:59)
at jetbrains.buildServer.serverSide.impl.ImmediateFuture.get(ImmediateFuture.java:68)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.collectStatesForAllRoots(VcsChangesStatesCollector.java:9)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.getCurrentStateSnapshot(VcsChangesStatesCollector.java:64)
at jetbrains.buildServer.vcs.impl.VcsChangesFetcher.getStateAndCreateChangesCollectingTasks(VcsChangesFetcher.java:6)
at jetbrains.buildServer.vcs.impl.VcsChangesLoader.doLoadChanges(VcsChangesLoader.java:26)
at jetbrains.buildServer.vcs.impl.VcsChangesLoader.tryLoadChanges(VcsChangesLoader.java:35)
at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$CollectChangesAction$1.run(VcsModificationChecker.java:29)
at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:75)
at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$CollectChangesAction.run(VcsModificationChecker.java:2)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1736)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: jetbrains.buildServer.vcs.VcsException: Unable to retrieve the current repository state in root default: The LDAP token expired. User: name@domain.com
CommandResult 1
at com.codicesoftware.plugins.teamcity.PlasticCollectChangesPolicy.getCurrentState(PlasticCollectChangesPolicy.java:57)
at jetbrains.vcs.api.services.impl.RepositoryStateServiceProvider$1.getCurrentState(RepositoryStateServiceProvider.java:7)
at jetbrains.buildServer.vcs.impl.VcsRootInstanceImpl.lambda$getCurrentState$0(VcsRootInstanceImpl.java:38)
at jetbrains.buildServer.serverSide.impl.BaseAccessChecker.runWithDisabledChecks(BaseAccessChecker.java:30)
at jetbrains.buildServer.serverSide.impl.SecondaryNodeSecurityManager.executeSafe(SecondaryNodeSecurityManager.java:20)
at jetbrains.buildServer.serverSide.IOGuardInitializer$IOGuardDelegateImpl.allowNetworkAndCommandLine(IOGuardInitializer.java:11)
at jetbrains.buildServer.serverSide.IOGuard.allowNetworkAndCommandLine(IOGuard.java:117)
at jetbrains.buildServer.vcs.impl.VcsRootInstanceImpl.getCurrentState(VcsRootInstanceImpl.java:170)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector$CurrentStateOperation.call(VcsChangesStatesCollector.java:1)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector$CurrentStateOperation.call(VcsChangesStatesCollector.java:2)
at jetbrains.buildServer.vcs.VcsOperationProgressProviderImpl.runWithProgress(VcsOperationProgressProviderImpl.java:27)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.getCurrentState(VcsChangesStatesCollector.java:63)
... 18 more
Caused by: com.codicesoftware.plastic.core.PlasticConnectionException: The LDAP token expired. User: devops@returnentertainment.com.
CommandResult 1
at com.codicesoftware.plastic.core.PlasticEphemeralShell.checkConnection(Unknown Source)
at com.codicesoftware.plastic.core.PlasticEphemeralShell.prepareCommand(Unknown Source)
at com.codicesoftware.plastic.core.PlasticEphemeralShell.execute(Unknown Source)
at com.codicesoftware.plastic.core.PlasticShell.execute(Unknown Source)
at com.codicesoftware.plastic.query.QueryCommands.ExecuteQuery(Unknown Source)
at com.codicesoftware.plastic.query.QueryCommands.executeBranchQuery(Unknown Source)
at com.codicesoftware.plastic.query.QueryCommands.GetBranches(Unknown Source)
at com.codicesoftware.plugins.teamcity.cmcommands.CmCommandsImpl.getBranches(CmCommandsImpl.java:125)
at com.codicesoftware.plugins.teamcity.branchfiltering.PlasticBranch.getOpenBranches(PlasticBranch.java:25)
at com.codicesoftware.plugins.teamcity.PlasticCollectChangesPolicy.getCurrentState(PlasticCollectChangesPolicy.java:44)
... 29 more
jetbrains.buildServer.vcs.VcsException: Unable to retrieve the current repository state in root default: The LDAP token expired. User: name@domain.com.
CommandResult 1
at com.codicesoftware.plugins.teamcity.PlasticCollectChangesPolicy.getCurrentState(PlasticCollectChangesPolicy.java:57)
at jetbrains.vcs.api.services.impl.RepositoryStateServiceProvider$1.getCurrentState(RepositoryStateServiceProvider.java:7)
at jetbrains.buildServer.vcs.impl.VcsRootInstanceImpl.lambda$getCurrentState$0(VcsRootInstanceImpl.java:38)
at jetbrains.buildServer.serverSide.impl.BaseAccessChecker.runWithDisabledChecks(BaseAccessChecker.java:30)
at jetbrains.buildServer.serverSide.impl.SecondaryNodeSecurityManager.executeSafe(SecondaryNodeSecurityManager.java:20)
at jetbrains.buildServer.serverSide.IOGuardInitializer$IOGuardDelegateImpl.allowNetworkAndCommandLine(IOGuardInitializer.java:11)
at jetbrains.buildServer.serverSide.IOGuard.allowNetworkAndCommandLine(IOGuard.java:117)
at jetbrains.buildServer.vcs.impl.VcsRootInstanceImpl.getCurrentState(VcsRootInstanceImpl.java:170)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector$CurrentStateOperation.call(VcsChangesStatesCollector.java:1)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector$CurrentStateOperation.call(VcsChangesStatesCollector.java:2)
at jetbrains.buildServer.vcs.VcsOperationProgressProviderImpl.runWithProgress(VcsOperationProgressProviderImpl.java:27)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.getCurrentState(VcsChangesStatesCollector.java:63)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.lambda$null$1(VcsChangesStatesCollector.java:88)
at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:75)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.lambda$getCollectStatesTasks$2(VcsChangesStatesCollector.java:107)
at jetbrains.buildServer.vcs.impl.ImmediateFutureExecService$2.call(ImmediateFutureExecService.java:5)
at jetbrains.buildServer.serverSide.impl.ImmediateFuture.get(ImmediateFuture.java:59)
at jetbrains.buildServer.serverSide.impl.ImmediateFuture.get(ImmediateFuture.java:68)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.collectStatesForAllRoots(VcsChangesStatesCollector.java:9)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.getCurrentStateSnapshot(VcsChangesStatesCollector.java:64)
at jetbrains.buildServer.vcs.impl.VcsChangesFetcher.getStateAndCreateChangesCollectingTasks(VcsChangesFetcher.java:6)
at jetbrains.buildServer.vcs.impl.VcsChangesLoader.doLoadChanges(VcsChangesLoader.java:26)
at jetbrains.buildServer.vcs.impl.VcsChangesLoader.tryLoadChanges(VcsChangesLoader.java:35)
at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$CollectChangesAction$1.run(VcsModificationChecker.java:29)
at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:75)
at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$CollectChangesAction.run(VcsModificationChecker.java:2)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1736)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: com.codicesoftware.plastic.core.PlasticConnectionException: The LDAP token expired. User: name@domain.com.
CommandResult 1
at com.codicesoftware.plastic.core.PlasticEphemeralShell.checkConnection(Unknown Source)
at com.codicesoftware.plastic.core.PlasticEphemeralShell.prepareCommand(Unknown Source)
at com.codicesoftware.plastic.core.PlasticEphemeralShell.execute(Unknown Source)
at com.codicesoftware.plastic.core.PlasticShell.execute(Unknown Source)
at com.codicesoftware.plastic.query.QueryCommands.ExecuteQuery(Unknown Source)
at com.codicesoftware.plastic.query.QueryCommands.executeBranchQuery(Unknown Source)
at com.codicesoftware.plastic.query.QueryCommands.GetBranches(Unknown Source)
at com.codicesoftware.plugins.teamcity.cmcommands.CmCommandsImpl.getBranches(CmCommandsImpl.java:125)
at com.codicesoftware.plugins.teamcity.branchfiltering.PlasticBranch.getOpenBranches(PlasticBranch.java:25)
at com.codicesoftware.plugins.teamcity.PlasticCollectChangesPolicy.getCurrentState(PlasticCollectChangesPolicy.java:44)
... 29 more
com.codicesoftware.plastic.core.PlasticConnectionException: The LDAP token expired. User: name@domain.com.
CommandResult 1
at com.codicesoftware.plastic.core.PlasticEphemeralShell.checkConnection(Unknown Source)
at com.codicesoftware.plastic.core.PlasticEphemeralShell.prepareCommand(Unknown Source)
at com.codicesoftware.plastic.core.PlasticEphemeralShell.execute(Unknown Source)
at com.codicesoftware.plastic.core.PlasticShell.execute(Unknown Source)
at com.codicesoftware.plastic.query.QueryCommands.ExecuteQuery(Unknown Source)
at com.codicesoftware.plastic.query.QueryCommands.executeBranchQuery(Unknown Source)
at com.codicesoftware.plastic.query.QueryCommands.GetBranches(Unknown Source)
at com.codicesoftware.plugins.teamcity.cmcommands.CmCommandsImpl.getBranches(CmCommandsImpl.java:125)
at com.codicesoftware.plugins.teamcity.branchfiltering.PlasticBranch.getOpenBranches(PlasticBranch.java:25)
at com.codicesoftware.plugins.teamcity.PlasticCollectChangesPolicy.getCurrentState(PlasticCollectChangesPolicy.java:44)
at jetbrains.vcs.api.services.impl.RepositoryStateServiceProvider$1.getCurrentState(RepositoryStateServiceProvider.java:7)
at jetbrains.buildServer.vcs.impl.VcsRootInstanceImpl.lambda$getCurrentState$0(VcsRootInstanceImpl.java:38)
at jetbrains.buildServer.serverSide.impl.BaseAccessChecker.runWithDisabledChecks(BaseAccessChecker.java:30)
at jetbrains.buildServer.serverSide.impl.SecondaryNodeSecurityManager.executeSafe(SecondaryNodeSecurityManager.java:20)
at jetbrains.buildServer.serverSide.IOGuardInitializer$IOGuardDelegateImpl.allowNetworkAndCommandLine(IOGuardInitializer.java:11)
at jetbrains.buildServer.serverSide.IOGuard.allowNetworkAndCommandLine(IOGuard.java:117)
at jetbrains.buildServer.vcs.impl.VcsRootInstanceImpl.getCurrentState(VcsRootInstanceImpl.java:170)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector$CurrentStateOperation.call(VcsChangesStatesCollector.java:1)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector$CurrentStateOperation.call(VcsChangesStatesCollector.java:2)
at jetbrains.buildServer.vcs.VcsOperationProgressProviderImpl.runWithProgress(VcsOperationProgressProviderImpl.java:27)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.getCurrentState(VcsChangesStatesCollector.java:63)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.lambda$null$1(VcsChangesStatesCollector.java:88)
at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:75)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.lambda$getCollectStatesTasks$2(VcsChangesStatesCollector.java:107)
at jetbrains.buildServer.vcs.impl.ImmediateFutureExecService$2.call(ImmediateFutureExecService.java:5)
at jetbrains.buildServer.serverSide.impl.ImmediateFuture.get(ImmediateFuture.java:59)
at jetbrains.buildServer.serverSide.impl.ImmediateFuture.get(ImmediateFuture.java:68)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.collectStatesForAllRoots(VcsChangesStatesCollector.java:9)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.getCurrentStateSnapshot(VcsChangesStatesCollector.java:64)
at jetbrains.buildServer.vcs.impl.VcsChangesFetcher.getStateAndCreateChangesCollectingTasks(VcsChangesFetcher.java:6)
at jetbrains.buildServer.vcs.impl.VcsChangesLoader.doLoadChanges(VcsChangesLoader.java:26)
at jetbrains.buildServer.vcs.impl.VcsChangesLoader.tryLoadChanges(VcsChangesLoader.java:35)
at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$CollectChangesAction$1.run(VcsModificationChecker.java:29)
at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:75)
at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$CollectChangesAction.run(VcsModificationChecker.java:2)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1736)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834) 

 

Link to comment
Share on other sites

Hi,

What is the Plastic client version you installed in the TeamCity machine?

 If you kill the "cm" process in  via process explorer so the client is restarted again, could you let us know if the "token expired" error is not happening anymore?

Regards,

Carlos.

Link to comment
Share on other sites

Some more comments:

- If you are installing this Plastic client only to be used for the TeamCity plugin (I mean this is not a development machine), you don't need to install a Plastic local server.

- In that case, please remove the profile you created and re-configure the Plastic client to point directly to the cloud server (instead of using a connection profile). And you can stop/uninstall the local Plastic server. This is not necessary for the TeamCity plugin. It just needs the command line client to run commands agains the cloud server.

Regards,

Carlos.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...