# S3 plugin file collision

**URL:** <https://discuss.elastic.co/t/s3-plugin-file-collision/111066>\
**Category:** Logstash\
**Created:** [December 11, 2017, 10:36am UTC](https://discuss.elastic.co/t/s3-plugin-file-collision/111066 "2017-12-11T10:36:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![russellp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/russellp/32/25306_2.png) [@russellp](https://discuss.elastic.co/u/russellp)\
**Post date:** [December 11, 2017, 10:36am UTC](https://discuss.elastic.co/t/s3-plugin-file-collision/111066/1 "2017-12-11T10:36:15Z")

</div>

Having a small issue with pipelines on version 6.0 of logstash. I have a number of logs that I am reshaping and placing in an s3 bucket using the the following config:

> input {  
> file {  
> path =\> "/opt/folder/lib/billing/customer/_"  
> exclude =\> ["_.idx", "\*.properties"]  
> }  
> }
> 
> filter {  
> grok {  
> patterns\_dir =\> "/etc/logstash/patterns"  
> match =\> { "message" =\> "+_%{DATA:msisdn};%{DATA:imsi};%{DATA:imei};%{DATA:subscription};%{DATA:language};%{DATA:session\_start};%{DATA:service\_code};%{DATA:bearer};%{DATA:pages\_sent:int};%{DATA:duration:int};%{DATA:vlr\_number};%{DATA:unused2};%{CSVFIELD:action\_url}(;%{CSVFIELD:extra})?" }  
> }  
> date {  
> match =\> ["session\_start", "UNIX", "yyyyMMdd HH:mm:ss", "yyyy-MM-dd HH:mm:ss"]  
> }  
> ruby {  
> code =\> "  
> event.cancel if (event.get('@timestamp').to\_f - Time.now.to\_f) \> 31536000000  
> unless event.get('action\_url').nil?  
> url\_pairs = event.get('action\_url').scan(/,?([^=]_=[^,]+)/).map{ |codeAndUrl| codeAndUrl[0].split('=')}  
> event.set('action\_url\_codes', url\_pairs.map { |pair| pair[0].strip })  
> event.set('action\_urls', url\_pairs.map { |pair| pair[1].strip })  
> unless event.get('action\_urls').length==0  
> url1 = event.get('action\_urls')[0].split(///)  
> event.set('product', url1[url1.length-2])  
> end  
> end  
> " # 1000 years, drop dirty data which treates imsi as timestamp;split urls to to arrays.  
> }  
> mutate {  
> add\_field =\> { "operator" =\> "customer" }  
> }  
> }
> 
> output {  
> #stdout {
> 
> # codec =\> rubydebug
> 
> #}  
> s3 {  
> codec =\> "json\_lines"  
> access\_key\_id =\> "########################"  
> secret\_access\_key =\> "########################"  
> region =\> "##-####-#"  
> bucket =\> "###-#########-##"  
> prefix =\> "incoming/cellcube"  
> canned\_acl =\> "private"  
> restore =\> true  
> rotation\_strategy =\> "size\_and\_time"  
> time\_file =\> 5  
> size\_file =\> 5242880  
> encoding =\> "gzip"  
> validate\_credentials\_on\_root\_bucket =\> false  
> }  
> }

My problem is, when adding multiple pipelines of the same type using pipelines.yml, when the first file is uploaded (successfully) the other pipelines start reporting that they can not upload the same file and start filling up the logs with posts like the following:

> [ERROR][logstash.outputs.s3] Uploading failed, retrying {:exception=\>Errno::ENOENT, :message=\>"No such file or directory - No such file or directory - /tmp/logstash/41e79443-1df5-4c5e-876f-8a21a1d8b5b9/incoming/marker/ls.s3.5d118ec2-03f3-4ca0-8d40-b02ef9deb9cf.2017-12-08T15.44.part0.txt.gz", :path=\>"/tmp/logstash/41e79443-1df5-4c5e-876f-8a21a1d8b5b9/incoming/marker/ls.s3.5d118ec2-03f3-4ca0-8d40-b02ef9deb9cf.2017-12-08T15.44.part0.txt.gz", :backtrace=\>["org/jruby/RubyFileTest.java:240:in `size'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/aws-sdk-resources-2.3.22/lib/aws-sdk-resources/services/s3/file_uploader.rb:31:in `upload'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/aws-sdk-resources-2.3.22/lib/aws-sdk-resources/services/s3/object.rb:251:in `upload_file'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-output-s3-4.0.13/lib/logstash/outputs/s3/uploader.rb:38:in `upload'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-output-s3-4.0.13/lib/logstash/outputs/s3/uploader.rb:29:in `block in upload_async'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/concurrent-ruby-1.0.5-java/lib/concurrent/executor/java_executor_service.rb:94:in `run'"]}

Have I missed something?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 8, 2018, 10:36am UTC](https://discuss.elastic.co/t/s3-plugin-file-collision/111066/2 "2018-01-08T10:36:17Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
