Bamboo remote agent on Windows running as a service with a local account still uses the SYSTEM account

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

Summary

A Bamboo Windows agent is running using a local account but the build logs show that the user is SYSTEM:

1 2 build 09-Dec-2022 06:58:50 USERNAME=SYSTEM build 09-Dec-2022 06:58:50 USERPROFILE=C:\Users\<BAMBOO_LOCAL_ACCOUNT>

Environment

Observed on Bamboo 8.2 after an upgrade.

Diagnosis

  1. Run a Bamboo build containing a Script Task with the following content:

    1 set

    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:

    1 2 3 build 09-Dec-2022 06:58:50 USERNAME=SYSTEM build 09-Dec-2022 06:58:50 USERPROFILE=C:\Users\<BAMBOO_LOCAL_ACCOUNT>
  2. On the command line, open <bamboo-agent-home>/bin directory and run the command below to check the Tanuki Wrapper version of your Bamboo instance:

    1 wrapper --version

    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:

    1 Wrapper (Version 3.2.3-atlassian-1) http://wrapper.tanukisoftware.org

Cause

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.

Solution

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: 

  1. Stop the agent.

  2. Back up the <remote-agent-home> directory.

  3. Remove the <remote-agent-home>\conf\ directory.

  4. Download a new Remote Agent JAR from your Bamboo Server.

  5. Launch the remote agent, pointing its home directory to the existing home folder by using the following Java property:

    1 -Dbamboo.home=<remote-agent-home>

If you run your agent as a service, you also need to remove the existing service and install it again.

Updated on February 26, 2025

Still need help?

The Atlassian Community is here for you.