インデックス破損により Git コミットが Jira チケットにリンクされない

Jira 連携のトラブルシューティング

このページの内容

お困りですか?

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

コミュニティに質問

症状

Upon configuring the Application link and the Project link from JIRA to Stash (or Vice Versa), the commits are not linking to JIRA Tickets.   

atlassian-stash.log に次のエラーが返される。

2012-07-30 13:58:37,938 ERROR [pool-4-thread-1] admin 815x27x1 a7bq5z 93.220.70.231,217.115.149.100 /projects/TEST/repos/test/browse c.a.s.i.i.impl.ChangesetIndexingJob Error during indexing of test
com.atlassian.stash.exception.ServerException: An error occurred while executing an external process: /opt/stash/caches/idx-snapshots/1/1339427723617 (No such file or directory)
	at com.atlassian.stash.internal.scm.git.GitCommandExitHandler.evaluateThrowable(GitCommandExitHandler.java:123) ~[na:na]
	at com.atlassian.stash.internal.scm.git.GitCommandExitHandler.onCancel(GitCommandExitHandler.java:47) ~[na:na]
	at com.atlassian.stash.scm.BaseCommand.callExitHandler(BaseCommand.java:131) ~[stash-spi-1.1.2.jar:na]
	at com.atlassian.stash.scm.BaseCommand$CommandFuture.internalGet(BaseCommand.java:217) ~[stash-spi-1.1.2.jar:na]
...
Caused by: java.io.FileNotFoundException: /opt/stash/caches/idx-snapshots/1/1339427723617 (No such file or directory)
	at java.io.FileInputStream.open(Native Method) ~[na:1.7.0_04]
	at java.io.FileInputStream.<init>(FileInputStream.java:138) ~[na:1.7.0_04]
	at java.io.FileReader.<init>(FileReader.java:72) ~[na:1.7.0_04]
	at com.atlassian.stash.internal.idx.impl.RepositorySnapshotServiceImpl$RepositorySnapshotIterable$1.readPage(RepositorySnapshotServiceImpl.java:143) ~[stash-service-impl-1.1.2.jar:na]

原因

It is possible that some of the files from the STASH_HOME/caches/ directory were deleted/removed.  

回避策

Since Stash does not have a reindex function at the moment, it is not possible to re-create the indexes (caches).  Therefore, we recommend to remove the repository from the Stash Project and create it again. To do this:

  1. Clone the repository (the repository that is affected by the problem) to a location on your local disk (by executing git clone <repository_url> <location_on_disk>)
  2. Delete the repository at Repositories >> <name_of_repo> >> Settings >> Delete Repository
  3. Recreate the repository (using the same name) at Projects >> <name_of_project> >> Create Repository
  4. Push your local clone to the newly created repository (executing git push --all from within your clone directory should work provided you've used the same repository name for the newly created repository)
  5. The repository should re-index automatically at this point, check to see whether the Issues column is populated in the UI

制限事項

Do note that performing the above workaround will delete the pull request history. 

 

Help us improve!

Unknown macro: {kbsurvey}

Last modified on Mar 30, 2016

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

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