Where is the output of tasks executed in Bamboo Agent stored?

leegyu86 December 18, 2023

I am looking for a log where the output of the task is written on the server where the agent is running.
I created a Script Task in Plan as shown below.

echo "Here I am"
exit 3

I also checked the following message in the Logs-Build log on the web.

18-Dec-2023 22:42:51 Here i am
18-Dec-2023 22:42:51 Failing task since return code of [/hdd/bamboo-agent-home/bamboo-agent01/temp/VES-AKNBU2P2NINKV6U2HGJPUKVR7MZSWC5DVOJSS6VCFON2D6TKDKVPVGRZSL5CVMP2EJFLA-BJT-2-ScriptBuildTask-6285048483259833227.sh] was 3 while expected 0

However, there is no 'Here i am' message in the agent's bamboo-agent01/logs/atlassian-bamboo-agent.log file, as shown below.

13848 INFO | jvm 1 | 2023/12/18 22:42:51 | 2023-12-18 22:42:51,030 INFO [0-BAM::AP::Agent:pool-5-thread-1] [ProcessServiceImpl$2] Beginning to execute external process for build ...
13849 INFO | jvm 1 | 2023/12/18 22:42:51 | 2023-12-18 22:42:51,040 INFO [0-BAM::AP::Agent:pool-5-thread-1] [TaskResultBuilder] Failing task since return code of [/hdd/bamboo-agent-home/bamboo-agent01/temp/VES-AKNBU2P2NINKV6U2HGJPUKVR7MZSWC5DVOJSS6VCFON2D6TKDKVPVGRZSL5CVMP2EJFLA-BJT-2-ScriptBuildTask -6285048483259833227.sh] was 3 while expected 0

The only clue I found is when you timeout for a long time after the echo message. During the timeout, there was a bamboo-agent01/temp/log_spool/plan-153780472-BJT-2.log file, and that file had an echo message.

build 18-Dec-2023 22:56:56 Here I am

However, this file is created 4 to 7 seconds after the execution of the echo command is seen on the web, so it does not seem to be the file being logged by the agent.

I believe agent will have a complete log. (Or I think there is such a setting)

I'm continuing to look. Please give me some advice. Thank you.


1 answer

1 accepted

2 votes
Answer accepted
Shashank Kumar
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 18, 2023

Hello leegyu86,

Welcome to Atlassian community.

The results of the echo command is part of build logs, these are first created on the bamboo-agent and later transmitted to the Bamboo server. The method of transferring logs as artifacts is used regardless if live logs are on. If the live logs are on, the partial logs are persisted on-the-fly on the server and replaced with the content of the full logs, once the build finishes.

On the Bamboo-agent you can find these under > <bamboo-agent-home>/temp/log_spool

I just tested one in my local system and was able to see the logs there while the build was executing. 

Note : The logs would only be available here until the build is executing on the agent, once the build completes these logs would be moved to Bamboo server and you'll not be able to see these on the agent file system.

These would only be left on the agent file system if for some reason agent was not able to send these files to the Bamboo server.

On the Bamboo GUI, you are able to see these logs because of live log transmission, read more about it at https://confluence.atlassian.com/bamboo/configuring-live-logs-transmission-1018270669.html


Shashank Kumar

**please don't forget to Accept the answer if your query was answered**

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events