Bitbucket Server Mirror becomes unresponsive when system clock is not synchronised with upstream cluster nodes

お困りですか?

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

コミュニティに質問


プラットフォームについて: Data Center のみ - この記事は、Data Center プラットフォームのアトラシアン製品にのみ適用されます。

この KB は Data Center バージョンの製品用に作成されています。Data Center 固有ではない機能の Data Center KB は、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。

*Fisheye および Crucible は除く

要約

Bitbucket Mirror may become unresponsive and operations such as git clone or git fetch may be failing - for example:

$ git clone ssh://git@mirror.example.com:7999/bitbucket/my_project/my_repo.git
(...)
The authenticity of host '[mirror.example.com]:7999 ([ww.xx.yy.zz]:7999)' can't be established.
RSA key fingerprint is SHA256:EkCPi2FT6t/Rgh9KRm6UjrABbVRPsVb26sNtie5E4lR.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '[mirror.example.com]:7999,[ww.xx.yy.zz]:7999' (RSA) to the list of known hosts.

git@mirror.example.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

環境

This issue has been seen in multiple versions of Bitbucket Server.

診断

The Bitbucket Mirror's application log (atlassian-bitbucket.log) may include sequences similar to the following:

2020-12-11 19:19:22,138 WARN  [http-nio-8080-exec-207] @15KJ6TZx1159x1027941x2 <list_of_IP_addresses> "POST /rest/mirroring/latest/upstreamServers/a693f399-13bf-34a9-9b1e-5c9613e5939d/addon/events HTTP/1.1" c.a.j.i.s.DefaultAuthenticationResultHandler Failure during JWT authentication
com.atlassian.jwt.exception.JwtExpiredException: Expired at Fri Dec 11 19:15:53 IST 2020 and time is now Fri Dec 11 19:19:22 IST 2020 (30 seconds leeway is allowed)

...

2021-11-02 16:50:08,695 WARN  [main] c.a.b.i.m.m.DefaultUpstreamAnalyticsService Upstream and mirror clocks are out of sync by 60s, check the system clocks on the upstream and mirror nodes. This can sometimes cause JWT authentication to fail

原因

The Bitbucket Mirror's system clock is not synchronised with the system clocks of the upstream cluster nodes.

ソリューション

Check the date/time configuration on the Mirror server and on the servers of the upstream cluster nodes. Confirm that system clocks are being correctly synchronised with an NTP server, or some other mechanism, to ensure they match the current time.
See 
ntpd or chrony for an example program used to maintain the time on Linux systems.

Make sure the time difference between the servers does not exceed 30 seconds.

最終更新日 2022 年 11 月 8 日

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

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