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
Community showcase
Published in Bamboo

Unable to add or edit Bitbucket Cloud repository in Bamboo

On 31 May, a GDPR-related change went live in the Bitbucket Cloud API that resulted in users not being able to create or edit Bitbucket Cloud Linked repositories in Bamboo. This API update removed t...

445 views 2 6
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you