Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

SCP-Deploy Broken Pipe issue less than a minute after pipe starts


I'm using SCP-Deploy with OpenSSH on Windows Server. Everything worked fine for the first few runs. Suddenly I started getting Broken Pipe issue and scp proces freezes. The pipeline doesn't stop, looks like it's still going, no error is shown, but nothing happens and I have to stop it manually as it never progresses:

scp: E:/Sites/MYAPI/Microsoft.AspNetCore.Identity.EntityFrameworkCore.dll: Broken pipe


This happened intermittently, now happens pretty much every time I run the pipe. Tried setting ServerAliveInterval etc, but this doesn't help the issue. Any idea why this could be the case? SCP is my only option, apart from slow SFTP to move files to Windows Server from Bitbucket Pipelines hence any help would be greatly appreciated. Files I'm moving are not huge, it's a 200mb in total of .NET API where no one file is extremely large. The Broken Pipe issue shows up pretty much at the beginning of the transfer.

SCP yml section:

- pipe: atlassian/scp-deploy:1.2.1
SSH_PORT: '22'
LOCAL_PATH: /opt/atlassian/pipelines/agent/build/deploy/Services/*
EXTRA_ARGS: ['-o', 'ServerAliveInterval=60', '-o', 'ServerAliveCountMax=10']
DEBUG: 'true'

There is no difference when I remove EXTRA_ARGS


1 answer

0 votes

@kamilkloc hi. Thanks for your question. Looks like the problem is on your side if it works on the start and after some time it doesn't. Maybe you should check i.e firewall settings or networking etc.

Regards, Igor.

Might be on my side, or OpenSSH side, I checked firewall etc, all seems fine, no idea what it could be to be honest, especially that it worked fine multiple times beforehand. 

One thing that is bugging me is the fact that it only says "broken pipe" and bitbucket pipeline doesn't stop - seems like it's still running indefinitely (although not progressing) and has to be manually interrupted. Debug option doesn't show anything neither, no other messages apart from broken pipe next to the random file when it tries pushing it to the server.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

📣 Calling Bitbucket Data Center customers to participate in research

Hi everyone, Are you Bitbucket DC customer? If so, we'd love to talk to you! Our team wants to dive deep to understand your long-term plans regarding Bitbucket DC and Atlassian Cloud. Do you plan...

147 views 2 4
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