git push 错误:Caused by: org.eclipse.jgit.errors.MissingObjectException: Missing unknown 5643da47ebc3c7800a9b61c0fc4d35a715292de6

git push 错误:

[2018-09-26 14:05:51,688] ERROR com.google.gerrit.sshd.BaseCommand : Internal server error (user jkadmin account 1000398) during git-receive-pack ‘/svnemm/emm.git’
com.google.gerrit.sshd.BaseCommand$Failure: fatal: Unpack error, check server log
at com.google.gerrit.sshd.commands.Receive.runImpl(Receive.java:176)
at com.google.gerrit.sshd.AbstractGitCommand.service(AbstractGitCommand.java:101)
at com.google.gerrit.sshd.AbstractGitCommand.access$000(AbstractGitCommand.java:32)
at com.google.gerrit.sshd.AbstractGitCommand$1.run(AbstractGitCommand.java:70)
at com.google.gerrit.sshd.BaseCommand$TaskThunk.run(BaseCommand.java:442)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:368)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: Unpack error on project “svnemm/emm”:
AdvertiseRefsHook: org.eclipse.jgit.transport.AdvertiseRefsHookChain@1b821762class org.eclipse.jgit.transport.AdvertiseRefsHookChain

at com.google.gerrit.sshd.commands.Receive.runImpl(Receive.java:175)
… 12 more
Caused by: org.eclipse.jgit.errors.UnpackException: Exception while parsing pack stream
at org.eclipse.jgit.transport.ReceivePack.service(ReceivePack.java:246)
at org.eclipse.jgit.transport.ReceivePack.receive(ReceivePack.java:161)
at com.google.gerrit.sshd.commands.Receive.runImpl(Receive.java:115)
… 12 more
Caused by: org.eclipse.jgit.errors.MissingObjectException: Missing unknown 5643da47ebc3c7800a9b61c0fc4d35a715292de6
at org.eclipse.jgit.internal.storage.file.WindowCursor.open(WindowCursor.java:148)
at org.eclipse.jgit.lib.ObjectReader.open(ObjectReader.java:229)
at org.eclipse.jgit.revwalk.RevWalk.parseAny(RevWalk.java:840)
at org.eclipse.jgit.transport.BaseReceivePack.checkConnectivity(BaseReceivePack.java:1110)
at org.eclipse.jgit.transport.BaseReceivePack.receivePackAndCheckConnectivity(BaseReceivePack.java:884)
at org.eclipse.jgit.transport.ReceivePack.service(ReceivePack.java:192)
… 14 more

解决:
gerrit 操作 H2数据库:

java -jar bin/gerrit.war gsql

gerrit> \d
List of relations
TABLE_SCHEM | TABLE_NAME | TABLE_TYPE
————+—————————–+———–
PUBLIC | ACCOUNTS | TABLE
PUBLIC | ACCOUNT_DIFF_PREFERENCES | TABLE
PUBLIC | ACCOUNT_EXTERNAL_IDS | TABLE
PUBLIC | ACCOUNT_GROUPS | TABLE
PUBLIC | ACCOUNT_GROUP_BY_ID | TABLE
PUBLIC | ACCOUNT_GROUP_BY_ID_AUD | TABLE
PUBLIC | ACCOUNT_GROUP_MEMBERS | TABLE
PUBLIC | ACCOUNT_GROUP_MEMBERS_AUDIT | TABLE
PUBLIC | ACCOUNT_GROUP_NAMES | TABLE
PUBLIC | ACCOUNT_PATCH_REVIEWS | TABLE
PUBLIC | ACCOUNT_PROJECT_WATCHES | TABLE
PUBLIC | ACCOUNT_SSH_KEYS | TABLE
PUBLIC | CHANGES | TABLE
PUBLIC | CHANGE_MESSAGES | TABLE
PUBLIC | PATCH_COMMENTS | TABLE
PUBLIC | PATCH_SETS | TABLE
PUBLIC | PATCH_SET_ANCESTORS | TABLE
PUBLIC | PATCH_SET_APPROVALS | TABLE
PUBLIC | SCHEMA_VERSION | TABLE
PUBLIC | STARRED_CHANGES | TABLE
PUBLIC | SUBMODULE_SUBSCRIPTIONS | TABLE
PUBLIC | SYSTEM_CONFIG | TABLE

gerrit> select * from PATCH_SETS limit 3;
REVISION | UPLOADER_ACCOUNT_ID | CREATED_ON | DRAFT | CHANGE_ID | PATCH_SET_ID
—————————————–+———————+————————-+——-+———–+————-
0fd976c31660b2b55773fe0ba2c8e7a2a1266d4d | 1000000 | 2015-03-28 10:18:41.016 | N | 1 | 1
ae2bfa444bd384449a1feff32b3907da6a21b0db | 1000000 | 2015-03-28 10:22:32.739 | N | 2 | 1
67309f0999e5a7328fbd78e53de03a80bd814066 | 1000000 | 2015-03-28 10:23:18.7 | N | 2 | 2
(3 rows; 3 ms)
gerrit>

gerrit> select * from PATCH_SETS where REVISION=’5643da47ebc3c7800a9b61c0fc4d35a715292de6′;
REVISION | UPLOADER_ACCOUNT_ID | CREATED_ON | DRAFT | CHANGE_ID | PATCH_SET_ID
—————————————–+———————+————————-+——-+———–+————-
5643da47ebc3c7800a9b61c0fc4d35a715292de6 | 1000435 | 2018-08-03 12:38:59.203 | N | 27196 | 1
(1 row; 1 ms)

gerrit> select * from changes where change_id=27196;
CHANGE_KEY | CREATED_ON | LAST_UPDATED_ON | SORT_KEY | OWNER_ACCOUNT_ID | DEST_PROJECT_NAME | DEST_BRANCH_NAME | OPEN | STATUS | CURRENT_PATCH_SET_ID | SUBJECT | TOPIC | LAST_SHA1_MERGE_TESTED | MERGEABLE | ROW_VERSION | CHANGE_ID
——————————————+————————-+————————-+——————+——————+——————-+————————-+——+——–+———————-+———————————————————————————————————————+——-+——————————————+———–+————-+———-
I088052dd76b608ab89797e2c44114736a3a63721 | 2018-08-03 12:38:59.203 | 2018-08-03 12:38:59.203 | 004ef3b600006a3c | 1000435 | svnemm/emm | refs/heads/emm_209_FPJK | Y | n | 1 | 1. 通讯审计增加“通话总时长”、“主叫时长”、 “被叫时长” 、“主叫次数”、“被叫次数” 2. 列默认展示姓名、用户组、通话总时长、主叫时长、 被叫时长、主叫次数、被叫次数、查看记录共八列 3. 按照通话总时长从大到小正序排列 | NULL | c658deb824618f7bd1695d0e9d7274cf96254a15 | N | 102 | 27196
(1 row; 0 ms)

gerrit> update changes set open=’N’,status=’A’ where change_id=27196;
UPDATE 1; 22 ms
gerrit>

gerrit> \q
Bye
svn@git:~/gerrit/review_site$
svn@git:~/gerrit/review_site$
svn@git:~/gerrit/review_site$
svn@git:~/gerrit/review_site$ ./bin/gerrit.sh start
Starting Gerrit Code Review: OK

再提交就OK了:
[root@bogon emm.git]# git push –mirror ssh://jkadmin@192.168.1.29:29418/svnemm/emm.git
Counting objects: 278884, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (88342/88342), done.
Writing objects: 100% (278884/278884), 1.59 GiB | 54.90 MiB/s, done.
Total 278884 (delta 172642), reused 278884 (delta 172642)
remote: Resolving deltas: 100% (172642/172642)
remote: Counting objects: 278883, done
remote: Processing changes: refs: 15, done
To ssh://jkadmin@192.168.1.29:29418/svnemm/emm.git
+ 976df1f…3dd5fee master -> master (forced update)
* [new branch] emm_209 -> emm_209
* [new branch] emm_209_FPJK -> emm_209_FPJK
* [new branch] emm_209_GSDX -> emm_209_GSDX
* [new branch] emm_209_JBT -> emm_209_JBT
* [new branch] emm_209_LD -> emm_209_LD
* [new branch] emm_209_PAPH -> emm_209_PAPH
* [new branch] emm_209_QZXX -> emm_209_QZXX
* [new branch] emm_209_RDJC -> emm_209_RDJC
* [new branch] emm_209_SDHK -> emm_209_SDHK
* [new branch] emm_209_WXB -> emm_209_WXB
* [new branch] emm_209_XMNS -> emm_209_XMNS
* [new branch] emm_209_YTSD -> emm_209_YTSD
* [new branch] emm_209_hmjy -> emm_209_hmjy
* [new branch] feature_mgr_saas -> feature_mgr_saas
[root@bogon emm.git]#

 

相关链接:
https://blog.csdn.net/zwwjs/article/details/33723557
https://www.2cto.com/database/201501/370968.html
https://zhidao.baidu.com/question/1605326285565924027.html
https://dongyupu.github.io/2016/12/21/Gerrit-Gerrit-Code-Review-Unpack-error-Missing-unknown/

https://www.cnblogs.com/ZhangRuoXu/p/6483307.html

发表评论

电子邮件地址不会被公开。 必填项已用*标注