[RTFACT-8207] Add range-request support when using FS-Cache Created: 17/Sep/15  Updated: 14/Nov/17  Resolved: 07/Oct/15

Status: Resolved
Project: Artifactory Binary Repository
Component/s: Artifact Storage
Affects Version/s: None
Fix Version/s: 4.2.0

Type: Bug Priority: Normal
Reporter: Shay Bagants Assignee: Gidi Shabat
Resolution: Fixed Votes: 0
Labels: None


 Description   

When configuring the Artifactory storage.properties file to use the storage cache feature (fullDB cache, CachedFS cache..) and trying to send a Range-Request to Artifactory, Artifactory will print error when trying to save the resource in the cache. Artifactory should support the range-request also when using the filesystem cache feature.



 Comments   
Comment by Dima Nevelev (Inactive) [ 06/Oct/15 ]

the fix not working.
still getting the exception (tested on revision 2605):

2015-10-06 11:48:09,999 [http-nio-8082-exec-1] [ERROR] (o.a.s.b.s.p.FileCacheBinaryProviderImpl:309) - Something went wrong saving the cached file!
java.io.IOException: Someone called skipped 1
        at org.artifactory.storage.binstore.service.providers.SavedToFileInputStream.skip(SavedToFileInputStream.java:96) ~[artifactory-storage-common-4.x-SNAPSHOT.jar:na]
        at java.io.BufferedInputStream.skip(BufferedInputStream.java:377) ~[na:1.8.0_31]
        at com.google.common.io.ByteStreams.skipFully(ByteStreams.java:663) ~[guava-18.0.jar:na]
        at org.artifactory.request.range.stream.SingleRangeSkipInputStream.<init>(SingleRangeSkipInputStream.java:23) ~[artifactory-core-4.x-SNAPSHOT.jar:na]
        at org.artifactory.request.range.ResponseWithRangeSupportHelper.handleSingleRangeResponse(ResponseWithRangeSupportHelper.java:76) ~[artifactory-core-4.x-SNAPSHOT.jar:na]
        at org.artifactory.request.range.ResponseWithRangeSupportHelper.createRangeAwareContext(ResponseWithRangeSupportHelper.java:47) ~[artifactory-core-4.x-SNAPSHOT.jar:na]
        at org.artifactory.request.RequestResponseHelper.sendBodyResponse(RequestResponseHelper.java:91) ~[artifactory-core-4.x-SNAPSHOT.jar:na]
        at org.artifactory.engine.DownloadServiceImpl.respondFoundResource(DownloadServiceImpl.java:376) [artifactory-core-4.x-SNAPSHOT.jar:na]
        at org.artifactory.engine.DownloadServiceImpl.respond(DownloadServiceImpl.java:280) [artifactory-core-4.x-SNAPSHOT.jar:na]
        at org.artifactory.engine.DownloadServiceImpl.process(DownloadServiceImpl.java:213) [artifactory-core-4.x-SNAPSHOT.jar:na]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_31]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_31]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_31]
        at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0_31]
        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.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
        at org.artifactory.request.aop.RequestAdvice.invoke(RequestAdvice.java:65) [artifactory-core-4.x-SNAPSHOT.jar:na]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
        at com.sun.proxy.$Proxy67.process(Unknown Source) [na:na]
        at org.artifactory.webapp.servlet.RepoFilter.doDownload(RepoFilter.java:253) [artifactory-web-application-4.x-SNAPSHOT.jar:na]
        at org.artifactory.webapp.servlet.RepoFilter.execute(RepoFilter.java:178) [artifactory-web-application-4.x-SNAPSHOT.jar:na]
        at org.artifactory.webapp.servlet.RepoFilter.doFilter(RepoFilter.java:94) [artifactory-web-application-4.x-SNAPSHOT.jar:na]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [catalina.jar:8.0.22]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.22]
        at org.artifactory.webapp.servlet.AccessFilter.useAuthentication(AccessFilter.java:330) [artifactory-web-application-4.x-SNAPSHOT.jar:na]
        at org.artifactory.webapp.servlet.AccessFilter.useAnonymousIfPossible(AccessFilter.java:305) [artifactory-web-application-4.x-SNAPSHOT.jar:na]
        at org.artifactory.webapp.servlet.AccessFilter.doFilterInternal(AccessFilter.java:191) [artifactory-web-application-4.x-SNAPSHOT.jar:na]
        at org.artifactory.webapp.servlet.AccessFilter.doFilter(AccessFilter.java:155) [artifactory-web-application-4.x-SNAPSHOT.jar:na]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [catalina.jar:8.0.22]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.22]
        at org.artifactory.webapp.servlet.RequestFilter.doFilter(RequestFilter.java:65) [artifactory-web-application-4.x-SNAPSHOT.jar:na]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [catalina.jar:8.0.22]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.22]
        at org.artifactory.webapp.servlet.ArtifactoryFilter.doFilter(ArtifactoryFilter.java:116) [artifactory-web-application-4.x-SNAPSHOT.jar:na]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [catalina.jar:8.0.22]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.22]
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) [catalina.jar:8.0.22]
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [catalina.jar:8.0.22]
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) [catalina.jar:8.0.22]
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [catalina.jar:8.0.22]
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [catalina.jar:8.0.22]
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518) [catalina.jar:8.0.22]
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091) [tomcat-coyote.jar:8.0.22]
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668) [tomcat-coyote.jar:8.0.22]
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1521) [tomcat-coyote.jar:8.0.22]
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1478) [tomcat-coyote.jar:8.0.22]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_31]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_31]
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.0.22]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_31]
Generated at Wed Aug 12 01:38:22 UTC 2020 using Jira 8.5.3#805003-sha1:b4933e02eaff29a49114274fe59e1f99d9d963d7.