youngmon/atlassian-qna huggingface dataset:
What SQL (preferably Oracle) query can I use to find offline Bamboo remote agents
Asked by David Kusuda:

I am interested in an SQL query that can be used to find all offline remote agents. I have a query that gets agent information from the QUEUE table and I tried using the LAST_STOP_TIME field != NULL to identify offline agents, but that does not appear to be the correct.

Is there a query that I can use to identify offline remote agents?


Answers:
author: Eduardo Alvarenga
body: Hello [@David Kusuda](/t5/user/viewprofilepage/user-id/1757626)

Try the SQL from the following page or use it as an inspiration. You may need to adapt it to the Oracle format.

* [Generating Bamboo Agents counts from the database](https://confluence.atlassian.com/bamkb/generating-bamboo-agents-counts-from-the-database-1142234753.html)

Thank you,

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**


Tags: agent

offline

server
Upgrade from 7.2.4 to LTS (9.2.1)
Asked by Rafer Gluyas:

I'm looking at upgrading from 7.2.4 (installed in 2021) up to 9.2.1

I have backups of the configuration going back for some time - but I'm not intending on backing up the bamboo-home directory (estimated size is over 500GB \~ and thats just on the default instance). I also want to update the agents as well - as I am assuming that they need to run an agent matching the default version (documentation on this is either hard to find or sparse).

My current plan is to shut down the agents, shut down default instance and then do switch over, I can recall from when I did this last it was a fairly easy process \~ but haven't got any detailed notes, neither can I find any in the system \~ has anyone got any experiences or 'gotchas' to share?


Answers:
author: Eduardo Alvarenga
body: Hello [@Rafer Gluyas](/t5/user/viewprofilepage/user-id/3836987)

From Bamboo 8, the concept of a "*Shared Home Folder* " was introduced. A Shared home is a set of new locations that allow Bamboo to provide services in high availability. That location is created during the Bamboo upgrade process as an internal task and will [migrate files from the old structure to the new folder hierarchy](https://confluence.atlassian.com/bamboo/bamboo-home-migration-1063170553.html).

It is highly recommended that you have a backup of your old version of Bamboo along with a DB snapshot to guarantee a smooth rollback in case of need as there is no support way to downgrade other than restoring from a Backup.

* [Bamboo upgrade guide](https://confluence.atlassian.com/bamboo/bamboo-upgrade-guide-720411366.html)

Agents will upgrade themselves automatically once they detect a new Bamboo version, so you don't have to do anything.

* [Do I need to manually upgrade my Bamboo Agents?](https://confluence.atlassian.com/bamkb/do-i-need-to-manually-upgrade-my-bamboo-agents-1183684051.html)

Cheers,

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**


Tags: upgrade
Remote Trigger and bamboo.repository.revision.number variable
Asked by Erik Anderson:

I setup a build plan trigger following these [instructions](https://docs.gitlab.com/ee/user/project/integrations/bamboo.html). The build triggers ok but the trigger reason shown in summary contains an unrecognizable number:

#13 Changes by last, first \<@mycompany.com\> 54d8a264c2e8b32a63b980c81e6f1e964c9125e9

That value is derived from bamboo.repository.revision.number variable set during a build:

```
command	12-May-2023 13:28:24	Substituting variable: ${bamboo.repository.revision.number} with 54d8a264c2e8b32a63b980c81e6f1e964c9125e9
```

How does bamboo determine the value?

Is it part of the trigger data sent from git host (gitlab) which would make it their question to answer?


Answers:
author: Eduardo Alvarenga
body: Hello [@Erik Anderson](/t5/user/viewprofilepage/user-id/3273112)

Once Bamboo receives a build trigger from GitLab, it initialises a Change detection process that will compare its local revision of the local git repository with the one from the remote VCS. If they differ, Bamboo will understand a new commit awaits a build and will trigger it.

The ***${bamboo.repository.revision.number}*** is the Git revision that comes from the remote repository and is added as a variable.

The GitLab trigger configuration steps will instruct you to add that revision as a label to ease the identification and match a build to a specific commit.

More information here:

* [Repository triggers the build when changes are committed](https://confluence.atlassian.com/bamboo/repository-triggers-the-build-when-changes-are-committed-289276902.html)

Thank you,

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**

comments: author: Erik Anderson
body: Thanks Eduardo,

See reply under Scott Geertgens answer for additional details


author: Scott Geertgens
body: This looks to actually be a commit hash representing the commit on which the build was based. If this isn't the _correct_ commit hash, check that you don't have a reference to both BitBucket and GitLab in the same build as it will likely tie back to the BitBucket commit as priority.

comments: author: Erik Anderson
body: That's what happened, I had 2 repositories in the plan configuration (bitbucket, gitlab) but was only referencing 1 (gitlab) in the pipeline checkout. The change that triggered the build was from gitlab but the hash used to label the build was from bitbucket (maybe because it was the first one in the configuration). After I removed bitbucket, it began using gitlab hash for labelling.


Tags: server
Can't deploy because "Environment is currently being deployed to."
Asked by Krystian Rakoczy:

Hi,

I am using a Bamboo server v.7.2.10.

I've got a release with some environments configured.

So far I was deploying the release to only one environment (Test). But now I can't, as there's a message

```
Cannot deploy at this time. Environment is currently being deployed to.
```

Nothing is being at the moment, all agents are idle. Any idea where to check the cause of it?


Answers:
author: Eduardo Alvarenga
body: Hello [@Krystian Rakoczy](/t5/user/viewprofilepage/user-id/5065533),

Bamboo will fail to deploy an environment when manually triggered and another environment is being deployed. Please validate if all your agents are free.

You can check for Bamboo deployment activity by following the URLs below:

* https://\<Bamboo_URL\>/currentActivity.action
* https://\<Bamboo_URL\>/admin/agent/viewAgents.action

Thank you,

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**

comments: author: Krystian Rakoczy
body: Thanks Eduardo,

the agents are idle and still we weren't able to deploy.

We're going to delete the project and recreate it using PlanDSL. Hope it helps ;-)
AWS Code deploy credentials error
Asked by Begona Guereca:

When I try to add valid credentials I get the following error:   

![Screenshot 2023-05-11 at 9.30.15 AM.png](/t5/image/serverpage/image-id/256707i672D772518A47D5B/image-size/large?v=v2&px=999 "Screenshot 2023-05-11 at 9.30.15 AM.png")


Answers:
author: Eduardo Alvarenga
body: Hello [@Begona Guereca](/t5/user/viewprofilepage/user-id/5194492),

Welcome to **Atlassian Community**!

That error message is not really conclusive about what is wrong with the Code Deploy task.

Can you please reproduce the issue again and send us the snippet from your **\<bamboo-home\>/log/atlassian-bamboo.log** related to that error?

You may also try this workaround on Bamboo (currently listed on Jira) and report if it works for you:

* [Known issues for Assets - AWS Integration](https://confluence.atlassian.com/assetapps/known-issues-for-assets-aws-integration-1168848123.html)

Best regards,

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**
Environment builds taking a long time to complete
Asked by Billy Sharpe:

Hello all,  

I created Bamboo job that was running fine for months. It would take about 5 minutes to complete because I was loading python packages through a virtual environment, so it was taking a while to download them.   

I have not made any changes to the build or python script, but it's now taking hours to complete. I ensured the data size was the same, but it's still taking hours.

(I have 4 agents which are able to build it, and they all have the same issue)  

Where do I begin investigating this issue?   

<br />


Answers:
author: Eduardo Alvarenga
body: Hello [@Billy Sharpe](/t5/user/viewprofilepage/user-id/5217372)

Welcome to **Atlassian Community**!

To troubleshoot "mysterious builds" you would ideally:

1. Log into the Bamboo Agent that runs the build
2. "***su***" to the Bamboo user account
3. Go to the **\<bamboo-agent-home\>/xml-data/build-dir/\<PROJ-PLAN-JOB\>** directory
4. Run that slow Job commands manually and analyse their output

Following these steps will allow you to observe how the build behaves when outside of the Bamboo scope. When running the Job tasks manually, you may have to declare certain variables or properties by hand depending on how your Plan is constructed.

Cheers,

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**

comments: author: Billy Sharpe
body: Hello! [@Eduardo Alvarenga](/t5/user/viewprofilepage/user-id/4365410)   

Thanks for the tip. I failed to mention that our servers are windows, not Linux. Sorry :(


author: Eduardo Alvarenga
body: Hey [@Billy Sharpe](/t5/user/viewprofilepage/user-id/5217372)

Thanks for the follow-up. The operating system will not matter in this case. Could you follow the equivalent steps on Windows to understand what's wrong with the build? The "su" part will be the equivalent of opening a session as another user or using "runas".

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**
My agent gets executed before artifact is generated
Asked by Abhishek Kumar:

I am executing the below set of code through our bamboo pipeline

```
echo ${bamboo.build.working.directory}
cd "${bamboo.build.working.directory}"

chmod -R +rwx ${bamboo.build.working.directory}
chmod -R 777 ./

ls

docker run -v $(pwd):/zap/wrk/ --rm -t owasp/zap2docker-stable zap-baseline.py -t {domain} -g gen.conf -r ${bamboo.build.working.directory}/testreport.html
sleep 12m
ls -ltr
```

Still, I am getting the below error:

```
Failing as no matching files has been found and empty artifacts are not allowed.
```

After 14 mins of being idle, our agent dies.

Please suggest.


Answers:
author: Eduardo Alvarenga
body: Hello [@Abhishek Kumar](/t5/user/viewprofilepage/user-id/5216768),

Welcome to **Atlassian Community**!

Do you see the "**testreport.html** " file being reported at the very end of you build by the "**ls -ltr**" command?

It may also be a case where the Artifact definition does not match "**testreport.html**". Can you review it and validate if that's set correctly?

Bamboo would expand variables in a Shell Script task using a different format. Can you try using the following format instead?

* ***${bamboo_build_working_directory}***

More information here:

* [Bamboo variables - Using variables in bash](https://confluence.atlassian.com/bamboo/bamboo-variables-289277087.html#Bamboovariables-Usingvariablesinbash)

Cheers,

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**
dedicated agent cause ec2 instance not to terminate when idle
Asked by Krishna Avala:

Hi,

we are seeing two issues

1)images will be in idle state for 24hrs plus

2)some agents will not start new instances when builds are placed

below is out auto instance config

### *Automatic elastic instance management* {#toc-hId-2031110900}

*Bamboo will automatically manage your elastic instances based on the following criteria:*

* *Bamboo will shut down elastic instances which have been idle for more than **5** minutes.*
* *A maximum of **5** elastic instances can be started each minute.*
* *New elastic instances will be started when all of the following conditions have been met:*
  * *There is at least **1** build in a queue.*
  * *There is at least **1** build in a queue that are executable on elastic images.*
  * *The average time builds have been waiting in a queue is at least **1** minute.*
  * *The number of elastic instances on your AWS account that are **not** controlled by Bamboo does not exceed **1,000**.*

*please advise*


Answers:
author: Eduardo Alvarenga
body: Hello [@Krishna Avala](/t5/user/viewprofilepage/user-id/5216318),

Welcome to **Atlassian Community**!

There are a few bugs that may trigger that behaviour in Bamboo. Can you please confirm your Bamboo version?

Thank you,

Eduardo Alvarenga  
Atlassian Support APAC

comments: author: Krishna Avala
body: we are on Bamboo 6.8.1 (build #60805 Wed Mar 13 07:17:39 EDT 2019)


author: Eduardo Alvarenga
body: Hello [@Krishna Avala](/t5/user/viewprofilepage/user-id/5216318)

Thanks for confirming your Bamboo version.

That version is already at its End of Life, so we recommend you [upgrade Bamboo](https://confluence.atlassian.com/bamboo/bamboo-upgrade-guide-720411366.html) the soonest to be at a supported release.

I can list a few bugs that may have been related to your case and have already been fixed on recent versions of the product.

* <https://jira.atlassian.com/browse/BAM-22017>
* <https://jira.atlassian.com/browse/BAM-22100>
* <https://jira.atlassian.com/browse/BAM-21873>
* <https://jira.atlassian.com/browse/BAM-22053>
* <https://jira.atlassian.com/browse/BAM-22017>
* <https://jira.atlassian.com/browse/BAM-21873>
* <https://jira.atlassian.com/browse/BAM-20630>
* <https://jira.atlassian.com/browse/BAM-20627>
* <https://jira.atlassian.com/browse/BAM-20550>
* <https://jira.atlassian.com/browse/BAM-20248>

And many more.

Sincerely,

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**
Getting an error while first time authenticating the db (psql)
Asked by Abhinav Purokait:

While configuring for the first time bamboo in local system it gives an error

*'Error accessing database: org.postgresql.util.PSQLException: FATAL: password authentication failed for user "my_user" '*

I tried with multiple user but it shows the same error

PFA, ![Screenshot from 2023-05-10 16-30-23.png](/t5/image/serverpage/image-id/256307i0C78384782E575C6/image-size/large?v=v2&px=999 "Screenshot from 2023-05-10 16-30-23.png")


Answers:
author: Eduardo Alvarenga
body: Hello [@Abhinav Purokait](/t5/user/viewprofilepage/user-id/5215924),

Welcome to **Atlassian Community**!

Your PostgreSQL Database configuration is probably not allowing connections with a password from localhost. To fix that, please review your Database **pg_hba.conf** file and add/fix the following entries:

    local all all trusthost all 127.0.0.1/32 trust

PostgreSQL needs to be restarted to apply any changes to the logon ACLs.

You can find more details on this KB article:

* [FATAL: Ident authentication failed for user - Unable to connect to PostgreSQL](https://confluence.atlassian.com/bitbucketserverkb/fatal-ident-authentication-failed-for-user-unable-to-connect-to-postgresql-779171564.html)

Best regards,

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**

comments: author: Abhinav Purokait
body: I already did this troubleshoot and restarted the psql also but the error remains the same

PFA,![Screenshot from 2023-05-10 21-05-17.png](https://community.atlassian.com/t5/image/serverpage/image-id/256366i740537BDF815C27D/image-size/large?v=v2&px=999 "Screenshot from 2023-05-10 21-05-17.png")
Environment variable not being passed properly by Bamboo
Asked by Sanjeevi ravi:

we are trying to limit the docker resource on agents that we use to run bamboo jobs, we have different agents (VM and EC2 instance) running ubuntu and these agents have different memory capacity and we have a environment variable in each agents that has maximum value that can be used by docker in that respective agent example docker_maxmemory=14436m (14GB). Now we are passing an extra argument to docker run command from bamboo like this "--memory $docker_maxmemory" here $docker_maxmemory is variable that has some value but bamboo pass it as string instead of variable and we are getting error like this " invalid argument "$docker_maxmemory" for "-m, --memory" flag: invalid size: '$docker_maxmemory' " Note : bamboo runs the job in docker container


Answers:
author: Eduardo Alvarenga
body: Hello [@Sanjeevi ravi](/t5/user/viewprofilepage/user-id/5214997),

Welcome to **Atlassian Community**!

As stated on the Docker configuration page:

***"The input is not parsed by Bamboo"***

Meaning you need to either add the value of the memory property manually or run the Docker task as a command line using a [Script task](https://confluence.atlassian.com/bamboo/script-289277046.html) in case you need a customised memory setting.

Kind regards,

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**

comments: author: Sanjeevi ravi
body: Hi [@Eduardo Alvarenga](/t5/user/viewprofilepage/user-id/4365410)   
Thanks for the answer   
But the Script task from the bamboo will run inside the docker container we can not limit the container from inside.


author: Eduardo Alvarenga
body: Hello [@Sanjeevi ravi](/t5/user/viewprofilepage/user-id/5214997)

Yes. The Job will have to be configured as an "*Agent environment* " and not as a "*Docker environment*" for that to work from a Script task.

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**


author: Sanjeevi ravi
body: thanks [@Eduardo Alvarenga](/t5/user/viewprofilepage/user-id/4365410)


author: Sanjeevi ravi
body: for reference ![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/256108i903D62068FA4CED5/image-size/large?v=v2&px=999 "image.png")  
and the error ![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/256113iDC40CECCFF43680B/image-size/large?v=v2&px=999 "image.png")
Build error for .net project: Bamboo_capability_builder_node_node_js
Asked by Elvin Ng:

Hi,

I recently upgrade Bamboo to version 9,2,1

Upon building one of the .net project using MSBuild, it throw error such as error ASPPARSE: item has already been added. Key in dictionary: 'Bamboo_capability_builder_node_node_js' Key being added: 'Bamboo_capability_builder_node_node_js'

Try to build using the same solution with command script no issue. but it will have issue with bamboo

anyone having this issue before and how to solve it?

thank in advance


Answers:
author: Elvin Ng
body: we managed to solve the issue, post here just in case anyone face same problem:

turns out there are duplicate nodeJS executables, one is Node.JS and the other one is Node JS.  
We suspect that behind the scenes, these 2 executables are stripped of its spaces and special characters then added to the same set of dictionary, hence duplicate. This was not happening when the duplicate executables name were: NodeJS and NodeJS2.


Tags: server
Required Dropdown instead of textbox - Run customized - Override variable
Asked by Madhu:

Hi Team,

Can you please help me how to get dropdown when i click on run customized--\>override variable--\>instead of text box need drop down.

Can you please help me on this.

Thanks in Advance!!

Regards,

Madhu Balineni


Answers:
author: Eduardo Alvarenga
body: Hello [@Madhu](/t5/user/viewprofilepage/user-id/5179315)

Can you please tell us what is your Bamboo version?

Kind regards,

Eduardo Alvarenga  
Atlassian Support APAC

comments: author: Madhu
body: Hi Eduardo,

Please find the below bamboo version,

Continuous integration powered by Atlassian Bamboo version 8.1.10 build 80118 - 04 Nov 22

Thank you!!


author: Eduardo Alvarenga
body: Hello [@Madhu](/t5/user/viewprofilepage/user-id/5179315),

Bamboo 8.1 already has a dropdown list box when using the "**Run Customized**" dialogue:

![Run Customized.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/256793i8D8F0063D4AA36D2/image-size/large?v=v2&px=999 "Run Customized.jpg")

If you are looking for a dropdown list assigned to the *value* of the variable; that's not supported.

Can you please elaborate a bit more?

More information:

* [Running a plan build manually](https://confluence.atlassian.com/bamboo0801/running-a-plan-build-manually-1101928648.html)

Cheers,

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**


author: Madhu
body: Hi,

i am looking for drop down for value not for property.

Thanks!!
How to utilize build version metadata?
Asked by Rhobin Jay Faigones:

I want to display the calculated version number of the artifact created on the build. How can I utilize the version metadata from the build summary view?

![image.png](/t5/image/serverpage/image-id/255984iE08C75FDB3BBF8DD/image-size/large?v=v2&px=999 "image.png")


Answers:
author: Rhobin Jay Faigones
body: I found out that the **Version Metadata** is came from the GitVersion plugin. When this plugin is turned off, the said section is not visible on the build summary. Then, to be able to utilize it, you need to use the GitVersion Task.


author: Eduardo Alvarenga
body: Hello [@Rhobin Jay Faigones](/t5/user/viewprofilepage/user-id/5214688),

Welcome to **Atlassian Community**!

We can't recognise the "Version Metadata" block you highlighted in the screenshot. Is that a customised version? Can you please clarify that one?

The General build metadata is on the build results page's "Metadata" tab. You can also locate per-Job metadata by clicking on each Job result in the left corner of the main build results and then selecting the "Metadata" tab.

Cheers,

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**

comments: author: Rhobin Jay Faigones
body: Hi [@Eduardo Alvarenga](/t5/user/viewprofilepage/user-id/4365410)

Thanks for responding to my question. It was found out that the version metadata is coming from GitVersion add-on.

Follow-up question, is it possible for the job metadata to be promoted as a build metadata? If yes, how?

Regards,

Rhobin