Hello!
I am using TeamCity and Plastic SCM. I added a plugin for Plastic to TeamCity and installed Plastic on the Build Agent. Build Agent(Win) and TeamCity(Linux) are different machines. I also installed Plastic on the TeamCity machine because without it I couldn’t create a VCS Root. After TeamCity responds to a new commit and, in theory, it should update the workspace or clone the repository. But the following happens:
“Failed to perform checkout on agent: Unable to open a Plastic SCM shell”
The PATH environment variables have the path “C:\Program Files\PlasticSCM5\client”
Fixed by setting the “VCS checkout mode” parameter to “Always checkout files on server”
It also turned out that the plugin crashes
Plastic version: 11.0.16.7881
Plugin version: SNAPSHOT-202303292320
From your last comment, I don’t fully understand if you fixed the problem. If the issue persists, we need to enable the “cm” log to debug the issue: Plastic SCM - Technical article - Enabling logging
When enabling the TeamCity integration it’s important to follow the next steps:
Install the Plastic SCM client in the server and build nodes.
Configure the Plastic SCM client to reach the Plastic SCM server.
Manually paste the “C:\Users\xxx\AppData\Local\plsatic4\client.conf” to the client binaries folder: “C:\Program Files\PlasticSCM5\client\client.conf”. This is step is important so the TeamCity server service is also able to read the client configuration.
After that, this error appears:
Failed to perform checkout on agent: Error performing agent-side checkout to 73: Error: The handle is invalid. CommandResult 1
I don’t understand, Is the issue currently fixed or not? Are you using server-side checkout or client side?
If it’s not, we need to enable the “cm” logs to debug it.
The error was due to the fact that the TeamCity Build Agent was run as the “Administrator” user. To solve the problem, you need to create a separate user for the TeamCity Build Agent. Steps I did:
Hi! I recently have been having the same issues. I think at some point it started happening after the teamcity plastic plugin update. I am on the latest version as of now - 11.0.16.8673.
My plugin version is: SNAPSHOT-202406041335
So for the past couple of weeks I have been experiencing this issue, my teamcity cannot grab the changes for any repository. I only use agent checkout, and I do not want to use server checkout ever.
I get this on teamcity:
I can log into teamcity user and run cm command without any issues, it’s in system PATH(Windows) for system and all users including Teamcity user. I granted full access to cm.exe for that user too, but it has not helped. I followed the steps above, but it hasn’t fixed it either. I have enabled logs though, but they are not really descriptive:
Also I ran cm configure and it is saved correctly in the client.conf.
Oh, and I am using cloud version, I don’t host my own plastic server.
Also I noticed, that testing connection to the VCS root in teamcity sometimes fails and sometimes succeeds. Kind of randomly. It used to always be green.
Some additional interesting info:
My agent shuts itself down in the night, and powers on in the morning using BIOS wake up time event. Simple. I noticed one pattern that is true 100% of time. When the machine wakes up through BIOS event, the error with plastic occurs. Then when I log into the machine remotely and restart it, when it is back on, this error is no longer present and everything works perfectly.
Hi! Okay, the issue is back. This time it completely broke everything and nothing helps to recover from it. I sent an email to the address you provided.