REST API Stuck and Only Returns SSH-2.0-SSHD-CORE-0.9.0-ATLASSIAN-5

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

Symptoms

When connecting to the Bitbucket Server REST API the following is returned instead of the expected response.

The following appears in the atlassian-bitbucket.log:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 curl -i --user <USER>:<PASS> -v http://localhost:7999/rest/api/1.0/projects/<PROJECT>/repos/<REPO>/pull-requests * Adding handle: conn: 0x7fb89c004000 * Adding handle: send: 0 * Adding handle: recv: 0 * Curl_addHandleToPipeline: length: 1 * - Conn 0 (0x7fb89c004000) send_pipe: 1, recv_pipe: 0 * About to connect() to localhost port 7999 (#0) * Trying ::1... * Connected to localhost (::1) port 7999 (#0) * Server auth using Basic with user '<USER>' > GET /rest/api/1.0/projects/<PROJECT>/repos/<REPO>/pull-requests HTTP/1.1 > Authorization: Basic amVmZjpqZWZm > User-Agent: curl/7.30.0 > Host: localhost:7999 > Accept: */* > SSH-2.0-SSHD-CORE-0.9.0-ATLASSIAN-5

Cause

The REST API calls are being used on the SSH port for Bitbucket Server. In this case, port 7999 is used for SSH and HTTP traffic occurs on port 7990.

Resolution

Change the curl command so that the correct port for HTTP traffic is used.

1 curl -i --user <USER>:<PASS> -v http://localhost:7990/rest/api/1.0/projects/<PROJECT>/repos/<REPO>/pull-requests
Updated on April 7, 2025

Still need help?

The Atlassian Community is here for you.