Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-26605

Rebuild metadata fails to rebuild corrupt metadata files

    XMLWordPrintable

    Details

    • Notability:
      3

      Description

      If a metadata file is deployed as corrupt, it can't be repaired via a rebuild metadata task.

      Expected: The rebuild metadata should fix corrupted metadata files. We should catch this exception, log it, and then delete and rebuild the corrupt file.

      2021-02-03 23:14:53,451-0600 WARN [quartz-11-thread-1] *SYSTEM org.sonatype.nexus.repository.maven.internal.orient.OrientMetadataRebuilder$Worker - Errors encountered during metadata rebuild:
      2021-02-03 23:14:53,452-0600 WARN [quartz-11-thread-1] *SYSTEM org.sonatype.nexus.repository.maven.internal.orient.OrientMetadataRebuilder$Worker - Error processing metadata for path: com/foo/bar/project/maven-metadata.xml
      org.sonatype.nexus.repository.maven.internal.hosted.metadata.MetadataException: Error processing metadata for path: com/foo/bar/project/maven-metadata.xml
      at org.sonatype.nexus.repository.maven.internal.hosted.metadata.AbstractMetadataRebuilder$Worker.processMetadata(AbstractMetadataRebuilder.java:280)
      at org.sonatype.nexus.repository.maven.internal.orient.OrientMetadataRebuilder$Worker.rebuildMetadataInner(OrientMetadataRebuilder.java:349)
      at org.sonatype.nexus.repository.maven.internal.hosted.metadata.AbstractMetadataRebuilder$Worker.rebuildMetadata(AbstractMetadataRebuilder.java:232)
      at org.sonatype.nexus.repository.maven.internal.orient.OrientMetadataRebuilder.rebuildInTransaction(OrientMetadataRebuilder.java:122)
      at org.sonatype.nexus.repository.maven.internal.orient.OrientMetadataRebuilder.rebuild(OrientMetadataRebuilder.java:104)
      at org.sonatype.nexus.repository.maven.internal.orient.MavenHostedFacetImpl.rebuildMetadata(MavenHostedFacetImpl.java:118)
      at org.sonatype.nexus.repository.maven.tasks.RebuildMaven2MetadataTask.execute(RebuildMaven2MetadataTask.java:60)
      at org.sonatype.nexus.repository.RepositoryTaskSupport.execute(RepositoryTaskSupport.java:79)
      at org.sonatype.nexus.scheduling.TaskSupport.call(TaskSupport.java:100)
      at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.doExecute(QuartzTaskJob.java:143)
      at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.execute(QuartzTaskJob.java:106)
      at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
      at org.sonatype.nexus.quartz.internal.QuartzThreadPool.lambda$0(QuartzThreadPool.java:145)
      at org.sonatype.nexus.thread.internal.MDCAwareRunnable.run(MDCAwareRunnable.java:40)
      at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120)
      at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.RuntimeException: java.io.EOFException: no more data available - expected end tags </lastUpdated></versioning></metadata> to close start tag <lastUpdated> from line 26813 and start tag <versioning> from line 5 and start tag <metadata> from line 2, parser stopped on START_TAG seen ...<lastUpdated>20210202174142... @26813:32
      at org.sonatype.nexus.repository.maven.internal.hosted.metadata.AbstractMetadataUpdater.replace(AbstractMetadataUpdater.java:129)
      at org.sonatype.nexus.repository.maven.internal.orient.OrientMetadataUpdater.lambda$1(OrientMetadataUpdater.java:54)
      at org.sonatype.nexus.transaction.OperationPoint.lambda$0(OperationPoint.java:53)
      at org.sonatype.nexus.transaction.OperationPoint.proceed(OperationPoint.java:64)
      at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:57)
      at org.sonatype.nexus.transaction.Operations.proceedWithTransaction(Operations.java:232)
      at org.sonatype.nexus.transaction.Operations.transactional(Operations.java:219)
      at org.sonatype.nexus.transaction.Operations.run(Operations.java:175)
      at org.sonatype.nexus.repository.maven.internal.orient.OrientMetadataUpdater.replace(OrientMetadataUpdater.java:53)
      at org.sonatype.nexus.repository.maven.internal.hosted.metadata.AbstractMetadataUpdater.processMetadata(AbstractMetadataUpdater.java:73)
      at org.sonatype.nexus.repository.maven.internal.hosted.metadata.AbstractMetadataRebuilder$Worker.processMetadata(AbstractMetadataRebuilder.java:277)
      ... 20 common frames omitted

        Attachments

          Activity

            People

            Assignee:
            mallen Mick Allen
            Reporter:
            rseddon Rich Seddon
            Last Updated By:
            Joe Tom Joe Tom
            Team:
            NXRM - Groot
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title