Connection refused error upon running GIT SSH operations after migrating or upgrading Bitbucket
プラットフォームについて: サーバーと Data Center のみ。この記事は、サーバーおよび Data Center プラットフォームのアトラシアン製品にのみ適用されます。
After upgrading and/or migrating Bitbucket, users cannot do GIT SSH operations (clone, push, etc) against Bitbucket.
- Bitbucket 7+
- A reverse proxy in front of Bitbucket.
The issue occurs for all users that use SSH. When connecting from another server a message that the connection is refused is thrown:
Connecting to bitbucketserver.com [192.168.1.2] port 7999.debug3: set_sock_tos: set socket 3 IP_TOS 0x48debug1: connect to address 192.168.1.2 port 7999: Connection refusedssh: connect to host bitbucketserver.com port 7999: Connection refusedfatal: Could not read from remote repository.Please make sure you have the correct access rightsand the repository exists.''
You may check the connection between the machine in which you are trying to GIT SSH and Bitbucket's server by running from the client machine:
telnet bitbucketserver.com 7999
The telnet tests the ability of the client to communicate with the Bitbucket server on the correct port and the output should be something like:
Trying <bitbucket_ssh_address>... Connected to <bitbucket_ssh_address>. Escape character is '^]'.
An intermediary element such as a firewall is blocking the requests to the Bitbucket host server since that traffic is not allowed to that hostname/port from the client machine.
Consult your system admin/network team to ensure that communications out to Bitbcuket's IP/port are allowed and that there is no kind of networking/firewall-level block preventing traffic from going between Bitbucket and your client.