Logstash stuck at Successfully started Logstash API

HI,

I am trying to load a CSV file into Elastic Search using logstash. I previously loaded it but deleted the index and loading with document type field. But now i am stuck at
Successfully started Logstash API endpoint {:port=>9600} and control isnt moving further.
below is the config
//
input {
file {
path => "/Users/amar/Downloads/data/Towed_Cars_for_the_Past_30_Days.csv"
start_position => "beginning"
#sincedb_path => "/dev/null"
}
}

filter{
csv{
separator => ","
columns => ["TowNum","Tow_Firm","Tow_Firm_Address","Tow_Firm_Phone","Vehicle_State","Vehicle_Plate","Vehicle_Year","Make","Model","Color","Date","Time","geom","Census_2010_Tracts"]
}

mutate {convert => ["TowNum","integer"]}
mutate {convert => ["Vehicle_Year","integer"]}
mutate {convert => ["Census_2010_Tracts","integer"]}

}
output{
elasticsearch {
hosts => "localhost:9200"
index => "tcars"
document_type => "_doc"
}
stdout {}
}
//
Note that there is also problem with sincedb_path i have set it to /dev/null since i am on MAC OS but if its enabled i get different error

[2019-04-30T15:59:26,555][ERROR][logstash.javapipeline ] A plugin had an unrecoverable error. Will restart this plugin.
Pipeline_id:main
Plugin: <LogStash::Inputs::File start_position=>"beginning", path=>["/Users/amar/Downloads/data/Towed_Cars_for_the_Past_30_Days.csv"], id=>"be8992f287d4df754db475c47d1a6c1cb3fb9bdde952d23a7d3b4e172b64e83c", sincedb_path=>"/dev/null", enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_68ab4425-fac7-4f11-aafa-fffaa4b4149d", enable_metric=>true, charset=>"UTF-8">, stat_interval=>1.0, discover_interval=>15, sincedb_write_interval=>15.0, delimiter=>"\n", close_older=>3600.0, mode=>"tail", file_completed_action=>"delete", sincedb_clean_after=>1209600.0, file_chunk_size=>32768, file_chunk_count=>140737488355327, file_sort_by=>"last_modified", file_sort_direction=>"asc">
Error: Permission denied - Permission denied
Exception: Errno::EACCES
Stack: org/jruby/RubyFile.java:1263:in `utime'

Regards,
Chaitra

Hi Chaitra

I found this solution in the other conversation about similar problem.

It is possibile that the problem is with configuration documentation, naming and expectations..
sincedb_path is not meant to be a directory but a file, that's why it's attempting to write to "/tmp/sincedb_folder" as a file.

To check that it works, setting sincedb_path => "/tmp/mysincedbfile" should work fine

Bye
Franco

2 Likes

I have set it to Null and it works fine

if we set sincedbpath then it would update the file details in it. what if i delete index and run the script again ? how to fix such situation?

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