youngmon/atlassian-qna huggingface dataset:
Elastic Bamboo Error : Unable to start broker. Please check you settings in the bamboo.cfg.xml in your Bamboo Home. Remote agents will not work correctly.
Asked by Thiago:

Hi there,

We are having a couple of development build plans stuck waiting to build, as the remote agents keep firing up bu never leaving 'pending' state.

Here are the messages I can see right now:

Elastic Bamboo Error : Failed on updating stock images ami-963b56fe,ami-963b56fe; expected 0 or 1 stock images for windows - x86_64 - EBS on region US_EAST_1.  
Elastic Bamboo Error : Unable to start broker. Please check you settings in the bamboo.cfg.xml in your Bamboo Home. Remote agents will not work correctly. ?([java.io](http://java.io).IOException : Failed to bind to server socket: <tcp://0.0.0.0:54663?wireFormat.maxInactivityDuration=300000> due to: [java.net](http://java.net).BindException: Address already in use)

I don't have access currently to the AWS account itself.

Could you please advise where the issue might be asap?

Thanks

T


Answers:
author: Bruno Rosa
body: Thiago, I see that you have created a support request related to this problem. I'm going to share the resolution here so other users can see what's happened and what to do next.

We have seen similar cases where the Java version was holding the instances to come up. So if you're running Bamboo Cloud and experiencing a similar problem, please make sure that *JAVA_HOME* is set to JDK 8 for the agent to start, according to [BAM-16291](https://jira.atlassian.com/browse/BAM-16291). Just for the record, builds can still run in JAVA 7, but *JAVA_HOME* needs to be set to JDK 8. A restart of the Bamboo Cloud instance might also be a good idea. If you want to give that a try, please create a [support request](https://support.atlassian.com) under the **Atlassian Cloud** project.


Tags: cloud
Creating .PKG unix package from ant build in bamboo
Asked by Randy Francisco:

Hi I need your help. I have a java project and i build it in bamboo using ANT since my project is not migrated in maven. After building the package bamboo gave me a war as a build result But i need a .pkg file so my script will install it in UNIX server. would you be able to advice me on how i can create a .pkg file as a final build result in bamboo instead of war?


Answers:
author: Nirmal Shankar
body: Randy

I believe that it should be managed in your ant file. Bamboo wouldnt have much role to play in creating a file of a specific type. All we can do from a bamboo is to display/share artifacts that are getting created(build.xml file would be doing that in this scenario)


author: rrudnicki
body: Hello,

I agree with Nirmal, I believe that should be done by ant. Maybe this link might be useful:

<http://lists.jboss.org/pipermail/rules-users/2008-May/005719.html>

Cheers,   
Renato Rudnicki
Child plans are using improper artifacts when specifying a branch
Asked by Guillaume des Pommare:

Hello,

I am experiencing issues, as a bamboo user ([Atlassian Bamboo](http://www.atlassian.com/software/bamboo/) version 5.8.1 build 5866) with dependencies between plan.

Let's say I have a stash repo with one master branch , one develop branch. I have a given plan with default branch master and plan branch develop named "M".

I also configured two dependent plans C1 and C2. Both are working with same stash repository. C1 is only working with master branch. C2 is working with develop branch. (Plan configuration / repo / branch, and no plan branch).

What I would expect: if M is built with plan branch master, the C1 is triggered. If M is built with plan branch develop, the C2 is triggered.

What I can see: this is the case, but the artifacts which are used are incorrect.

M \<-\> C1 is okay. When a change occurs on master, M is built, artifact are created. Then C1 is triggered, the artifacts coming from master are used by C1

M \<-\> C2 is not okay. When a change occurs on develop, M is built, artifact are created. Then C2 is triggered, the artifacts coming from master are used by C2 (instead of the one previously built).

Dependency configuration is:  
![light-off](/html/@AFF48CBC9FF77B58903BEFBAEBCCEE4F/images/emoticons/light-off.png "light-off") Trigger dependencies only when all stages have been run successfully
![light-off](/html/@AFF48CBC9FF77B58903BEFBAEBCCEE4F/images/emoticons/light-off.png "light-off") Automatic dependency management  
![light-on](/html/@F0D6869241103DD521EC1C11AF3BE00A/images/emoticons/light-on.png "light-on") Enable dependencies for all branches of this plan

Could it be a bad configuration ? Or maybe a bug ?

Thanks for your help. Regards,

Guillaume


Answers:
author: Guillaume des Pommare
body: There is no option to select a branch. From what I can understand (coming from documentation and jira) artifact download tries to match the plan branch with the parent branch. If there is a match, then this artifact is taken, if not, then the one from default branch is taken.

I can't find in UI any place where you can specify a branch in artifact download job.


author: Jobin Kuruvilla [Adaptavist]
body: You should be able to specify the branch in the artifact download task. Are you not able to do that? See <https://jira.atlassian.com/browse/BAM-13584>
Can we use Bamboo without AWS?
Asked by Pietros:

Or company considers Bamboo. However, they found out that AWS is required which I do not really believe (I know it is required for Bamboo Elastic).

Is it possible to use Bamboo the same way we are used to use Jenkins without AWS?


Answers:
author: Alexey Chystoprudov
body: Hello Petr,

You can use Bamboo Server without AWS. You can't use Bamboo Cloud without AWS now. There is feature request <https://jira.atlassian.com/browse/BAM-11870> , you can watch it to be notified when Remote agents will be available in Cloud


Tags: purchase
Why can't I select node.js version to be 0.11 and use harmony generators flag?
Asked by Bogdan Cirlig:

Only node version I see in Bamboo task configuration is 0.10. How do I get to 0.11?


Answers:
author: Marcin Oles
body: Hi Bogdan,

the reason for that is that there are no Bamboo agents that know such capability within your Bamboo instance.

The capabilities that you can choose for Node.js plugin are those that are currently known to Bamboo build agents. If no build agent, and no elastic image, and neither the server knows "Node.js 0.11" as a capability, then you'll not be able to select it.

If you're using Bamboo Cloud, I'd recommend waiting a little, since I think more Node.js versions will be added to stock images soon (stock images are those provided by Bamboo, so no action is needed). You can also always create your own custom EC2 images with custom capabilities, including different version of Node.js. Here is some instruction on how to do this: <https://confluence.atlassian.com/bamboo/creating-a-custom-elastic-image-289277146.html>

Cheers,  
Marcin


Tags: cloud
How to get git code commit message in bamboo
Asked by Mahalaxmi:

Is there a way to read the commit message from the build.

'Build result summary' section will show a details of 'Code commits' like Author, commit, message and commit date.

I want to trigger a job by reading a git commit message without actually switching the branch but by reading the Code commits Message. Is it possible to do so?


Answers:
author: Timothy
body: You could possibily create your own custom build trigger (<https://developer.atlassian.com/bamboodev/bamboo-plugin-guide/bamboo-plugin-module-types/build-lifecycle-plugin-modules/build-trigger-condition-module>).


Tags: bitbucket-server

jira
How can I trigger my automated test plan in bamboo on a successful deployment?
Asked by RobertLyndonDavis:

I have a bamboo plan which is triggered on repository changes. It in turn triggers a deployment project out to my CI server. This all works great except the last step in the process. How do I then trigger my automated test plan once my deployment has finished? It seems that deployments can't trigger plans, only plans can trigger deployments. Are there any ways around this?


Answers:
author: Nirmal Shankar
body: Deployment pipleline doesnt let you trigger a build plan. But a better way to go about is this

1) Have build plan create your artifacts/deployables.

2) Run the deployment pipleline

3) As a last step to deployment pipeline, run the automated test (which I guess would be some kind of scripts)

comments: author: RobertLyndonDavis
body: Thanks for the answer. The one reason I can't do that is because my test require saving of artifacts to work out what went wrong if any tests fail. The deployment pipeline doesn't support saving of artifacts.


author: Timothy
body: Seems that you deployment should be part of the build plan instead of deployment plan. Have you considered the option of using 3 stages in your build plan?

comments: author: RobertLyndonDavis
body: yeah I've thought about that. The problem is that I want my CI build to create (which it does now) a release according to a naming convention template I've set up. Then the test teams can easily see which environments have this release and one click deploy it out. I can't do that if the build doesn't the deployment as there is no mechanism that I can find to create a release during a build.


author: RobertLyndonDavis
body: At the moment I've gotten around this by making the last stop of my build fire off a REST post request to the build api which kicks off my test plan.


Tags: bamboo-administration
Bamboo Artifact definitions exclusions
Asked by Dickson Wong:

In the artifact definition, can I create exclusions in the copy pattern? If so, what's the pattern? TIA!


Answers:
author: Nirmal Shankar
body: There doesn't seem to be an exclude option in the copy pattern from what I have seen so far. Have tried out various ant combinations but none of them have worked out. A probable work around is to have a final task in the build plan which can be a script (one which copies your files to a location excluding the files that you wont need) and then use that location in your copy pattern,
After disabling a remote agent in Bamboo, how do I re-enable it?
Asked by daaron:

In the Bamboo admin screen, I selected one of my remote agents (build machines) and clicked the Disable button. But there's no Enable button to be found.

How do I re-enable this remote agent?

Using 5.5.1 (build 4306).


Answers:
author: daaron
body: Solved it, finally.

Once you disable a remote agent, it disappears from the **Online Remote Agents** tab and appears in the **Offline Remote Agents** tab. Of course, there's no **Enable** button in the **Offline Remote Agents** tab.

Unfortunately, "restarting" the agent does NOT fix this:

```
    ./bamboo-agent-home/bin/bamboo-agent.sh restart
```

The solution was to stop and then start the agent:

```
    ./bamboo-agent-home/bin/bamboo-agent.sh stop
```

```
    ./bamboo-agent-home/bin/bamboo-agent.sh start
```

At this point, the agent reappeared in the **Online Remote Agents** tab, which meant I could re-enable it.

Very frustrating.

comments: author: Nirmal Shankar
body: Glad that you were able to get it up. Still strange that restart didnt work :)


author: Nirmal Shankar
body: Which version of bamboo are you using?

comments: author: daaron
body: Using 5.5.1 (build 4306). Thanks!


author: Nirmal Shankar
body: Ideally there would be disable/enable and delete options in the bamboo page.<https://confluence.atlassian.com/bamboo/disabling-or-deleting-an-agent-289277174.html>If you dont find that option, did you try to start the remote agent manually?


author: daaron
body: Thanks for the reply.No "Enable" option. In fact, the help site you sent me to is titled, "Disabling or deleting an agent." No mention of enabling an agent.I tried starting (restarting) the remote agent manually. No luck.


Tags: bamboo-administration
Bamboo Command Task with MSDeploy and setParam
Asked by Matt Michal:

I'm trying to call MSDeploy and override the 'IIS Web Application Name' parameter via a Command task and can not get it to respect quotes.

```
-verb:sync -source:package=${bamboo.projectName}.zip -dest:auto,wmsvc=https://${bamboo.wmsHostname}:${bamboo.wmsPort}/msdeploy.axd?site=${bamboo.siteName},userName=${bamboo.wmsUser},password=${bamboo.wmsPassword},authtype=Basic,includeAcls=False -allowUntrusted:True -setParamFile:${bamboo.projectName}.SetParameters.xml -setParam:"name='IIS Web Application Name',value=${bamboo.siteName}"
```

Using the above string in Arguments gives an error Unrecognized argument '"-setParam:"name='IIS Web Application Name',value=SiteName""'. All arguments must begin with "-".

I can use a Script task and get it to work but then the plan does not see MSDeploy as a requirement.

```
call "%bamboo_capability_system_builder_command_MSDeploy_V3%" -verb:sync -source:package=%bamboo_projectName%.zip -dest:auto,wmsvc=https://%bamboo_wmsHostname%:%bamboo_wmsPort%/msdeploy.axd?site=%bamboo_siteName%,userName=%bamboo_wmsUser%,password=%bamboo_wmsPassword%,authtype=Basic,includeAcls=False -allowUntrusted:True -setParamFile:%bamboo_projectName%.SetParameters.xml -setParam:name='IIS Web Application Name',value=%bamboo_siteName%
```

There is a similar question that was recently posted to <http://stackoverflow.com/questions/32440861/bamboo-deployments-using-msdeploy> but there isn't an answer yet.


Answers:
author: Danilo Tuler
body: Same problem here. Any workaround?


Tags: task
Bamboo Stash Repository is tight to a user?
Asked by Gerard Ribas:

When a user creates a new linked repository in Bamboo through our Stash Instance automatically it creates a new SSH Key for that user in Stash.

So if this user drop that key, or the user is deleted, Bamboo is complaining that cannot access to that repository.

Is there a way to prevent this behavior in Bamboo?


Answers:
author: Jeff Thomas
body: There is an open improvement request to change this behavior, it's being tracked at <https://jira.atlassian.com/browse/BAM-14986>


author: Jobin Kuruvilla [Adaptavist]
body: Project admin or repository admins can create SSH keys at project or repo level and then use them in the builds. Have you tried that?

<https://confluence.atlassian.com/stash/ssh-access-keys-for-system-use-563609615.html>


Tags: bitbucket-server

ssh

ssh-key
How to get Buckets to list in Bamboo AWS Code Deploy
Asked by Sam L.:

When setting up the AWS Code Deploy task (Atlassian plugin), the created S3 buckets for the specified AWS user do not list.

The error next to the "Amazon S3 bucket" says "Error listing s3 buckets."

Te permissions for the AWS user have been set up as instructed by Attlassian documentation:

<https://confluence.atlassian.com/bamboo/using-the-aws-codedeploy-task-750396059.html>

{  
"Version": "2012-10-17",  
"Statement": \[

{ "Effect": "Allow", "Action": \[ "codedeploy:\*", "s3:\*" \], "Resource": "\*" }

\]  
}

This same AWS user can definitely access the list of available S3 buckets. Tested on CloudBerry.

The same task can also retrieve the AWS code deploy application and group but not the S3 buckets. See attached.

Any clue why this might be happening?


Answers:
author: Marcin Gardias
body: By the looks of it, you run into a known issue some people reported to us recently: <https://jira.atlassian.com/browse/BAM-16276>

Do you happen to use Java 1.8_60 ? If so, you can workaround the issue manually upgrading joda_time library or reverting to older Java (1.8.0_45 works as far as I can tell). The joda_time upgrade is done as follows:

1. visit <http://mvnrepository.com/artifact/joda-time/joda-time/2.8.2> and download "joda-time-2.8.2.jar"
2. stop Bamboo
3. go to "\<bamboo-install\>/atlassian-bamboo/WEB-INF/lib/"
   * backup "joda-time-2.3.jar" and move away from this directory
   * lace "joda-time-2.8.2.jar" in the current directory
4. start Bamboo


Tags: aws-code

bamboo-administration
Error on rerunning failed builds since JDK 8 update
Asked by Jack Whelpton:

Hi,  

We've recently updated our build images to version 8 of the JDK to ensure compatibility with Bamboo. Although builds are initiating fine, any attempt to rerun a build produces the following error:  

Plan ... could not be started. org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Batch update returned unexpected row count from update \[0\]; actual row count: 0; expected: 1; nested exception is org.hibernate.StaleStateException: Batch update returned unexpected row count from update \[0\]; actual row count: 0; expected: 1  

Do you have any idea how this could be resolved?


Answers:
author: Alexey Chystoprudov
body: Hello @Jack Whelpton,

Looks like you have <https://jira.atlassian.com/browse/BAM-16332>, current workaround is to decrease amount of storage used by artifacts to be less than 20 GB or switch to [S3 artifact storage](https://confluence.atlassian.com/bamboocloud/amazon-s3-artifact-storage-747605854.html).


Tags: elastic-bamboo
If I rerun build in Bamboo and it has a git check out, will it check out the latest version of the repo or the same one it pulled the first time?
Asked by Carl Sanders:

I've got a plan that checks out a git repo.

If I run it, make changes to the git repo, then rerun that previous build instead of just running the plan, will it pull git at the original point before the changes or will it pull the latest repo version?


Answers:
author: Marcin Gardias
body: It will checkout the same revision that it checked out in the original build.

comments: author: mireksz
body: [@Marcin Gardias](/t5/user/viewprofilepage/user-id/781649)Is it possible to do the former? I mean use "rerun" in a way that is checks out latest version of given branch?
A method to have Bamboo ignore a specific file when polling for changes
Asked by Peter Gilchrist:

I have a file in my Bitbucket repository used to track database changes that need to be made over time. Some of our users update this file when they alter stored procedures or other items not related to functional changes in java code. When they push their changes it is triggering a bamboo build (we are polling the repository for any changes).

Thus I believe I would like to 'exclude' or prevent Bamboo from being triggered if this single file is changed. Should I be looking for a feature in Bamboo on Demand Cloud to control this or Bitbucket On Demand cloud?


Answers:
author: Steffen Opel _Utoolity_
body: This can be achieved via the advanced option **Include/Exclude Files** when you [Configure a Bitbucket source repository](https://confluence.atlassian.com/bamboo/bitbucket-289277000.html) in Bamboo:
> Allows you to specify the files that Bamboo should, or should not, use to detect changes.
>
> Enter into **File Pattern** a [regular expression](http://download.oracle.com/javase/1.4.2/docs/api/java/util/regex/Pattern.html) to match the files that Bamboo includes or excludes. The regex pattern must match the file path in the repository. See [sub page](https://confluence.atlassian.com/bamboo/_planrepositoryincludeexcludefilesexamples-289277478.html) for examples.


Tags: bitbucket-cloud

cloud
How to execute multiple external process from within the same Bamboo task
Asked by aaron jeffries:

I need to perform multiple executions of an external process within the same Bamboo task. I've written plugins using code similar to the below. If I want to execute multiple external processes, is there a way to combine the results that each process returns? Does anyone know of any plugins that currently do anything similar to this?

```
public TaskResult execute(final TaskContext taskContext) throws TaskException {        TaskResultBuilder builder = TaskResultBuilder.create(taskContext);                 ExternalProcess process = processService.createProcess(taskContext,                new ExternalProcessBuilder()                .command(Arrays.asList("/bin/ls"))                .workingDirectory(taskContext.getWorkingDirectory()));         process.execute();        // TODO -- need to execute second process        // TODO -- need to check the results of both processes        return builder.checkReturnCode(process, 0).build();    }
```


Answers:
author: aaron jeffries
body: I looks like you can check the TaskState of the TaskResultBuilder between ExternalProcess executions. There are probably more elegant ways to do this, but the following code snippet achieves what I was looking for.

```
builder = builder.checkReturnCode(process, 0);        if(builder.getTaskState() == TaskState.ERROR){   buildLogger.addErrorLogEntry("Task state == error.  Bombing out...");   return builder.build();} else if(builder.getTaskState() == TaskState.FAILED){   buildLogger.addErrorLogEntry("Task state == failed.  Bombing out...");   return builder.build();} else {   buildLogger.addBuildLogEntry("Process succeeded.  Do something else.");}
```


Tags: app

custom-field
Bamboo Cloud error while detecting branches for plan
Asked by chphilli:

I have a build plan that's running fine for our "default" branch but never detects new branches even though I have selected "Create plan branches for all new branches" under "Automatic branch management".

The error log shows an error like this, hundreds of times:

```
Repository error while detecting branches for plan MYPLAN. com.atlassian.bamboo.plugins.hg.HgCommandException: command /usr/bin/hg pull --config 'ui.ssh=ssh -o StrictHostKeyChecking=no -o BatchMode=yes' https://MY-USER:********@MY_REPO failed. Working directory was `/data/jirastudio/bamboo/home/xml-data/build-dir/_hg-repositories-cache/c66398d56b8a4bc204aa182e9c43e6201243afc6'. stderr: abort: HTTP Error 400: Bad request stdout: pulling from https://MY_USER:***@MY_REPOsearching for changes
```

If I run the exact hg command from my machine, it successfully pulls the repository from our remote provider.

Any suggestions on getting this to work? Automatic plan branches are literally one of the key reasons we're even looking at Bamboo.


Answers:
author: Bruno Rosa
body: Chris, I was looking at your support request and I noticed that you were able to sort things out. I think it might be a good idea to post the answer here to help other users that might be facing the same problem. Feel free to give a more detailed response about what happened.

For anyone else out there looking at this article, we found other articles in reference to HTTP 400 errors with mercurial when a proxy or firewall is involved and potentially manipulating or blocking the requests being made. Make sure to double check that. For this case it turned out to be a problem with too many topological heads in the repository, resulting in large HTTP requests. Also a good idea to keep that in mind if you're having similar problems.


author: chphilli
body: For reference, I also submitted this as a support request: <https://support.atlassian.com/servicedesk/customer/portal/23/JST-157606>


Tags: cloud
What are the units of "Shutdown delay" in the Elastic Bamboo configuration?
Asked by chphilli:

In Bamboo Cloud's "Elastic Bamboo configuration", one of the last settings ( under the Miscellaneous section ) is "Shutdown delay". That has a footnote of:

"Time to wait before the instance shuts down automatically."

What are the units of this delay? Minutes? Seconds? Centuries?

Other settings clearly call out the units being used ( e.g Idle agent shutdown delay specifically says "minutes" ). This one stands out as unclear.


Answers:
author: Felipevsw
body: This particular setting is in seconds, so the default value would be 300 seconds.

To add to the answer, when you save the changes and return to the initial screen, it's written that

```
EC2 instances will be automatically terminated 300 seconds after the agent goes offline
```

-Felipe

comments: author: Chris Phillips
body: Thank you!


author: Chris Phillips
body: Sadly, no, I never got an answer. The question I linked to above implies minutes, though.


author: daniel debela
body: Chris were able to find out the unit ?


author: chphilli
body: Oops - I guess this is probably a duplicate of <https://answers.atlassian.com/questions/22653754/configuration-of-elastic-bamboo-is-not-clear> ?


Tags: cloud