Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

ssh-run:0.8.0 fails with command not found with script on Windows Server

Jannis Lüchtefeld
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 27, 2024

 

So we are currently using the below step to restart our backend server. On one Server it works without any issues and on the other we receive the output as below. Anyway, the ssh run also states the step was succesfull.

We are using Windows server and the second server is a full clone of the first. 

Any ideas what might cause that? 

 

(i replaced the actual path in the output with its variable name)


 
/usr/bin/bash: line 5: n: command not found
116
/usr/bin/bash: line 6: �h: command not found
117
/usr/bin/bash: line 7: $'\200o': command not found
118
/usr/bin/bash: line 8: C: command not found
119
/usr/bin/bash: line 5: n: command not found
120
/usr/bin/bash: line 6: $backendPath: Is a directory

 

 

- step: &restart-backend
name: 'Restarts the backend'
script:
- 'echo ''cd'' $backendPath ''&& pm2 restart ecosystem.config.js'' > restart-script.sh'
- 'echo ''cd'' $backendPath ''&& pm2 status'' >> restart-script.sh'
- pipe: atlassian/ssh-run:0.8.0
variables:
SSH_USER: $User
SERVER: $Server
PORT: $Port
SSH_KEY: $sshkey
DEBUG: 'true'
MODE: 'script'
COMMAND: 'restart-script.sh'

1 answer

1 vote
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 29, 2024

Hi @Jannis Lüchtefeld 

The most common cause behind this, is that the command you are attempting to run does not appear to be installed, or the path is incorrect - the solution would be to run install commands prior to executing these commands.
We have an article with some troubleshooting steps below:

If you are still encountering issues - we'll need to grant ourselves access to your workspace to check your full build logs, YML config and environment. To do so - we need a formal support ticket so our system will allow us to grant ourselves this access, as a community support ticket is insufficient.

As you are a member of a Premium workspace, you are entitled to raise such a support ticket - please do so by using your Bitbucket Cloud URL:

If you are unable to do so, please let me know which timezone you are in so I can raise a ticket with the team in the correct region.

Cheers!

- Ben (Bitbucket Cloud Support)

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events