Getting -1001 status codes for SSH connections in Bitbucket Server

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Sometimes, SSH-specific API calls in Bitbucket Server/Data Center may display a -1001 status code in the logs.

Log Snippet from atlassian-bitbucket-access.log

1 2 10.20.30.40 | ssh | i@QMABCDx123x45670511x1 | user@domain | 2024-01-31 14:46:29,722 | SSH - git-upload-pack '/proj/repo.git' | "SSH-2.0-Go" | - | - | - | - | - | abc | 10.20.30.40 | ssh | o@QMABCDx123x45670511x1 | user@domain | 2024-01-31 14:46:29,752 | SSH - git-upload-pack '/proj/repo.git' | "SSH-2.0-Go" | -1001 | 4 | 4855 | ssh:user:id:3641676 | 31 | abc |

Log Snippet from atlassian-bitbucket.log

1 2024-01-31 14:46:29,722 DEBUG [ssh-scm-request-handler] xyz @A5Q123x123x456789x2 xyz XX.XX.XX.XX SSH - git-receive-pack '/proj/repo.git' c.a.s.i.s.g.p.s.SshCommandExitHandler git receive-pack /opt/atlassian/bitbucket/data/application-data/bitbucket/shared/data/repositories/<repo_id>: (Exit code: -1001)

Environment

Bitbucket Server 8.9.5

Applies to Bitbucket Server/Datacenter 8.x

Cause

The most likely cause for status -1001 is either the client aborts the connection or the connection is interrupted at a network level. To identify or notice such a cause uniquely, status -1001 is defined at the Application level.

Solution

Issue need to be checked at the network level if the process is consuming too much time or at the client side to further isolate the issue.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.