Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-20841

Yum Index merging break on stale cache

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: 4 - Normal
    • Resolution: Unresolved
    • Affects Version/s: 6.13.1
    • Fix Version/s: None
    • Component/s: YUM
    • Labels:
      None
    • Severity:
      Medium

      Description

      When a virtual yum index calculation is launched, if any remote repository has expired cache, the indexation break with an exception.

       

      java.io.IOException: java.io.IOException: Error during merge of index: Cent7Server-epel-x86_64-cache/repodata/1922f8cbb7dd3a265e16539f0f720b11379515c0ed7061cce21a0de47ba029b9-primary.xml.gz: Can't retrieve file in path repodata/1922f8cbb7dd3a265e16539f0f720b11379515c0ed7061cce21a0de47ba029b9-primary.xml.gz from repo Cent7Server-epel-x86_64-cache
              at org.iostreams.streams.in.OutputToInputStream.checkForException(OutputToInputStream.java:170)
              at org.iostreams.streams.in.OutputToInputStream.read(OutputToInputStream.java:100)
              at java.base/java.io.InputStream.read(InputStream.java:205)
              at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2314)
              at org.apache.commons.io.IOUtils.copy(IOUtils.java:2270)
              at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2291)
              at org.artifactory.addon.yum.virtual.index.YumVirtualRepoMetadataWriter.writeMergedIndexToFileSystem(YumVirtualRepoMetadataWriter.java:156)
              at org.artifactory.addon.yum.virtual.index.YumVirtualRepoMetadataWriter.writeMetadata(YumVirtualRepoMetadataWriter.java:100)
              at org.artifactory.addon.yum.virtual.index.YumVirtualCalculatorImpl.writeYumVirtualMetadata(YumVirtualCalculatorImpl.java:83)
              at jdk.internal.reflect.GeneratedMethodAccessor739.invoke(Unknown Source)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:566)
              at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
              at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:295)
              at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
              at org.artifactory.storage.fs.lock.aop.LockingAdvice.invoke(LockingAdvice.java:76)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
              at com.sun.proxy.$Proxy306.writeYumVirtualMetadata(Unknown Source)
              at org.artifactory.addon.yum.virtual.index.YumVirtualCalculatorImpl.calculateYumVirtualMetadata(YumVirtualCalculatorImpl.java:69)
              at org.artifactory.addon.yum.virtual.index.YumVirtualCalculatorImpl.calculateYumVirtualMetadataAsync(YumVirtualCalculatorImpl.java:42)
              at jdk.internal.reflect.GeneratedMethodAccessor700.invoke(Unknown Source)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:566)
              at org.artifactory.work.queue.WorkQueueImpl.invoke(WorkQueueImpl.java:123)
              at org.artifactory.work.queue.WorkQueueImpl.doJobs(WorkQueueImpl.java:96)
              at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
              at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
              at org.artifactory.concurrent.ArtifactoryRunnable.run(ArtifactoryRunnable.java:50)
              at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
              at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
              at java.base/java.lang.Thread.run(Thread.java:834)
      Caused by: java.io.IOException: Error during merge of index: Cent7Server-epel-x86_64-cache/repodata/1922f8cbb7dd3a265e16539f0f720b11379515c0ed7061cce21a0de47ba029b9-primary.xml.gz: Can't retrieve file in path repodata/1922f8cbb7dd3a265e16539f0f720b11379515c0ed7061cce21a0de47ba029b9-primary.xml.gz from repo Cent7Server-epel-x86_64-cache
              at org.artifactory.addon.yum.virtual.merge.YumIndexMerger.writeIndexToMergedResult(YumIndexMerger.java:90)
              at org.artifactory.addon.yum.virtual.merge.YumIndexMerger.access$000(YumIndexMerger.java:35)
              at org.artifactory.addon.yum.virtual.merge.YumIndexMerger$1.write(YumIndexMerger.java:66)
              at org.iostreams.streams.in.OutputToInputStream$1.call(OutputToInputStream.java:140)
              at org.iostreams.streams.in.OutputToInputStream$1.call(OutputToInputStream.java:136)
              ... 5 common frames omitted
      Caused by: java.lang.IllegalStateException: Can't retrieve file in path repodata/1922f8cbb7dd3a265e16539f0f720b11379515c0ed7061cce21a0de47ba029b9-primary.xml.gz from repo Cent7Server-epel-x86_64-cache
              at org.artifactory.addon.yum.virtual.merge.YumIndexMerger.getResourceHandleFromContainingRepo(YumIndexMerger.java:121)
              at org.artifactory.addon.yum.virtual.merge.YumIndexMerger.getIndexInputStream(YumIndexMerger.java:101)
              at org.artifactory.addon.yum.virtual.merge.YumIndexMerger.writeIndexToMergedResult(YumIndexMerger.java:79)
              ... 9 common frames omitted
      

      Accessing the invalid file path return the following error:

      {
        "errors" : [ {
          "status" : 404,
          "message" : "Resource has expired"
        } ]
      }

      The workarround is to manually delete EVERY cache repository manually.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            pbusque Philippe Busque
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Sync Status

                Connection: RTFACT Sync
                RTMID-20841 -
                SYNCHRONIZED
                • Last Sync Date: