How many parallel ssh connections?

Michael Hohlfeld June 7, 2022

Hi,

in Bitbucket pipeline i use some build scripts for my project. I try to update 17 customer systems parallel > so i need to open 17 ssh connections in parallel.

9 of 17 ssh connection failed with error message: "ssh: connect to host XXXX.my-server.com port 222: Network is unreachable"

After they failed i can "rerun the failed" to update all other failed customer systems... but this manually thing is not the solution.

 

Question: Is there a limitation for outgoing parallel ssh connections in Atlassian/Bitbucket/Pipeline?

 

Michael

1 answer

1 accepted

0 votes
Answer accepted
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 9, 2022

Hello @Michael Hohlfeld ,

Thank you for reaching out to Atlassian Support.

There shouldn't be a limitation on the number of the parallel SSH connection. As the error being returned is "Network is unreachable", I think there's a possibility of the destination server's firewall to be blocking the connection from pipelines. Do you have one pipeline step for each of the ssh connections, or do you run all of the connections at a single step? I ask this because different steps might be assigned different IP addresses from our IP ranges, so I would suggest making sure you have the all following IP addresses whitelisted in the firewall of all your customer's systems: 

Also, I would recommend trying to run it locally in a docker container, and see if you can reproduce the issue. To run it locally in a docker container and simulate a similar environment as pipelines you can follow the instructions outlined in the below documentation : 

Hope that helps! Let me know in case you have any questions.

Thank you, @Michael Hohlfeld .

Kind regards,

Patrik S

Michael Hohlfeld June 9, 2022

Hi Patrik,

regarding your question „Do you have one pipeline step for each of the ssh connections, or do you run all of the connections at a single step?

I run all of the connections at a single step and also increased the number of parallel incoming ssh connections on the customer system, but without success.

What works finally for me: Split the 17 parallel ssh connections from 1 step to 4 steps with 5+5+5+2 parallel ssh connections.

Pipeline time before: 2min

Pipeline time after: 6 min

Maybe your firewall thing will work, but my solution works great for me.

That the deployment needs now 6 instead of 2 min is totally fine for me.

Thanks and all the best

Michael

Like Patrik S likes this
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 9, 2022

Hello @Michael Hohlfeld ,

Awesome! Thank you for sharing the solution that you have used :)

Kind regards,

Patrik S

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events