youngmon/atlassian-qna huggingface dataset:
Server won't restart after crashing due to a lock file issue
Asked by Dan DiCara:

I noticed that our Bamboo server was down. When I went to restart it, the bamboo.log contained the following line repeatedly:

2011-10-27 08:00:28,120 INFO main MessageDatabase Database /xchip/cga2/bamboo/bamboo-home/jms-store/bamboo/KahaDB/lock is locked... waiting 10 seconds for the database to be unlocked. Reason: java.io.IOException: File '/xchip/cga2/bamboo/bamboo-home/jms-store/bamboo/KahaDB/lock' could not be locked.

Is this an issue with my database, or with Bamboo itself? Can I just delete the lock file and then restart?


Answers:
author: ArmenA
body: You can shut down your Bamboo, make sure that there are no other Bamboo instances running (ps -ax \| grep bamboo), delete 'BambooHome/jms-store' directory and start your Bamboo instance.

Armen

comments: author: fleeber
body: I didn't need to delete bambooHome/jms-store. With (ps -ax \| grep bamboo), i see many instances running. i've killed all the process, and bamboo starts normally. Thanks, Armen.


author: Jason Britton
body: worked for me as well. Thanks Armen.


author: Maxfield B
body: This also happened to me. Extra Bamboos running somehow.


author: Martin Faust
body: For me I just had extra Bamboos running somehow. Compared to JIRA and Confluence they really haven't spent much time making Bamboo a simple administrative experience. :/ Lots of manual stuff going on.

comments: author: Martin Faust
body: Its absolutely terrible, no installer, no automatic install as service ...


author: John Webber
body: Also had this. I agree with the terrible administrative experience.


author: ReneR
body: KahaDB is a persistence component that's part of Apache ActiveMQ. Bamboo uses ActiveMQ for inter-process communication. So no, it's not part of your Build Plan data.

If this lockfile is being found that means that there's probably already an instance of JMS (Java Message Service) running. Do you have two instances of Bamboo accidentally running? Did you stop Bamboo and restart it and perhaps didn't not shutdown cleanly?

You should definitely contact [support.atlassian.com](http://support.atlassian.com) and provide them your server logs for this kind of situation. If you do have two Bamboo instances running or orphaned java processes they'll want to know about it and can help you to resolve it.


author: CD
body: I managed to cause this problem by adding a \<context\> to the wrong place in service.xml. I was trying to add GMail support to Bamboo, but struggled with the doc for that, which caused this problem.


author: Vijit Jain
body: I have the same problem. There are no extra instances running, and deleting the JMS-Store directory does not help either.

and using all the methods documented in this thread, I still cannot start my bamboo instance.

Advice?

\*Update\*

Works now.
Change build status
Asked by Cameron Ferguson:

Let say that I had a successful build, but we realized later that we didn't link in the correct library version... or our manual testing found the build was bad. Is there a way I can change a successful build to be marked as "failed" ? I know i can remove artifacts and comment on it.


Answers:
author: Przemek Bruski
body: You can also remove the complete build result.

comments: author: Cameron Ferguson
body: Yes I know i can remove the entire result, but can I change it's status if I don't want to remove builds. I may want to leave it in bamboo and mark it as failed, so I can come back to it later and see why it failed.


author: Przemek Bruski
body: Only by marking it manually in the database, buildresultsummary table.
When I use bamboo from eclipse, I get an error while trying to import my build plans
Asked by Vivek Rao:

Hi,

When I try to import build plans from my bamboo server, Eclipse gives me this error -

Error while refreshing build plans. Retry by manually invoking a refresh in the view's toolbar.

How do I do the latter? I dont see a refresh on the toolbar in eclipse.

Thanks,

Vivek


Answers:
author: jjaroczynski
body: Hello Vivek,

The 'refresh' button is located in the Bamboo view toolbar (not the main Eclipse toolbar).

Can you check your Eclipse log and look for any details regarding failed refresh? Is there any stacktrace available?

Cheers,

Jacek
another server specification question.
Asked by Ken Wood:

Suppose I have Bamboo running on a linux box with some local agents. In addition, I have two remote agents, one running on another linux box, and one running on a windows box.

1. During the time a build is running on a remote agent (windows or linux), where are the build logs stored?

On the remote agent?

On the bamboo server?

2. After the build has completed, where are the logs?

Only on the bamboo server?

On both the bamboo server AND the agent?


Answers:
author: Przemek Bruski
body: Build logs are transferred from the agent to the server on the fly (line by line, but multiple log lines emitted in short succession are transferred together in a single message).

There is no serparate log download at the end of the build.

On agent side, there's a separate log containing runtime information about agent (starting of builds, artfacts transfers etc.).


author: ReneR
body: Furthermore, there is Plan configuration to indicate whether the working directory for the build should be cleared after the build finishes. If you have NOT selected this, the working dir for the build will linger on the agent (on its BAMBOO_HOME/xml-data/builds) directory.

Any artifacts that you mark as shared and the logfile for the build itself get sent back and are stored by the server as Przemek mentioned. On the server side, build results, artifacts and logs can be culled by configuring the Build Expiry settings on the Admin interface.

If you look carefully at the output for your build it will tell you what working directory it is using. When you configured the agents you should know where you set their BAMBOO_HOME. All the relevant files are there.

Of course, if your build generates any files on its own or redirects output (not captured by STDOUT) Bamboo is not going to know about that.
Bamboo and LDAP integration
Asked by madison munroe:

I'm following the instructions for [integrating](http://confluence.atlassian.com/display/BAMBOO/Integrating+Bamboo+with+LDAP) LDAP for read-only group management from our LDAP server.

(Bamboo 3.3)

The configuration checks out using the paddle utility

```
# java -jar paddle-2.0.jar debugConnected to server successfully-----------------------------------------------------------------TEST 1: Search and list 10 users-----------------------------------------------------------------...-----------------------------------------------------------------TEST 2: Search and list 10 groups-----------------------------------------------------------------
```

The docs indicate that after doing this I should see the LDAP groups and users on the user management screens though I don't see them. I don't see anything in the log either that Bamboo is attempting to go out to LDAP to fetch users and groups. Am I missing something here with regard to configuration?


Answers:
author: Chris Lemmons
body: I had to restart Bamboo before it recognized my changes to the config files. Also, make sure you don't name your admin account the same as an account actually in LDAP or it won't have administrator access.
Inline Python Scripting possible?
Asked by Cameron Ferguson:

Is it possible with inline scripts to be able to use python? I know it does bash scripting just fine, didn't know if there was a plugin that could do inline python or not.


Answers:
author: Przemek Bruski
body: Just use:

/usr/bin/python \<\<EOF  
print "Hello, World!"  
EOF

as the inline script body.

comments: author: Cameron Ferguson
body: Once again... you are amazing. Thanks again


author: Kavi Manohar
body: when I tried it, I get this error

\<\< was unexpected at this time.


author: Landon Cooper
body: [@Przemek Bruski](/t5/user/viewprofilepage/user-id/781481) thank you for your reply  

I am still getting error when attempting an python script "inline". I know your response is straight forward but can you elaborate more on how to achieve a python script inline?


author: Frederik
body: If you want to execute a longer script and use the "Command" task with a Python executable in order to have the Python capability automatically added you can do the following:

1. Add a script task with code like this:

   ```
   cat <<EOF >script.py

   print "Hello, World!"

   EOF
   ```

2. Add a command task with executable "python" and argument "script.py"


author: ReneR
body: > Then again, anything non trivial should probably go into a file anyway.
>
Definitely. You can backup your database. But any build scripts should always be part of your source repository, whenever possible. You don't want to do a lot of 'hidden magic' that exists only in Bamboo Tasks (or any other CI tool for that matter)


author: Brent Villalobos
body: python -c "print 'Hello, World!'"

Maybe not the best solution for a large amount of python code. Then again, anything non trivial should probably go into a file anyway.
FreemarkerManager error after upgrade from 3.0.1 to 3.2.2
Asked by SherryX:

I'm new to Bamboo. Just upgrade Bamboo from 3.0.1 to 3.2.2 but with the following error, anyone knows how to fix? Thanks

\[FreemarkerManager\] Instantiating Freemarker ConfigManager!, com.atlassian.bamboo.ww2.BambooFreemarkerManager

ERROR \[qtp171508166-15\] \[runtime\] Method public boolean com.atlassian.bamboo.ww2.BambooActionSupport.hasPlanPermission(java.lang.String,java.lang.String) threw an exception when invoked on com.atlassian.bamboo.ww2.actions.chains.ViewChainSummary@62a813e4 with arguments of types \[java.lang.String,java.lang.String,\]

Method public boolean com.atlassian.bamboo.ww2.BambooActionSupport.hasPlanPermission(java.lang.String,java.lang.String) threw an exception when invoked on com.atlassian.bamboo.ww2.actions.chains.ViewChainSummary@62a813e4 with arguments of types \[java.lang.String,java.lang.String,\]

The problematic instruction:

----------

==\> return \[on line 6, column 5 in freemarker-lib/functions.ftl\] \[on line 6, column 5 in freemarker-lib/functions.ftl\]

in user-directive lb.showLabelEditorForPlan \[on line 27, column 17 in decorators/planDecorator.ftl\]

----------

Java backtrace for programmers:

----------

freemarker.template.TemplateModelException: Method public boolean com.atlassian.bamboo.ww2.BambooActionSupport.hasPlanPermission(java.lang.String,java.lang.String) threw an exception when invoked on com.atlassian.bamboo.ww2.actions.chains.ViewChainSummary@62a813e4 with arguments of types \[java.lang.String,java.lang.String,\]

at freemarker.ext.beans.OverloadedMethodModel.exec(OverloadedMethodModel.java:134)


Answers:
author: James Dumay
body: Hi Sherry,

Sounds like a bug in 3.2.2. Can you file a support request at <support.atlassian.com>? We will try to help you out ASAP.

Thanks

James


author: SherryX
body: Thanks. Support request raised.
Do I need to upgrade my agents?
Asked by grillp:

Heya,  
We are upgrading from 3.0.1 to 3.2.2 soon.

Can someone tell me if we also need to upgrade the agents as part of this upgrade?

The existing agents were installed with atlassian-bamboo-agent-installer-2.7.3.jar and currently work with server v3.0.1.

Thanks

Gil Peeters  
* [Permalink](http://confluence.atlassian.com/display/BAMBOO/Bamboo+3.2.2+Upgrade+Guide?focusedCommentId=267256526#comment-267256526 "Permanent link to this comment")

<!-- -->

* [Reply](http://confluence.atlassian.com/pages/replycomment.action?commentId=267256526&pageId=253886819)


Answers:
author: Przemek Bruski
body: Your agents will be upgraded automatically.


Tags: agent

upgrade
Bamboo Install4j error.
Asked by Lyle Diego:

I am trying too install bamboo on a win 2008 server 64-bit, and the in install4j wizzard complains about an damaged java.exe.


Answers:
author: John Speak
body: I had this error when I followed the instructions from the Dragons Lair and installed 32bit Java, but 64bit Atlassian applications. When I hit Bamboo it give the error so I installed 64bit Java 7 along side 32bit Java 6, added a new env. variable for exej_java_home to the 64bit path, problem solved.

comments: author: mete
body: That's works !

Thanks.


author: ReneR
body: Can you include error output?


author: Przemek Bruski
body: Are you sure you're using a 64bit java for installation?

comments: author: Lyle Diego
body: Positive, im running a jdk1.6.0_13 and its windows is 64-bit as well


Tags: install
how to delete a user alias?
Asked by stoj stoj:

Hi

Is there a way to remove a user alias?

Alternatively, is there a way to remove obsolete user aliases from the 'user and author statistics - list authors' page?

Cheers

Stoj


Answers:
author: PiotrA
body: Do you mean user's "Source Repository Aliases"? If so:

Bamboo -\> Administration -\> Security: Users -\> MyUser: Edit -\> unselect undesired source repository aliases -\> Save

I'm on Bamboo 3.3.x

comments: author: stoj stoj
body: Yes, that's it :)

But this doesn't actually help me. What I really want to do is to rationlise/remove the alias/authors from the Users and Authors Statistics -\> List Authors. It would be nice if this page just showed just one entry for every user. ie. not a separate entry for every user plus an entry for every user alias's they have used in the past.

Eg. user abc performs a build, user abc then creates an alias and does another build, then user abc changes there alias and performs another build. This results in 3 separate entries on this page, even though it was the same user.


author: PiotrA
body: I think I am going to pass on this one... Dunno how to do it what you ask for.


author: stoj stoj
body: marked as correct answer, i'll spin off a separate post for the unrelated followup question
Is it possible to change/edit a variable available within bamboo during a build that can be used later in another stage?
Asked by bjartenilsen:

My maven project produces a deployable package as a zip. I would like to use the information about this zip's url-location in another stage in the build process.

Is it any way to pass information back to the build plan during a job?


Answers:
author: ReneR
body: You can share artifacts between Jobs:

<http://confluence.atlassian.com/display/BAMBOO/Configuring+Artifact+Sharing+between+Jobs>
QTP & Bamboo Integration
Asked by Srinivas Chigurupati:

Hi,

Is there a way to trigger QTP scripts using BAMBOO to run automated functional tests and report back to BAMBOO when the QTP executions are done. We need this integration of QTP with BAMBOO for our build/test automation process.

I would really appreciate yur help in this regard.

Thanks

CS.


Answers:
author: VikasB
body: You can use UFT task for Bamboo plugin. It adds a task in task list of bamboo. Add UFT task to your build and configure it.


author: ReneR
body: Sure it's possible. At the lo-fi end you can use one of the existing Shell scripting tasks to execute QTP from the command-line. You can then configure your test results file as a shared artifact.

At the more complicated end, you can write a custom Task:

<https://developer.atlassian.com/display/BAMBOODEV/Bamboo+Tasks+API>

So it depends on the level of effort you're willing to invest in it.

comments: author: Saneth Kumar
body: Hi Rene,

I'm very new to Bamboo and I'm going through the documentation. Could you please elaborate the 2nd method? Would I need to develop a plugin for this?

Thank you.
Configuring Code Insights on Project / Repo level
Asked by Matthias Doering:

Referring to this thread <https://community.atlassian.com/t5/Bitbucket-questions/Code-Insights-REST-API-for-configuring-the-requirements/qaq-p/1601899>

I couldn't found an API endpoint to configuring it the config itself.

A.e I want to integrate Sonarqube you can add on Project / Repo level in the config under Code Insights

Required report: com.sonarsource.sonarqube

Required status: Must pass

Annotation requirements Must not have any annotations

How can I make an HTTP API Call to configure it?


Answers:
author: Matthias Doering
body: Any idea?


Tags: bitbucket-server

server
BitBucket builds for Android are failing
Asked by vkj:

I have been using BitBucket pipelines for sometime now and suddenly from yesterday builds have been failing with the following error  
* What went wrong:  
A problem occurred evaluating project ':app'.  
> Failed to apply plugin 'com.android.internal.application'.  
> Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.  
You can try some of the following options:  
- changing the IDE settings.  
- changing the JAVA_HOME environment variable.  
- changing `org.gradle.java.home` in `gradle.properties`.  
I am using Gradle version 7 / java 1.8 in my local machine builds and I am able to get the build done successfully. Not certain what is going wrong on the server builds.


Answers:
author: Jonas E
body: \`mingc/android-build-box\` doesn't seem to have jenv install but it does have java 11. I solved it by prefixing $PATH with the java 11 path and setting JAVA_HOME as first steps in my pipeline.

```
     script:

             - export PATH=/usr/lib/jvm/java-1.11.0-openjdk-amd64/bin:$PATH

             - export JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64/
```

comments: author: Andy Z_
body: Thank you [@Jonas E](/t5/user/viewprofilepage/user-id/4544656) , that solved my issue :-)

Still a bit mean that they mention **jenv** in the docs of the docker image, but then it is not recognized properly...


author: Andy Z_
body: This happened to me to, after I've upgraded the projects gradle from 4.2.2 to 7.0.1

Any solutions yet?

*** ** * ** ***

I am using:

```
# Using docker image from: https://hub.docker.com/r/mingc/android-build-box/
image: mingc/android-build-box:latest
```

And they say with **jenv**you can change the version. But in my pipeline script "jenv" is not a recognized command and Bitbucket pipelines fails with:

    + jenv local 11

    bash: jenv: command not found


Tags: bitbucket-pipelines

build

yaml
BUILD FAILED
Asked by Avesh Lakha:

I am trying to achieve **Salesforce CI and CD** Using Bitbucket Pipelines but when I am running the pipeline then I am getting the below error message.

<https://tinyurl.com/ydk5wpw3>

<br />

**Below is my bitbucket-pipelines.yml code**  
image:  
name: abhisheksaxena7/salesforcedockerimg  
pipelines:  
branches:  
feature/\*\*:  
- step:  
script:  
- ant -buildfile build/build.xml deployEmptyCheckOnly -Dsfdc.username=$SFDC_USERNAME -Dsfdc.password=$SFDC_PASS$SFDC_TOKEN -Dsfdc.serverurl=https://$SFDC_SERVERURL  
master:  
- step:  
script:  
- ant -buildfile build/build.xml deployCode -Dsfdc.username=$SFDC_USERNAME -Dsfdc.password=$SFDC_PASS$SFDC_TOKEN -Dsfdc.serverurl=https://$SFDC_SERVERURL  
I have reviewed many articles in the community but none of them resolved the issue. I have passed the correct user id and PW in the variable.


Answers:
author: Mark C
body: Hi [@Avesh Lakha](/t5/user/viewprofilepage/user-id/4161033)

Thank you for reaching out to the community.

To be honest, I'm not really that familiar with Salesforce CI/CD.  
However, based on the error message in the screenshot, it is referring to an authentication issue.

For this, I noticed that in your **ant** command, you're appending 2 environment variables for the flag **-Dsfdc.password**.

```
-Dsfdc.password=$SFDC_PASS$SFDC_TOKEN
```

Would it be possible for you to confirm if that's expected or you should only use either **$SFDC_PASS** or **$SFDC_TOKEN**?

Let me know how it goes.

Regards,  
Mark C


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

continuous-delivery

salesforce
How to rename the branch in bit bucket
Asked by sharmila Thoota Chengalvarayan:

How to rename the branch in bit bucket


Answers:
author: Mikael Sandberg
body: Hi [@sharmila Thoota Chengalvarayan](/t5/user/viewprofilepage/user-id/4528791),

Welcome to Atlassian Community!

To rename a branch you have to do it from within your local copy of the repository, and before pushing the change back to Bitbucket you have to remove the branch from within Bitbucket. Have a look at this thread, <https://community.atlassian.com/t5/Bitbucket-questions/Is-there-a-way-to-rename-a-branch/qaq-p/751398>


Tags: bitbucket-cloud

cloud
how to add node typescript project deploy in heroku.
Asked by Arun kumar gupta:

# Template NodeJS build

# This template allows you to validate your NodeJS code.  
# The workflow allows running tests and code linting on the default branch.

image: node:10.15.3

pipelines:  
default:  
- parallel:  
- step:  
name: Build and Test  
caches:  
- node  
script:  
- npm install  
- npm test  
- step:  
name: Code linting  
script:  
- npm install eslint  
- npx eslint .  
caches:  
- node  
- step:  
name: heroku-deploy  
deployment: production  
script:  
- pipe: atlassian/heroku-deploy:1.2.1  
variables:  
HEROKU_API_KEY: $HEROKU_API_KEY  
HEROKU_APP_NAME: $HEROKU_APP_ANME  
ZIP_FILE: $HEROKU_APP_ZIP_FILE  

<br />

<br />

Here is my code how to deploy it. all time I get error.


Answers:
author: Oleksandr Kyrdan
body: Hi [@Arun kumar gupta](/t5/user/viewprofilepage/user-id/1207464)

Thank you for your question!

Provide us with more details about your errors (logs, setup configuration), please, to help you.

Best regards,  
Oleksandr Kyrdan


Tags: bitbucket-pipelines

cloud

heroku
How do I query to fetch list of commits that between two dates?
Asked by Fatih Melih Ersoy:

I need to know the commits that between two dates in a branch. I'm using the REST API V2.

i need something like :

[https://api.bitbucket.org/2.0/repositories/user/repo/commits?include=master\&date\>2019-12-19\&date\<](https://api.bitbucket.org/2.0/repositories/2E0PGS/minecraft-server-manager/commits?include=develop)[2020-12-19](https://api.bitbucket.org/2.0/repositories/2E0PGS/minecraft-server-manager/commits?include=develop)

i need commits between these spesific dates


Answers:
author: Theodora Boudale
body: Hi [@Fatih Melih Ersoy](/t5/user/viewprofilepage/user-id/4528110) and welcome to the community.

I'm afraid that the API endpoint for getting the commits of a repo doesn't support filtering by date at the moment.

We have a feature request about this in our issue tracker:

* <https://jira.atlassian.com/browse/BCLOUD-11591>

I would suggest that you add your vote in the feature request (by selecting the **Vote for this issue** link) as the number of votes helps the development team and product managers better understand the demand for new features. You are more than welcome to leave any feedback, and you can also add yourself as a watcher (by selecting the **Start watching this issue** link) if you'd like to get notified via email on updates.

Implementation of new features is done as per our policy [here](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html) and any updates will be posted in the feature request.

In the meantime, as a workaround, you could make a mirror clone of the repo, and then use a git log command in the mirror clone with the options --after and --before, to get the commits between two dates.

Kind regards,  
Theodora

comments: author: Kokkonda, Raghavendar
body: Hello [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086) , any update on this question, looks like this was discussed roughly 3 years back and do not see any traction on this thread?


author: Theodora Boudale
body: Hi,

I'm afraid that I don't have any updates on the feature request. We get a large number of suggestions and feature requests; while we endeavor to update and respond to popular suggestions, the volume we receive means there will often be occasions when we can't provide an update or response.

In the meantime, apart from the workaround I mentioned with the git log command in a clone, you can get all commits via our API end then use another tool that filters json data in order to filter the results by dates. jq is such a tool.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud