SSH clones fail with "WindowClosedException: Already closed"

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server と Data Center のみ - この記事は、サーバーおよびデータセンター プラットフォームのアトラシアン製品にのみ適用されます。

問題

Clones and fetches are very slow and fail with:

bstuart$ git clone ssh://git@localhost:7999/tagged/web.git
Cloning into 'web'...
remote: Counting objects: 1315343, done.
remote: Compressing objects: 100% (363726/363726), done.
Corrupted MAC on input. (396153/1315343), 398.21 MiB | 556.00 KiB/s   
Disconnecting: Packet corrupt
Write failed: Broken pipe
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

Stash stops and the following appears in the atlassian-stash.log if debug logging is enabled:

2015-11-03 10:20:00,366 DEBUG [ssh-scm-request-handler] @14VBBVLx599x110072x10 bstuart 10.15.11.22 SSH - git-upload-pack 'tagged/web.git' c.a.s.s.c.s.CachingSshUploadPackRequest [TAGGED/web[650]] Exception encountered while processing a git-upload-pack request
org.apache.sshd.common.channel.WindowClosedException: Already closed

原因

  1. A known issue in the SSH library that Bitbucket uses, MINA SSH.
  2. The network is killing SSH connections early. 

Diagnose

原因 1

Temporarily add the following to the ~/.ssh/config file. Create it if it doesn't exist.

Host stashhost
   LogLevel DEBUG3
   RekeyLimit 1K

If you receive the following in the output this is most likely related to BSERV-5472 - Getting issue details... STATUS .

Disconnecting: Protocol error: expected packet type 31, got 94

原因 2

Remove any possibility that the network is closing the SSH connection early by reproducing the problem locally on the Stash Server. Clone directly to the Stash server with SSH to see if the clone is successful every time. 

ソリューション

ソリューション 1

BSERV-5472 - Getting issue details... STATUS

Upgrade to Bitbucket Server 3.6+ or follow the workarounds provided on the above page. 

ソリューション 2

Something specific to the network is closing the Git connections. More troubleshooting will be necessary to determine where the termination occurs.

In previous cases we have seen that the timeout setting for any proxies in front of the application need to be increased sufficiently to allow the operation to complete.

If the above doesn't help and the issue needs to be further investigated, open a support ticket at https://support.atlassian.com/ja and attach the SSH debug logging and a support zip with debug and profile logging. 

最終更新日 2017 年 1 月 5 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.