My Bitbucket Pipeline Deployments have all started failing consistently as of the start of this week.
Error message:
ssh: connect to host [redacted] port 22: Connection refused
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(231) [sender=3.3.0]
I was able to push code without issue last week, but for some reason, the connections are all now refused when the rsync image I am using (https://bitbucket.org/atlassian/rsync-deply) attempts to move the code to my server.
I maintain several sites at a university, and they are all on university-maintained VMs, which are protected by a firewall that requires all incoming and outgoing connections to be whitelisted.
I have been using Bitbucket Pipelines for about 2 years now, without any issues. The list of IPs I have whitelisted, according to the Technical Specification Document I have from my university server admins, is the following.
3.216.235.48
3.221.151.112
34.199.54.113
34.216.18.129
34.218.156.209
34.218.168.212
34.231.96.243
34.232.25.90
34.232.119.183
34.236.25.177
35.155.178.254
35.160.177.10
35.171.175.212
44.199.3.254
44.199.45.64
44.199.127.226
52.41.219.63
52.54.90.98
52.72.137.240
52.202.195.162
52.203.14.55
52.204.96.37
52.205.184.192
174.129.205.191
This list has served me well over the last two years, up until Tuesday of this week when I tried to push up a simple bugfix to one of my sites, only for the deployment step to fail. Since then, I have not been able to connect to any of my servers via the cloud runner machines that handle this step.
I checked with my server admin, and they assured me that no changes had been made on their end. I also shared with them the documentation of “IP addresses and domains to allowlist in your corporate firewall” (https://support.atlassian.com/bitbucket-cloud/docs/what-are-the-bitbucket-cloud-ip-addresses-i-should-use-to-configure-my-corporate-firewall/).
After reviewing this, my server admin got back to me with the following:
“The IP addresses listed in the Bitbucket document are included in your TSD as being able to have access via port 22. I compared the list directly and presuming the list at Bitbucket is up to date, these should all still be there.”
I also shared with him this blog post, which seemed relevant. https://bitbucket.org/blog/ip-address-update-2024
Most notable, is the “Firewall considerations” section. However it appears that that section refers to outbound connections, from my server to Bitbucket, but the issue is with inbound connections, from Bitbucket to my server(s).
I then found this page on the Atlassian site: https://confluence.atlassian.com/bbkb/troubleshooting-bitbucket-cloud-pipeline-ip-whitelisting-1209869206.html
I added the "curl ifconfig.me" command to my deployment step, which is the one that is failing.
I ran the failing step a few times and documented the resulting IPs and times, which resulted in this list of IP addresses that attempted to connect to my server.
54.147.109.37
3.81.17.66
44.202.51.50
98.84.41.228
75.101.235.132
54.147.109.37
54.147.109.37
54.147.109.37
54.87.80.152
3.88.28.240
3.88.28.240
It appears that these are all using AWS, which I suspect means that the IP list could be literally anything at this point.
I don’t usually post on forums like this asking for help, but as of now, I don’t have a paid plan with Bitbucket, so I cannot contact support directly.
I am exploring getting the paid plan, but I have to go through the contracts department at my university to get approval before I can do so, and that could take quite some time.
So, if anyone could provide me with any insights into why this is occurring all of a sudden, I would be forever grateful.
I am happy to provide any other information that may be needed in order to get some clarification on what has caused this issue, and what steps can be taken to resolve it.
My hope is that some additional IP addresses just need to be whitelisted and then this will all start working again. If that is the case, can someone point me in the right direction to where I can get this list?
Thank you in advance!