youngmon/atlassian-qna huggingface dataset:
How to catch and substitute variable value if the variable has not yet been initialized?
Asked by Gregor Sinti?:

Hello,

when executing deployment project environment(deployment), my task is using two variables:

*

  ```
  ${bamboo.deploy.release.previous}
  ```

*

  ```
  ${bamboo.deploy.release}
  ```

When I am trying to deploy for the first time in this environment variable ${bamboo.deploy.release.previous} is not yet initialized because there is no previous version in this environment.

How do I catch this in Bamboo specs so I can substitute it with another value and get my tasks executed?

The error that I am getting is:

```
?-PdiffFrom=${bamboo.deploy.release.previous}: bad substitution
```

Thanks in advance,

Gregor


Answers:
author: Gregor Sinti?
body: Actually I found the solution myself when rereading the documentation <https://confluence.atlassian.com/bamboo0610/variables-for-deployment-environments-980469289.html>

"...Variables later in the following list override the previous ones in case of repeating names..."

What I did was that I created a variable with the same name and set it to an empty string and added it to the environment:

```
Variable from = new Variable("bamboo.deploy.release.previous", "");
```

If bamboo does not create this variable because there are no deployments made to the environment, it is an empty string. If bamboo creates the variable it gets overridden by the release string that is currently deployed on the said environment.

Sorry if this question was a bit premature, but maybe somebody will find use in it.

Best regards,

Gregor


Tags: deployment

spec

variable
Bamboo start-up in the localhost:8085
Asked by Ranga Reddy:

Hello Team,

I am not able to open the Bamboo server and intergrate any plugin. I tried to Re-install as well but still not working. Servivce is very slow.

Error:

org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load \[java.util.Comparator\]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.  
java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load \[java.util.Comparator\]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.  
at


Answers:
author: Daniel Ebers
body: Hi Ranga,

welcome to the Atlassian Community!

Unfortunately I cannot come up with an instant solution as I believe there must have been more errors logged to error log but the mentioned two which do not seem to be the root cause but just from reading them it is quite hard to tell.

Just for clarification: you said you are not able to open Bamboo at all, is this corrent? I am just asking because the last sentence you wrote states that the service is slow which suggests it is running (at least to some extent).

Please kindly provide as many details as possible. Someone from Atlassian Community is then more likely to catch up.  

For a more generic approach, the best recommendation I can come up with right now, please also refer to Bamboo documentation on troubleshooting installation:  
<https://confluence.atlassian.com/bamkb/troubleshooting-installation-216957437.html>

Thanks,  
Daniel


Tags: cloud
Java Specs PlanPermissions are not being set
Asked by FrankyG:

When my Bamboo Spec creates a build plan the permissions are (what I presume to be) default instead of what I set in code.

Relevant parts of my code:

```
public static void main(String[] args) {
  // ... snip ...

  Plan plan = planSpec.createPlan();
  bambooServer.publish(plan);

  PlanPermissions planPermission = planSpec.createPlanPermission();
  bambooServer.publish(planPermission);
}

Plan createPlan() {
  return new Plan(project(), PLAN_NAME, PLAN_KEY)
    .description(PLAN_DESCRIPTION)
    .linkedRepositories(LINKED_REPOSITORY_NAME)
    // ... snip ...
}

Project project() {
  return new Project()
    .key(PROJECT_KEY);
}

PlanPermissions createPlanPermission() {
   Permissions permissions = new Permissions()
         .groupPermissions("test-dev", PermissionType.VIEW, PermissionType.CLONE, PermissionType.BUILD, PermissionType.EDIT)
         .groupPermissions("test-admin", PermissionType.VIEW, PermissionType.CLONE, PermissionType.BUILD, PermissionType.EDIT, PermissionType.ADMIN)
         .loggedInUserPermissions(PermissionType.VIEW)
         .anonymousUserPermissionView();

   return new PlanPermissions(new PlanIdentifier(PROJECT_KEY, PLAN_KEY))
         .permissions(permissions);
}
```

Result of "View plan as Java Specs":

```
public PlanPermissions planPermission() {
  final PlanPermissions planPermission = new PlanPermissions(
    new PlanIdentifier(PROJECT_KEY, PLAN_KEY))
      .permissions(new Permissions()
      .loggedInUserPermissions(PermissionType.VIEW)
      .anonymousUserPermissionView());
  return planPermission;
}
```

I am using Bamboo 7.0.4 connected to Bitbucket Server 6.6.1.

The very first successful scan of the linked repository worked fine. I was able to access the edit screen, view the generated Java Spec, etc.  
Before pushing my next change (containing minor formatting), I deleted the build plan. After the next push, when the build plan was recreated, the permissions were missing. Even after deleting again and reverting my code, I can't get the permissions to work.

I had to set Project-level plan permissions before I could access the edit screen to get the above code snippet.


Answers:
author: FrankyG
body: It appears that setting *Access all projects* on the linked repository fixed this.
> Linked Repository -\> Bamboo Specs -\> Access -\> Access all projects

I ticked this to resolve a different issue (plan didn't have access to create a Deployment Project), and my access levels started applying.

Unfortunately this setting appears to require Global Admin, so I'm not sure if it's appropriate for all repos to have this.

comments: author: FrankyG
body: Accepting my own answer, but would love some insight into whether this is a good idea, or why it may have worked initially.


Tags: spec
Lost Bamboo Administrator
Asked by Lei Wang:

Hi All,

I just disabled the internal directory on Bamboo user directories, and now I lost bamboo-admin group, how do I enable the internal directory or get my administrator back? Thanks!


Answers:
author: Alexey Chystoprudov
body: <https://confluence.atlassian.com/bamboo/lockout-recovery-process-952624910.html>

comments: author: Lei Wang
body: It works! Thanks for your help!
Is a Bamboo Plugin in use?
Asked by Jared Grange:

I am looking at upgrading Bamboo and need to tell if a plugin is in use. I found this article from several years ago ([https://community.atlassian.com/t5/Bamboo-questions/How-to-tell-if-a-plugin-is-used-in-a-Bamboo-build-plan/qaq-p/407230#:\~:text=5%20instance%20by%20going%20to,SELECT%20p.](https://community.atlassian.com/t5/Bamboo-questions/How-to-tell-if-a-plugin-is-used-in-a-Bamboo-build-plan/qaq-p/407230#:~:text=5%20instance%20by%20going%20to,SELECT%20p.)), however, we are using PostgreSQL and attempts at converting the query to PostgreSQL haven't been productive.  

Any help would be greatly appriciated.


Answers:
author: Jared Grange
body: And yes, I am a noob to PostgreSQL.


Tags: app
Remote build agent hangs on startup
Asked by David Miller:

I am unable to start a remote build agent on a Linux machine. The initial startup goes well but hangs here:

```
INFO | jvm 1 | 2020/08/18 16:03:59 | 2020-08-18 16:03:59,954 INFO [AgentRunnerThread] [AgentRegistrationBean] Registering agent on the server,?
```

I'm using Bamboo 6.10.4 build 61009 - 21 Nov 19 and AdoptOpenJDK 1.8.

I've tried running the remote agent on two different Ubuntu 18 machines as well as on a fresh install of Ubuntu 20. They all hang at the same place.

This happens when the agent is run from Docker as well as 'bare-metal', like this:

```
export JAVA_HOME=/usr/lib/jvm/adoptopenjdk-8-hotspot-amd64

java -jar -Dbamboo.home=/home/developer/Bamboo ./atlassian-bamboo-agent-installer-6.10.4.jar https://porkchop.sandwiches:6443/agentServer
```

I *am* able to successfully start remote build agents from any Mac or Windows machine, both from Docker (the exact same image that I tried on the Linux machines) and bare-metal.

This started happening after we moved our Bamboo machine from one data center to another. I have been assured that nothing in the path between my machines and the Bamboo machine has changed.

What am I doing wrong? I don't get how it could work flawlessly with Mac and Windows but not at all with Ubuntu.

And I don't *think* it has anything to do with not being able to talk to the broker because I can netcat and telnet from the Ubuntu machines to 54663 on the Bamboo server.


Answers:
author: Jeyanthan I
body: Hi [@David Miller](/t5/user/viewprofilepage/user-id/4055456) ,

There could be quite a number of underlying root causes. The communication between the remote agent and server is done through two protocols, **HTTP** and **JMS** on top of separate unicast TCP connections. This communication is bi-directional, and the **remote agent** initiates both TCP connections. In other words, initial connections are only sent from agent to server. Responses are sent from server to agent.

**HTTP Connection:**The agent will usually connect to the server using the same Bamboo Base URL used for general user access.

**JMS Connection:** This connection will be established to the address configured in Bamboo broker at **\<Bamboo_Home\>/bamboo.cfg.xml** file or under Broker configuration in **Bamboo administration -\> General configuration**page.

What do you see in the \<BAMBOO_AGENT_HOME\>/atlassian-bamboo-agent.log?

With that being said, to troubleshoot, please check if you can connect to these 2 ports 8085 and 54663 by running the below commands from the bamboo agent and review . We need these 2 ports to be open and accessible.

```
telnet bamboo_baseURL 8085
telnet bamboo_baseURL 54663
```

Then, check if the broker configuration is set right on the server side. Any changes on the above requires a Bamboo and agent restart.

Hope that helps.

Cheers,  
Jey


author: Mehmet A _Bloompeak_
body: Hi [@David Miller](/t5/user/viewprofilepage/user-id/4055456) ,

Assuming that bamboo server is running on port 8085, check the connection from agent to bamboo server on port 8085.
Bamboo Plugin Development
Asked by Curtis:

I am looking to develop a plugin for Bamboo. I have downloaded the Atlassian Toolkit, and created a new Bamboo Plugin template. When I try to run it immediately, with no modifications, it says it has started Bamboo, but I only see a white page when I browse to the URL given.

Is the current default setup for a new Bamboo Plugin broken? Is there an easy fix to the config to get it working to proceed with creating a new plugin?

Thanks.


Answers:
author: Richard White _TechTime_
body: Probably best to ask this over at <https://community.developer.atlassian.com/c/bamboo-development>.

However I have seen something similar happen in the case where we were using a recent version of jdk with patch version higher than 255: [Bamboo Fails to start with java version higher than 255 - Bamboo KB](https://confluence.atlassian.com/bamkb/bamboo-fails-to-configure-embedded-database-in-environments-with-java-update-version-higher-than-255-1018269728.html "Bamboo Fails to start with java version higher than 255 - Bamboo KB")

comments: author: Curtis
body: Thanks. I'll go ask my question over there.

I did also run into that version higher than 255 issue as well.


Tags: app
Bamboo authentication to GitHub deprecation problem ?
Asked by Gabie Lambrechtse:

I was creating new Bamboo CI server and got this message from github:

```
On August 12th, 2020 at 19:20 (UTC) you used a password to access an endpoint through the GitHub API using Apache-HttpClient/4.5.10 (Java/1.8.0_261):

https://api.github.com/user/repos?per_page=100

Basic authentication using a password to the API is deprecated and will soon no longer work. Visit https://developer.github.com/changes/2020-02-14-deprecating-password-auth/ for more information around suggested workarounds and removal dates.

Thanks,
The GitHub Team
```

I try to find way to configure it for token or SSH but i didn't find way to do that ?

What can i do ?  
How i can continue using Bamboo and GitHub after September 30 ?

Currently using Bamboo 7.1.1  

Any help will be appreciated.


Answers:
author: Jeyanthan I
body: Hi [@Gabie Lambrechtse](/t5/user/viewprofilepage/user-id/4045445),

Thanks for bringing this up. I just tested in Bamboo 7.1.1 and you may just use your **Personal Access Token (PAT)** in place of **password** in your linked repository of type *GitHub repository*.

In the meantime, I will bring this to our developers' notice to make appropriate changes to this plugin's UI. Please monitor [BAM-20748](https://jira.atlassian.com/browse/BAM-20748) as [@Steffen Opel _Utoolity_](/t5/user/viewprofilepage/user-id/781567) suggested for updates.

Cheers,  
Jey

comments: author: Gabie Lambrechtse
body: Thank you it is working. But it will be great if documentation and UI are updated.


author: Jeyanthan I
body: Just to close the loop, this has already been fixed in Bamboo 7.1.3 and above.


author: Steffen Opel _Utoolity_
body: Hi Gabie, welcome to the Atlassian Community!  

That's an excellent question, and I'm afraid support for personal access tokens is simply not available yet - given the looming deadline I highly recommend to watch, vote, and ideally comment on the resp. feature request to hopefully get Atlassian's attention so that they can fast-track this crucial update for the supposedly widely used GitHub integration:

* [Add the ability to use personal access token authentication at Github plugin (BAM-20748)](https://jira.atlassian.com/browse/BAM-20748)


Tags: github
Bamboo 7 and Oracle 12.1
Asked by J?rg Lang:

We have Upgraded Bamboo to latest version and we now have the problem tht bamboo isn't starting up.

error in log:  
FATAL \[localhost-startStop-1\] \[DefaultBootstrapManager\] Validation tests failed: \[Task 51111 failed with exception: Bamboo doesn't support Oracle version Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production  
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,  
Advanced Analytics and Real Application Testing options. Please check <https://confluence.atlassian.com/display/BAMBOO/Supported+Platforms> for more information.\]  
FATAL \[localhost-startStop-1\] \[DefaultBootstrapManager\] Validation tests failed: Your Bamboo instance could not start because health check failed. Contact Atlassian Support at [https://support.atlassian.com](https://support.atlassian.com/)

We are running Bamboo as Windows Service and have set  
-Dbamboo.enable.unsupported.db="true"  
in the java properties but it seams not to work.

Any ideas on that?


Answers:
author: Jeyanthan I
body: Hi [@J?rg Lang](/t5/user/viewprofilepage/user-id/1859777) and [@parthiban_selvaraj](/t5/user/viewprofilepage/user-id/2387676),

It is possible that you might have added this parameter under bin/setenv.sh. If you are starting Bamboo as a service, you will need to configure either via the command line or in the Windows registry as explained in [this page](https://confluence.atlassian.com/bamboo/configuring-your-system-properties-289277345.html#Configuringyoursystemproperties-SettingpropertiesforWindowsservicesfromthecommandline) and restart the server.

Hope that helps.

Cheers,  
Jey


author: parthiban_selvaraj
body: Hi,

Did you solve this issue?


Tags: oracle

unsupported
Remote agent not showing proper system properties
Asked by Jesse Zhang:

After I configure my bamboo remote agent with following command:

java -jar atlassian-bamboo-agent-installer-6.9.0.jar http://{bambooserver}/agentServer/

On my bamboo web application, it shows only 317 MB is available, but the machine actually has a lot of unused memory at this moment, the remote agent server is one VM from a VSHPERE Server

Memory showing on server:
> top - 22:15:10 up 2 days, 1:22, 2 users, load average: 1.00, 1.00, 1.71  
> Tasks: 424 total, 2 running, 416 sleeping, 6 stopped, 0 zombie  
> %Cpu(s): 3.3 us, 0.9 sy, 0.0 ni, 95.8 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st  
> **MiB Mem : 128929.3 total, 66185.5 free, 2014.6 used, 60729.2 buff/cache**   
> MiB Swap: 8192.0 total, 8192.0 free, 0.0 used. 125884.6 avail Mem

Memory showing on bamboo:
> Wednesday, 12 Aug 2020  
> System Time22:08:08  
> Up Time4 hours, 44 minutes, 46 seconds (since Wed Aug 12 10:24:07 PDT 2020)  
> Usernameroot  
> User TimezoneEtc/UTC  
> User LocaleEnglish (United States)  
> System EncodingUTF-8  
> Operating SystemLinux 5.4.0-42-generic  
> Operating System Architectureamd64  
> Available Processors24  
> Network  
> Host Nameneobuild  
> IP Address127.0.1.1  
> **Memory Statistics**   
> **Total Memory317 MB**   
> **Free Memory231 MB**   
> **Used Memory85 MB**   
> Bamboo Paths  
> Current running directory/root/bamboo-agent-home/bin  
> Build working directory/root/bamboo-agent-home/xml-data/build-dir  
> Bamboo Home/root/bamboo-agent-home  
> Temporary directory/tmp  
> User home/root


Answers:
author: Sergey Podobry _Stellarity Software_
body: Bamboo reports memory statistics for a JAVA virtual machine and not for your entire OS. If you need to increase JAVA memory take a look at: [OutOfMemory Errors in Bamboo server or in remote agent](https://confluence.atlassian.com/bamkb/outofmemory-errors-in-bamboo-server-or-in-remote-agent-307038120.html)
Single Sign On (SSO) with different Passwords - Specify Alias Password?
Asked by Kai Kai:

Is it possible to realize SSO if a user has two different passwords in two apps? It seems that a user may only have different user names because specifying alias names is possible. Is there there no solution for different passwords (sometimes an user cannot change its own password)...

Thanks, Kai.


Answers:
author: Rodrigo Girardi Adami
body: Hi Kai,

I believe that won't be possible. For example, when you set SSO using Crowd and Confluence, the Confluence user must be inside Crowd and he will use the Crowd password to login to Crowd and Confluence.

Once you login to Crowd and try to access Confluence, the Confluence will verify the SSO token with Crowd and double check if your user has permission to access Confluence or not. If you have permission, then you'll be automatically logged into Confluence.

Atlassian ID works the same as you just have to login once and the SSO will do the trick with the other applications.

I hope this helps!

Rodrigo


Tags: sso
How to integrate a legacy application into Atlassian Crowd?
Asked by Kai Kai:

Hey everybody,

I want to have a Single Sign On (SSO) solution. IMO, this means the following: You log in once (within the webbrowser), then you do not have to login anywhere else, but can use all applications. For example, I log in once to JIRA, then I can also use Confluence without logging in once again. Right?

Now assume, there is a legacy application. You can develop a plugin or use the Crowd API to integrate it into SSO. Therefore, you have to add additional code (from the Crowd API) to your application. E.g. you would have to integrate the application to your SSO-solution using the Crowd-API instead of communicating with LDAP directly within the application, right? You cannot integrate the application without making code changes within the application?

If there is a legacy Java application (say a standalone Swing or HTML application), where you cannot change any code - can you still integrate it to your SSO-solution with Atlassian Crowd anyhow?

Thanks for help, Kai.


Answers:
author: Kai Kai
body: Thanks, after reading your answer and some more documentation (<http://confluence.atlassian.com/display/CROWD/Integrating+Crowd+with+a+Custom+Application>), I know understand how it works.

It seems to be very easy to integrate custom applications (by writing some code / configuration).

comments: author: Ivar
body: It is - we did :)


author: Ivar
body: I would say that it is impossible to know for sure Kai?! Both Confluence and Jira comes "out-of-the-box" with SSO turned off. But you can configure the application using the config files and another "driver" in order to use Crowd as SSO.

My point is - how are you legacy applications developed? Do they have a well documented configurable interface where security is implemented as a factory and all you have to do is configure the system to use the new "driver" instead of the default one? Can you turn on some sort of external security manager component thingy and tell the system to ask the external system instead of your existing security component?

If not - yes, I assume there will have to be some sort of code developed :)


Tags: crowd-integration

security

sso
Crowd password change does not affect Google Apps password.
Asked by Rocky Rocky:

When using Crowd to handle SSO for Google Apps, the user cannot change the password within Google Apps since he is directed to Crowd. This is a problem since non-web email clients use the Google Apps credentials and not Crowd. Either Google needs to provide a way to change their internal password while SSO is enabled or Atlassian needs to fix Crowd to update the internal Google password.


Answers:
author: Colin Goudie
body: Yep, this is a known limitation with the Google Apps API. - <http://confluence.atlassian.com/display/CROWD/Configuring+the+Google+Apps+Connector#ConfiguringtheGoogleAppsConnector-TheInsandOutsofSSOwithGoogleApps>

Log a ticket with Atlassian [at jira.atlassian.com](http://at%C2%A0jira.atlassian.com) but I think they are pretty much relying on google.

Alternatively you could talk to us (Appfusions) as we have a Google Apps Authenticator so you are at least using your Google Account as the master rather than delegating to crowd.


Tags: google-apps

sso