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
/usr/bin/bash: line 6: �h: command not found
/usr/bin/bash: line 7: $'\200o': command not found
/usr/bin/bash: line 8: C: command not found
/usr/bin/bash: line 5: n: command not found
/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'
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.