Unable to extract client root from Perforce
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Symptoms
Bamboo shows the error below when running a plan that checks out from a Perforce repository:
com.atlassian.bamboo.repository.RepositoryException: Unable to extract
client root from Perforce, therefore could not evaluate where the source
will be checked out to.
at com.atlassian.bamboo.repository.perforce.PerforceManager.getClientRoot(PerforceManager.java:196)
at com.atlassian.bamboo.repository.perforce.PerforceRepository.getSourceCodeDirectory(PerforceRepository.java:642)
...
Caused by: com.tek42.perforce.PerforceException: Failed to validate perforce client bamboo_android
at com.atlassian.bamboo.repository.perforce.PerforceManager.ensureClientIsValid(PerforceManager.java:253)
at com.atlassian.bamboo.repository.perforce.PerforceManager.getPerforceWorkspace(PerforceManager.java:219)
at com.atlassian.bamboo.repository.perforce.PerforceManager.getClientRoot(PerforceManager.java:171)
... 10 more
Caused by: com.tek42.perforce.PerforceException: The client
'bamboo_android' was not found in the list of clients
retrieved from the Perforce server using the 'clients' command
at com.atlassian.bamboo.repository.perforce.PerforceManager.ensureClientIsValid(PerforceManager.java:248)
... 12 more
Cause
The common causes are:
The client root does not exist on the server or agent box.
Bamboo cannot create this directory automatically.
Perforce executable is missing on the Bamboo server and/or the agent machine.
Bamboo is running as a service with an account that is not a local admin as recommended.
Resolution
Ensure that the client root exists on the Bamboo server (or agent) machine. If necessary, create the directory locally for the Perforce client.
If the build is running on a Windows remote agent that runs as a service, make sure to use a local admin account to run the service: Running Bamboo as the local user.
Check if Perforce exists as a capability on both Bamboo server and agent machines with a correct path.
Was this helpful?