Permission denied in logstash?

HI,
ES 2.4.0
Logstash 5.1.1
when i executed the following code :

input {
elasticsearch {
hosts => "http://localhost:9200/"
index => "mediacontent-jan-2017"

}
}
output {
file {
path => "C:\Users\571952\Desktop\logstash-5.1.1\logstashdata"
codec => json_lines
}
}

It is showing error like this in command prompt:

[2017-01-12T10:55:24,283][INFO ][logstash.pipeline ] Starting pipeline {"id"=>"mai
n", "pipeline.workers"=>2, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>5, "pipeli
ne.max_inflight"=>250}
[2017-01-12T10:55:24,283][INFO ][logstash.pipeline ] Pipeline main started
[2017-01-12T10:55:24,486][INFO ][logstash.agent ] Successfully started Logstash
API endpoint {:port=>9600}
[2017-01-12T10:55:24,720][INFO ][logstash.outputs.file ] Opening file {:path=>"C:/User
s/571952/Desktop/logstash-5.1.1/logstashdata"}
An unexpected error occurred! :error => Permission denied - C:/Users/571952/Desktop/logst
ash-5.1.1/logstashdata, :backtrace => ["org/jruby/RubyFile.java:370:in initialize'", "or g/jruby/RubyIO.java:871:innew'", "C:/Users/571952/Desktop/logstash-5.1.1/vendor/bundle/
jruby/1.9/gems/logstash-output-file-4.0.1/lib/logstash/outputs/file.rb:280:in open'", "C :/Users/571952/Desktop/logstash-5.1.1/vendor/bundle/jruby/1.9/gems/logstash-output-file-4 .0.1/lib/logstash/outputs/file.rb:132:inmulti_receive_encoded'", "org/jruby/RubyHash.ja
va:1342:in each'", "C:/Users/571952/Desktop/logstash-5.1.1/vendor/bundle/jruby/1.9/gems/ logstash-output-file-4.0.1/lib/logstash/outputs/file.rb:131:inmulti_receive_encoded'",
"org/jruby/ext/thread/Mutex.java:149:in synchronize'", "C:/Users/571952/Desktop/logstash -5.1.1/vendor/bundle/jruby/1.9/gems/logstash-output-file-4.0.1/lib/logstash/outputs/file. rb:130:inmulti_receive_encoded'", "C:/Users/571952/Desktop/logstash-5.1.1/logstash-core
/lib/logstash/outputs/base.rb:90:in multi_receive'", "C:/Users/571952/Desktop/logstash-5 .1.1/logstash-core/lib/logstash/output_delegator_strategies/shared.rb:12:inmulti_receiv
e'", "C:/Users/571952/Desktop/logstash-5.1.1/logstash-core/lib/logstash/output_delegator.
rb:42:in multi_receive'", "C:/Users/571952/Desktop/logstash-5.1.1/logstash-core/lib/logs tash/pipeline.rb:331:inoutput_batch'", "org/jruby/RubyHash.java:1342:in each'", "C:/Us ers/571952/Desktop/logstash-5.1.1/logstash-core/lib/logstash/pipeline.rb:330:inoutput_b
atch'", "C:/Users/571952/Desktop/logstash-5.1.1/logstash-core/lib/logstash/pipeline.rb:28
8:in worker_loop'", "C:/Users/571952/Desktop/logstash-5.1.1/logstash-core/lib/logstash/p ipeline.rb:258:instart_workers'"]

when i checked the permissions of logstashdata folder in properties tab everything is fine.

Can you create a file as that user in that directory?

hey, you way to create a file in that logstash folder

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