Bamboo remote agent on Windows running as a service with a local account still uses the SYSTEM account
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
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
A Bamboo Windows agent is running using a local account but the build logs show that the user is SYSTEM:
build 09-Dec-2022 06:58:50 USERNAME=SYSTEM
build 09-Dec-2022 06:58:50 USERPROFILE=C:\Users\<BAMBOO_LOCAL_ACCOUNT>
Observed on Bamboo 8.2 after an upgrade.
Run a Bamboo build containing a Script Task with the following content:
The build logs will then contain all the environment variables. Look for the USERNAME variable, which will show as SYSTEM even though the USERPROFILE location points to the home directory of the local account running the agent:PROD
build 09-Dec-2022 06:58:50 USERNAME=SYSTEM build 09-Dec-2022 06:58:50 USERPROFILE=C:\Users\<BAMBOO_LOCAL_ACCOUNT>
On the command line, open
<bamboo-agent-home>/bindirectory and run the command below to check the Tanuki Wrapper version of your Bamboo instance:
Bamboo 8.0+ agents come with wrapper version 3.5 or newer. The following would indicate that the wrapper from your remote agent is too old:
Wrapper (Version 3.2.3-atlassian-1) http://wrapper.tanukisoftware.org
This issue can happen if the remote agent is running an older version of the wrapper, which can cause issues with the newer versions of Bamboo.
Additionally, while upgrading to Bamboo 8.2 or newer, it's recommended to upgrade the agents' wrappers as well.
Older wrapper version
If you identify that the wrapper running on your agents is too old (from the Diagnosis steps), please upgrade the wrapper on your remote agent:
- Stop the agent.
- Back up the <remote-agent-home> directory.
- Remove the <remote-agent-home>\conf\ directory.
- Download a new Remote Agent JAR from your Bamboo Server.
Launch the remote agent, pointing its home directory to the existing home folder by using the following Java property:
If you run your agent as a service, you also need to remove the existing service and install it again.