Unexpected exception while mirroring occurrs after upgrade to 0.66.0
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 668
- Forks
- 135
- Avg merge
- 4d 19h
- Merged PRs (30d)
- 7
Description
Hi team.
After upgrading to 0.66.0, I am getting the following error message.
This issue seems to be preventing mirroring from working properly.
Do you have any idea what is causing the issue and is there anything I can try to fix it?
Thank you.
```
2024-07-04 08:31:39.543 [WARN ](c.l.c.s.i.m.DefaultMirroringService) [mirroring-worker-11-663] Unexpected exception while mirroring: {schedule=every minute, direction=REMOTE_TO_LOCAL, localProj=xxx, localRepo=xxx, localPath=/, remoteRepo=git+ssh://xxx.git, remotePath=/xxx/ remoteBranch=main, credential=PublicKeyMirrorCredential{id=xxx, hostnamePatterns=[github.com$], username=git, publicKey=ecdsa-sha2-...}}
com.linecorp.centraldogma.server.MirrorException: org.eclipse.jgit.api.errors.TransportException: Expected ACK/NAK, got: shallow 7bbd530a19784634d0dced0acef3fcecf33f5bd5
at com.linecorp.centraldogma.server.internal.mirror.AbstractMirror.mirror(AbstractMirror.java:171)
at com.linecorp.centraldogma.server.internal.mirror.MirroringTask.lambda$run$0(MirroringTask.java:64)
at io.micrometer.core.instrument.composite.CompositeTimer.record(CompositeTimer.java:141)
at com.linecorp.centraldogma.server.internal.mirror.MirroringTask.run(MirroringTask.java:64)
at com.linecorp.centraldogma.server.internal.mirror.DefaultMirroringService.run(DefaultMirroringService.java:243)
at com.linecorp.centraldogma.server.internal.mirror.DefaultMirroringService.lambda$run$6(DefaultMirroringService.java:227)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131)
at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:76)
at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: org.eclipse.jgit.api.errors.TransportException: Expected ACK/NAK, got: shallow 7bbd530a19784634d0dced0acef3fcecf33f5bd5
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:249)
at com.linecorp.centraldogma.server.internal.mirror.AbstractGitMirror.fetchRemoteHeadAndGetCommitId(AbstractGitMirror.java:463)
at com.linecorp.centraldogma.server.internal.mirror.AbstractGitMirror.mirrorRemoteToLocal(AbstractGitMirror.java:247)
at com.linecorp.centraldogma.server.internal.mirror.SshGitMirror.mirrorRemoteToLocal(SshGitMirror.java:112)
at com.linecorp.centraldogma.server.internal.mirror.AbstractMirror.mirror(AbstractMirror.java:162)
... 13 common frames omitted
Caused by: org.eclipse.jgit.errors.TransportException: Expected ACK/NAK, got: shallow 7bbd530a19784634d0dced0acef3fcecf33f5bd5
at org.eclipse.jgit.transport.BasePackFetchConnection.doFetch(BasePackFetchConnection.java:458)
at org.eclipse.jgit.transport.BasePackFetchConnection.fetch(BasePackFetchConnection.java:351)
at org.eclipse.jgit.transport.BasePackFetchConnection.fetch(BasePackFetchConnection.java:343)
at org.eclipse.jgit.transport.FetchProcess.fetchObjects(FetchProcess.java:290)
at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:182)
at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:105)
at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1482)
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:238)
... 17 common frames omitted
Caused by: org.eclipse.jgit.errors.PackProtocolException: Expected ACK/NAK, got: shallow 7bbd530a19784634d0dced0acef3fcecf33f5bd5
at org.eclipse.jgit.transport.PacketLineIn.readACK(PacketLineIn.java:163)
at org.eclipse.jgit.transport.BasePackFetchConnection.negotiate(BasePackFetchConnection.java:945)
at org.eclipse.jgit.transport.BasePackFetchConnection.doFetch(BasePackFetchConnection.java:447)
... 24 common frames omitted
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the stack trace in AbstractGitMirror.fetchRemoteHeadAndGetCommitId and the surrounding mirroring flow in AbstractMirror and SshGitMirror. Reproduce the failure against the reported 0.66.0 setup, then inspect the JGit FetchCommand and packet negotiation error; done means remote-to-local mirroring completes without the unexpected exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100