Recent commits are not visible in pull-requests for all repositories in Bitbucket 8.x

お困りですか?

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

コミュニティに質問

Platform Notice: Data Center - This article 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.

*Fisheye および Crucible は除く

要約

In Bitbucket 8.x with multiple nodes and repositories have not been migrated to Mesh, recent commits are not visible in pull-requests for all repositories.

環境

Bitbucket 8.3.0 

診断

  1. The following warning is seen in the Bitbucket Server logs atlassian.bitbucket.log:


    2022-08-02 11:48:31,920 WARN  [http-scmrequest-handler:thread-833] user *120UQZVx708x531033x0 X x.x.x.x,x.x.x.x,x.x.x.x "POST /scm/x/xxx.git/git-receive-pack HTTP/1.1" c.a.s.i.s.g.p.h.MeshHttpReceivePack xxx/xxx[158558]: Git hooks have not been called. Please verify that the hooks are configured correctly - see https://confluence.atlassian.com/display/BITBUCKETSERVERKB/Git+hook+scripts+are+not+executing?utm_campaign=in-app-help&utm_medium=in-app-help&utm_source=stash for details


  2. The following information is seen in the mesh.log file: 


    2022-07-30 07:40:49,464 INFO  [main] - c.a.b.m.r.SharedHomeBitbucketServerShard Deleted stale configuration files: [/var/atlassian/application-data/bitbucket/shared/config/git/hooks/post-receive, /var/atlassian/application-data/bitbucket/shared/config/git/hooks/pack-objects, /var/atlassian/application-data/bitbucket/shared/config/git/hooks/reference-transaction, /var/atlassian/application-data/bitbucket/shared/config/git/hooks/pre-receive]


  3. The $BITBUCKET_HOME/shared/config/git/hooks directory is empty because the hook scripts are not available.
  4. Check if the NFS server and the Bitbucket node's clock are synced using the command below:

    cd /var/atlassian/application-data/bitbucket/shared
    date && touch modification-time.test && ls -l modification-time.test && rm modification-time.test

    This will return the date/time according to the node and the modification time reported by NFS after file creation. This issue occurs if the time returned is more than 10 seconds.

原因

When Mesh starts up it installs the hook scripts in the $BITBUCKET_HOME/shared/config/git/hooks directory, but in this case it deleted the files thinking they are stale. Bitbucket checks if there are any files in the $BITBUCKET_HOME/shared/config/git/hooks directory that was last modified more than 10s before it starts installing the hooks. So any time lapse up to 10 seconds will result in a stale state.

ソリューション

Sync the clocks of the NFS and the Bitbucket nodes. This 3rd party material is helpful with the steps to sync the clocks.



最終更新日 2022 年 9 月 12 日

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

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