It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Bamboo: Restart TC Server via SSH Task

When I run the script from the terminal, ssh'd into my server, stopping and starting TC Server ( works fine. When I launch this script via an SSH task in a Bamboo deployment, I get a 404. Why would the environment be any different? I have checked the paths and the environment variables. Am at a loss.

3 answers

1 accepted

0 votes
Answer accepted

The issue was the Aspose.Words.lic license file. I changed how we load the license from pointing to a file on the file system to:

class WordToolService {
License license
  private void init() {

  String licenseString = """
<!--<?xml version="1.0" encoding="utf-8"?>-->
InputStream licenseStream = new ByteArrayInputStream( licenseString.getBytes( "utf-8" ))
license = new License()


And now it works.



0 votes

Hello Andy,

Thank you for your question.

There are two things that come to my mind based on the scenario provided:

  1. you have mentioned you are able to run the script from Terminal but not from Bamboo. In the Terminal, which user was running the script Is this user the same one running Bamboo?
  2. by mentioning 404, I am tending to believe you are running the SSH task in a Bamboo deployment that is located on a different box where the command is intended to. Please, open up the build log generated by your deployment and have a look at its second line:

    simple	13-Feb-2015 17:48:25	Build Deployment of 'release-x' on '[ENVIRONMENT]' started building on agent [AGENT-NAME]
    simple	13-Feb-2015 17:48:25	Build working directory is [bammboo-home]/xml-data/build-dir/[project-plan-key]

    Please, go to "Build working directory" above mentioned and attempt to run the same script ( from Terminal.

If you find this answer useful, I would kindly ask you to accept it so the same will be visible to others who might be facing the same issue you have inquired.

Thank you for your understanding.

Kind regards,
Rafael P. Sperafico
Atlassian Support

Hi Rafael,

Yes, the user account is the same.

To give some more information, the steps I'm taking in the deployment are:

1) SCP the war file to the web server as the specific user. It does make it to the web server ok.

2) SSH the command to the web server to launch the shell script.

The shell script stops the web server ( stop), moves the new to the webapps directory, then starts the web server ( start).

If I run this script from the web server, it works fine.

If I run this script from the Bamboo deployment, it does not.

One other thing to note. On another environment, we have a very similar deployment to tomcat v7 that is working fine. 

Thank you very much for your help.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted Friday in Statuspage

Statuspage has 3 new integrations with Zendesk!

Incident response is a team sport, and customer support is an integral part of any team. While Ops is working hard to solve the problem at hand, support is on the front lines communicating with custo...

43 views 1 4
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you