tuffk / Logstash-output-to-Azure-Blob

Plugin to send Logstash output to Azure blob
Other
8 stars 15 forks source link

Error: Directory not empty #34

Closed guregini closed 4 years ago

guregini commented 4 years ago

@tuffk I have an issue with the plugin: after the plugin starts, I'm getting an error: [ERROR][logstash.outputs.logstashazurebloboutput][main] An error occured in the on_complete uploader {:exception=>Errno::ENOTEMPTY, :message=>"Directory not empty - C:/Users/xxx/AppData/Local/Temp/logstash/37d3800e-f987-4372-9c12-226d33215bc6", :path=>"C:/Users/xxx/AppData/Local/Temp/logstash/37d3800e-f987-4372-9c12-226d33215bc6/2020-07-25T18.46.fef14fc5-cff8-424f-b6f1-ffb8c115c3c2.part0.txt", :backtrace=>["org/jruby/RubyDir.java:493:in rmdir'", "uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/fileutils.rb:1432:inblock in remove_dir1'", "uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/fileutils.rb:1446:in platform_support'", "uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/fileutils.rb:1431:inremove_dir1'", "uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/fileutils.rb:1424:in remove'", "uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/fileutils.rb:763:inblock in remove_entry'", "uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/fileutils.rb:1481:in postorder_traverse'", "uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/fileutils.rb:761:inremove_entry'", "uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/fileutils.rb:681:in remove_entry_secure'", "uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/fileutils.rb:611:inblock in rm_r'", "org/jruby/RubyArray.java:1809:in each'", "uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/fileutils.rb:609:inrm_r'", "C:/Users/xxx/Downloads/logstash-7.8.0/logstash-7.8.0/vendor/bundle/jruby/2.5.0/gems/logstash-output-azure-2.1.0/lib/logstash/outputs/blob/temporary_file.rb:60:in delete!'", "C:/Users/xxx/Downloads/logstash-7.8.0/logstash-7.8.0/vendor/bundle/jruby/2.5.0/gems/logstash-output-azure-2.1.0/lib/logstash/outputs/azure.rb:267:inclean_temporary_file'", "org/jruby/RubyMethod.java:131:in call'", "C:/Users/xxx/Downloads/logstash-7.8.0/logstash-7.8.0/vendor/bundle/jruby/2.5.0/gems/logstash-output-azure-2.1.0/lib/logstash/outputs/blob/uploader.rb:55:inupload'", "C:/Users/xxx/Downloads/logstash-7.8.0/logstash-7.8.0/vendor/bundle/jruby/2.5.0/gems/logstash-output-azure-2.1.0/lib/logstash/outputs/blob/uploader.rb:32:in block in upload_async'", "C:/Users/xxx/Downloads/logstash-7.8.0/logstash-7.8.0/vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/java_executor_service.rb:79:inrun'"]}

A temp file is actually created under: AppData\Local\Temp\logstash\a4749586-b1e3-4940-bc55-55bb814bff08 and contains records of: 2020-07-25T15:35:56.382Z %{host} %{message}

image

The config looks like: input { elasticsearch { hosts => ["http://localhost:9200"] index => "bank" } } output { file { path => "./test.txt" // The data is written to this test file } azure { storage_account_name => "XXX" storage_access_key => "XXX" container_name => "data" } }

Thanks

tuffk commented 4 years ago

@guregini Thank you for submitting an issue. I'm afraid that I'm no longer maintaining this project. And at this moment it is very outdated. It'll be better if you check any of the forks and see if those are actively maintained.