I am trying to collect a set of data from a URL and save it in a file as json format. below is my logstash configuration file . Kindly help me with troubleshooting where and what i am missing. I am getting error with permission for storing file in output i guess.
i am running logstash as root user
i gave chmod 777 permission to the folder where i am saving my output file.
I tried with both without creating the file i mentioned in output and also with file mentioned in the output. (along with highest permission - chmod 766)
[2019-03-26T22:32:48,055][FATAL][logstash.runner ] An unexpected error occurred! {:error=>#<Errno::EACCES: Permission denied - /root/ioc/minemeld.json>, :backtrace=>["org/jruby/RubyDir.java:449:in mkdir'", "uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/fileutils.rb:253:infu_mkdir'", "uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/fileutils.rb:227:in block in mkdir_p'", "org/jruby/RubyArray.java:1818:inreverse_each'", "uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/fileutils.rb:225:in block in mkdir_p'", "org/jruby/RubyArray.java:1734:ineach'", "uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/fileutils.rb:211:in mkdir_p'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-output-file-4.2.6/lib/logstash/outputs/file.rb:273:inopen'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-output-file-4.2.6/lib/logstash/outputs/file.rb:136:in block in multi_receive_encoded'", "org/jruby/RubyHash.java:1343:ineach'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-output-file-4.2.6/lib/logstash/outputs/file.rb:135:in block in multi_receive_encoded'", "org/jruby/ext/thread/Mutex.java:148:insynchronize'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-output-file-4.2.6/lib/logstash/outputs/file.rb:134:in multi_receive_encoded'", "/usr/share/logstash/logstash-core/lib/logstash/outputs/base.rb:87:inmulti_receive'", "org/logstash/config/ir/compiler/OutputStrategyExt.java:114:in multi_receive'", "org/logstash/config/ir/compiler/AbstractOutputDelegatorExt.java:97:inmulti_receive'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:390:in block in output_batch'", "org/jruby/RubyHash.java:1343:ineach'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:389:in output_batch'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:341:inworker_loop'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:304:in `block in start_workers'"]}
[2019-03-26T22:32:48,198][ERROR][org.logstash.Logstash ] java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit
My ultimate aim is to collect the data from URL and store it in json/csv file. then use the file inside a translate filter in different logstash conf file.
I am stuck with first step of collecting data into a file.
If you take at look at the code, you will see that it is trying to create a directory. Immediately before that error message there should be an INFO message telling you which directory it is trying to create (I would expect /root/ioc/).
I tried /tmp/minemeldoutput.json as my file output filter but could not narrow down the issue.
My logstash status is running , but there is no update of anything in logstash-plain.log and also in logstash-slowlog-plain.log
Also no output in tmp folder.
Kindly help with the issue. also i tried sending the collected data to elasticsearch but no luck.
below is my logstash conf file. anyways output to a file would be my required method.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.