org.jfrog.storage.binstore.exceptions.BinaryNotFoundException: Binary provider has no content for '.DS_Store'

JFrog JIRA | Alexis Tual | 5 months ago
  1. 0

    Steps to reproduce : - configure existing filestore with 2 shards and redundancy of 2 : {code:xml} <config version="4"> <chain> <provider id="cache-fs" type="cache-fs"> <provider id="sharding" type="sharding"> <sub-provider id="shard1" type="state-aware"/> <sub-provider id="shard2" type="state-aware"/> </provider> </provider> </chain> <provider id="sharding" type="sharding"> <readBehavior>roundRobin</readBehavior> <writeBehavior>roundRobin</writeBehavior> <redundancy>2</redundancy> </provider> <provider id="shard1" type="state-aware"> <fileStoreDir>filestore</fileStoreDir> </provider> <provider id="shard2" type="state-aware"> <fileStoreDir>filestore2</fileStoreDir> </provider> </config> {code} - create a file in filestore/ : touch filestore/.DS_Store - schedule the balancing with the REST API : /api/system/storage/optimize - run the GC to trigger the balancing You should see an exception : {code:java} 2016-06-27 17:40:55,697 [art-exec-256] [INFO ] (o.a.a.f.m.ShardingBinaryProviderImpl:379) - Double filestore found. Activating Checksum synchronization. 2016-06-27 17:40:55,698 [art-exec-256] [INFO ] (o.a.a.f.m.ShardingBinaryProviderImpl:388) - Synchronizing Binary Stores 2016-06-27 17:40:55,699 [art-exec-256] [ERROR] (o.a.a.f.m.ShardingBinaryProviderImpl:383) - Failed to balance the sharding elements org.jfrog.storage.binstore.exceptions.BinaryNotFoundException: Binary provider has no content for '.DS_Store' at org.jfrog.storage.binstore.providers.EmptyBinaryProvider.getStream(EmptyBinaryProvider.java:55) ~[binary-store-core-1.0.0.jar:na] at org.jfrog.storage.binstore.providers.FileBinaryProviderReadOnlyBase.getStream(FileBinaryProviderReadOnlyBase.java:127) ~[binary-store-core-1.0.0.jar:na] at org.artifactory.addon.filestore.multiple.StateAwareFileBinaryProviderImpl.getStream(StateAwareFileBinaryProviderImpl.java:63) ~[artifactory-addon-filestore-4.8.2.jar:na] at org.artifactory.addon.filestore.multiple.ShardingBinaryProviderImpl.balanceInternal(ShardingBinaryProviderImpl.java:423) ~[artifactory-addon-filestore-4.8.2.jar:na] at org.artifactory.addon.filestore.multiple.ShardingBinaryProviderImpl.optimize(ShardingBinaryProviderImpl.java:380) ~[artifactory-addon-filestore-4.8.2.jar:na] at org.jfrog.storage.binstore.common.BinaryProviderManagerImpl$OptimizationBinaryProviderVisitor.collect(BinaryProviderManagerImpl.java:336) [binary-store-core-1.0.0.jar:na] at org.jfrog.storage.binstore.providers.base.BinaryProviderBase.collect(BinaryProviderBase.java:88) [binary-store-core-1.0.0.jar:na] at org.jfrog.storage.binstore.providers.base.BinaryProviderBase.collect(BinaryProviderBase.java:90) [binary-store-core-1.0.0.jar:na] at org.jfrog.storage.binstore.common.BinaryProviderManagerImpl.optimize(BinaryProviderManagerImpl.java:187) [binary-store-core-1.0.0.jar:na] at org.artifactory.storage.db.binstore.service.BinaryServiceImpl.garbageCollect(BinaryServiceImpl.java:366) [artifactory-storage-db-4.8.2.jar:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_66] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_66] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_66] at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_66] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE] at com.sun.proxy.$Proxy56.garbageCollect(Unknown Source) [na:na] at org.artifactory.storage.binstore.service.BinaryStoreGarbageCollectorJob.onExecute(BinaryStoreGarbageCollectorJob.java:56) [artifactory-storage-common-4.8.2.jar:na] at org.artifactory.schedule.quartz.QuartzCommand.execute(QuartzCommand.java:52) [artifactory-storage-common-4.8.2.jar:na] at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [quartz-2.2.1.jar:na] at org.artifactory.schedule.ArtifactoryConcurrentExecutor$RunnableWrapper.run(ArtifactoryConcurrentExecutor.java:104) [artifactory-storage-common-4.8.2.jar:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_66] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_66] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_66] {code} In my case, it's due to hidden files generated by Mac OS X, but I believe any unknown file from Artifactory can trigger this.

    JFrog JIRA | 5 months ago | Alexis Tual
    org.jfrog.storage.binstore.exceptions.BinaryNotFoundException: Binary provider has no content for '.DS_Store'

    Root Cause Analysis

    1. org.jfrog.storage.binstore.exceptions.BinaryNotFoundException

      Binary provider has no content for '.DS_Store'

      at org.jfrog.storage.binstore.providers.EmptyBinaryProvider.getStream()
    2. org.jfrog.storage
      FileBinaryProviderReadOnlyBase.getStream
      1. org.jfrog.storage.binstore.providers.EmptyBinaryProvider.getStream(EmptyBinaryProvider.java:55)[binary-store-core-1.0.0.jar:na]
      2. org.jfrog.storage.binstore.providers.FileBinaryProviderReadOnlyBase.getStream(FileBinaryProviderReadOnlyBase.java:127)[binary-store-core-1.0.0.jar:na]
      2 frames
    3. org.artifactory.addon
      ShardingBinaryProviderImpl.optimize
      1. org.artifactory.addon.filestore.multiple.StateAwareFileBinaryProviderImpl.getStream(StateAwareFileBinaryProviderImpl.java:63)[artifactory-addon-filestore-4.8.2.jar:na]
      2. org.artifactory.addon.filestore.multiple.ShardingBinaryProviderImpl.balanceInternal(ShardingBinaryProviderImpl.java:423)[artifactory-addon-filestore-4.8.2.jar:na]
      3. org.artifactory.addon.filestore.multiple.ShardingBinaryProviderImpl.optimize(ShardingBinaryProviderImpl.java:380)[artifactory-addon-filestore-4.8.2.jar:na]
      3 frames
    4. org.jfrog.storage
      BinaryProviderManagerImpl.optimize
      1. org.jfrog.storage.binstore.common.BinaryProviderManagerImpl$OptimizationBinaryProviderVisitor.collect(BinaryProviderManagerImpl.java:336)[binary-store-core-1.0.0.jar:na]
      2. org.jfrog.storage.binstore.providers.base.BinaryProviderBase.collect(BinaryProviderBase.java:88)[binary-store-core-1.0.0.jar:na]
      3. org.jfrog.storage.binstore.providers.base.BinaryProviderBase.collect(BinaryProviderBase.java:90)[binary-store-core-1.0.0.jar:na]
      4. org.jfrog.storage.binstore.common.BinaryProviderManagerImpl.optimize(BinaryProviderManagerImpl.java:187)[binary-store-core-1.0.0.jar:na]
      4 frames
    5. org.artifactory.storage
      BinaryServiceImpl.garbageCollect
      1. org.artifactory.storage.db.binstore.service.BinaryServiceImpl.garbageCollect(BinaryServiceImpl.java:366)[artifactory-storage-db-4.8.2.jar:na]
      1 frame
    6. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_66]
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_66]
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_66]
      4. java.lang.reflect.Method.invoke(Method.java:497)[na:1.8.0_66]
      4 frames
    7. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201)[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      2 frames
    8. com.sun.proxy
      $Proxy56.garbageCollect
      1. com.sun.proxy.$Proxy56.garbageCollect(Unknown Source)[na:na]
      1 frame
    9. org.artifactory.storage
      BinaryStoreGarbageCollectorJob.onExecute
      1. org.artifactory.storage.binstore.service.BinaryStoreGarbageCollectorJob.onExecute(BinaryStoreGarbageCollectorJob.java:56)[artifactory-storage-common-4.8.2.jar:na]
      1 frame
    10. org.artifactory.schedule
      QuartzCommand.execute
      1. org.artifactory.schedule.quartz.QuartzCommand.execute(QuartzCommand.java:52)[artifactory-storage-common-4.8.2.jar:na]
      1 frame
    11. quartz
      JobRunShell.run
      1. org.quartz.core.JobRunShell.run(JobRunShell.java:202)[quartz-2.2.1.jar:na]
      1 frame
    12. org.artifactory.schedule
      ArtifactoryConcurrentExecutor$RunnableWrapper.run
      1. org.artifactory.schedule.ArtifactoryConcurrentExecutor$RunnableWrapper.run(ArtifactoryConcurrentExecutor.java:104)[artifactory-storage-common-4.8.2.jar:na]
      1 frame
    13. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0_66]
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_66]
      3. java.lang.Thread.run(Thread.java:745)[na:1.8.0_66]
      3 frames