buildagent .docker/config.json permission denied
Completed
One of our 3 buildagents suddenly stopped working with a permission denied issue. Restarting the agent does not seem to resolve the issue.
07:39:10 Collecting changes in 1 VCS root
07:39:12 The build is removed from the queue to be prepared for the start
07:39:12 Starting the build on the agent "teamcity_agent_1"
07:39:13 Updating tools for build
07:39:14 Clearing temporary directory: /opt/buildagent/temp/buildTmp
07:39:14 Publishing internal artifacts
07:39:14 Full checkout enforced. Reason: [Checkout directory is empty or doesn't exist]
07:39:14 Will perform clean checkout. Reason: Checkout directory is empty or doesn't exist
07:39:14 Checkout directory: /opt/buildagent/work/68a119ee13a11988
07:39:14 Updating sources: auto checkout (on agent)
07:39:39 Step 1/4: Create docker compose .env (Command Line)
07:39:39 Starting: /opt/buildagent/temp/agentTmp/custom_script7282470357446633203
07:39:39 in directory: /opt/buildagent/work/68a119ee13a11988
07:39:39 WARNING: Error loading config file: /home/buildagent/.docker/config.json: open /home/buildagent/.docker/config.json: permission denied
Could not find any existing similar issues.
The most impactful change in our TeamCity environment is that we recently added an enterprise license.
The TeamCity server is up to date: TeamCity 2022.04.3 (build 108706)
How could I fix the buildagent and prevent the agent from corrupting again?
Please sign in to leave a comment.
Adding a license to your TeamCity instance should not have any impact on file permissions. Please check the permissions on this file by issuing the command, ls -l /home/buildagent/.docker/config.json. Is the build agent running as the user, buildagent, and is the build agent itself a docker container?
Thanks for your response Eric.
The build agent was indeed a docker container.
The build agents are running as buildagent user as far as I know, simple 'Command line' script execution.
I resolved it by completely destroying the agent with all related volumes. So unfortunately I cannot see the permissions / state it was in previously.
This topic may be closed.