The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bitbucket pipeline hangs after ssh connection

Paweł Albecki
Contributor
December 7, 2018

I have a step like this:

 - step: 
name: step
script:
- ssh -v user@host "./some_script.sh"

 some_script.sh is fully executed (the last command is echo 'FINISHED')

FINISHED
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0

This step is running until Bitbucket timeout.

Do you know what is wrong here? Shouldn't it stop and allow execute the following step after script reaches its end?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
mwatson
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 9, 2018

Hi Pawel,

Typically this happens because there are a number of background processes still using the input or output of the ssh connection. You can try the -f option but this often causes other problems with leaving orphaned processes on the remote machine. The best thing to do would be to try the command locally and see if it hangs there as well,  then try some of the debugging tips from the answer here: https://superuser.com/questions/617252/why-does-ssh-hang-at-the-end-of-these-commands-and-how-can-i-make-it-exit

 

Hope this helps,

Matt Watson

TAGS
AUG Leaders

Atlassian Community Events