`java.nio.file.AccessDeniedException` while Jenkins deletes the workspace.
IntermediateTroubleshootingJenkins Build and Agent Failures
Answer
Likely causes → A container build created root-owned files in the mounted workspace; open file handles on Windows.
Diagnose → ls -ln workspace/ and compare to the Jenkins user's UID.
Fix → Run the container with -u $(id -u):$(id -g), or delete the files via a container as root; on Windows stop locking processes.
Prevent → Always run build containers as the agent's UID, and use ephemeral agents.
More on Jenkins Build and Agent Failures
Jenkins console shows `sh: 1: mvn: not found` on one agent only.Beginner`java.lang.NoSuchMethodError: No such DSL method 'xyz' found among steps`.Beginner`WorkflowScript: 12: Expected a step @ line 12, column 5.` in a Declarative pipeline.Beginner`hudson.AbortException: script returned exit code 1` with nothing useful above it.BeginnerBuild hangs at "Waiting for next available executor" even though agents look idle.Beginner`Cannot run program "nohup" (in directory ...): error=2, No such file or directory` on a Windows agent.Intermediate