REST API Stuck and Only Returns SSH-2.0-SSHD-CORE-0.9.0-ATLASSIAN-5
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
:
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.
curl -i --user <USER>:<PASS> -v http://localhost:7990/rest/api/1.0/projects/<PROJECT>/repos/<REPO>/pull-requests
Last modified on Mar 30, 2016
Powered by Confluence and Scroll Viewport.