Logstash 6.6.0 is sending Error: No such file or directory - C:/dev/null Exception: Errno::ENOENT

Hi!

I was trying to upgrade Logstash from version 6.2.4 to 6.6.0. I'm using windows 10

Logstash Version 6.2.4 runs fine and send my data to elasticsearch, but trying to do the same thing with version 6.6.0, using the same .conf file it send me this error.

[2019-01-30T10:58:16,106][INFO ][filewatch.observingtail  ] START, creating Discoverer, Watch with file and sincedb collections
[2019-01-30T10:58:16,117][ERROR][logstash.pipeline        ] A plugin had an unrecoverable error. Will restart this plugin.
  Pipeline_id:main
  Plugin: <LogStash::Inputs::File start_position=>"beginning", path=>["C:\\Users\\JOSEGA\\Documents\\Elastic\\1DISTCYBERFINANCIAL.csv"], id=>"daf6695aceca3e0add9a5007d61e0e081a4bf553ea002f87d2fff1aa4fec3333", sincedb_path=>"/dev/null", enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_08fabd6c-d88a-44f3-bf58-048364af4870", 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: No such file or directory - C:/dev/null
  Exception: Errno::ENOENT
  Stack: org/jruby/RubyFile.java:366:in `initialize'
org/jruby/RubyIO.java:1154:in `open'
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/fileutils.rb:1167:in `block in touch'
org/jruby/RubyArray.java:1734:in `each'
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/fileutils.rb:1161:in `touch'
C:/Users/JOSEGA/Documents/Elastic/logstash-6.6.0/vendor/bundle/jruby/2.3.0/gems/logstash-input-file-4.1.9/lib/filewatch/sincedb_collection.rb:22:in `initialize'
C:/Users/JOSEGA/Documents/Elastic/logstash-6.6.0/vendor/bundle/jruby/2.3.0/gems/logstash-input-file-4.1.9/lib/filewatch/observing_base.rb:62:in `build_watch_and_dependencies'
C:/Users/JOSEGA/Documents/Elastic/logstash-6.6.0/vendor/bundle/jruby/2.3.0/gems/logstash-input-file-4.1.9/lib/filewatch/observing_base.rb:56:in `initialize'
C:/Users/JOSEGA/Documents/Elastic/logstash-6.6.0/vendor/bundle/jruby/2.3.0/gems/logstash-input-file-4.1.9/lib/logstash/inputs/file.rb:332:in `start_processing'
C:/Users/JOSEGA/Documents/Elastic/logstash-6.6.0/vendor/bundle/jruby/2.3.0/gems/logstash-input-file-4.1.9/lib/logstash/inputs/file.rb:337:in `run'
C:/Users/JOSEGA/Documents/Elastic/logstash-6.6.0/logstash-core/lib/logstash/pipeline.rb:409:in `inputworker'
C:/Users/JOSEGA/Documents/Elastic/logstash-6.6.0/logstash-core/lib/logstash/pipeline.rb:403:in `block in start_input'

This log replys over and over many times. I don't know if there is a bug or something, as I mentioned with version 6.2.4 works and with version 6.6.0 doesn't

This is my .conf

input{
	file{
			path => "C:\Users\JOSEGA\Documents\Elastic\1DISTCYBERFINANCIAL.csv" 
			start_position => "beginning"
			sincedb_path => "/dev/null"
	}

}

filter {
	csv{
			separator => ","
			columns => ["server_name","application","sub_application_name","job_member_name","order_date","start_time","end_time","run_time",
						"average_runtime","host","agent_elapsed_time","completion_status"]
	}

	mutate{	convert =>  ["run_time", "integer"]}
	mutate{	convert =>  ["average_runtime", "integer"]}
	mutate{	convert =>  ["agent_elapsed_time", "integer"]}
	
	date{
	
			match => ["start_time", "MMMM d yyyy H mm ss"]
	
	}

}

output {
stdout { codec => rubydebug}
}

This may be a regression. Obviously in windows there is no /dev/null. You should use nul instead.

Hello guyboertje!

It's the same, even when I change to nul it keeps me sending the same message:

[2019-01-30T11:49:42,886][INFO ][filewatch.observingtail  ] START, creating Discoverer, Watch with file and sincedb collections
[2019-01-30T11:49:42,891][ERROR][logstash.pipeline        ] A plugin had an unrecoverable error. Will restart this plugin.
  Pipeline_id:main
  Plugin: <LogStash::Inputs::File start_position=>"beginning", path=>["C:\\Users\\JOSEGA\\Documents\\Elastic\\1DISTCYBERFINANCIAL.csv"], id=>"daf6695aceca3e0add9a5007d61e0e081a4bf553ea002f87d2fff1aa4fec3333", sincedb_path=>"/dev/null", enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_5d6e8266-a153-4685-a7a5-00ce539baa7d", 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: No such file or directory - C:/dev/null
  Exception: Errno::ENOENT
  Stack: org/jruby/RubyFile.java:366:in `initialize'
org/jruby/RubyIO.java:1154:in `open'
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/fileutils.rb:1167:in `block in touch'
org/jruby/RubyArray.java:1734:in `each'
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/fileutils.rb:1161:in `touch'
C:/Users/JOSEGA/Documents/Elastic/logstash-6.6.0/vendor/bundle/jruby/2.3.0/gems/logstash-input-file-4.1.9/lib/filewatch/sincedb_collection.rb:22:in `initialize'
C:/Users/JOSEGA/Documents/Elastic/logstash-6.6.0/vendor/bundle/jruby/2.3.0/gems/logstash-input-file-4.1.9/lib/filewatch/observing_base.rb:62:in `build_watch_and_dependencies'
C:/Users/JOSEGA/Documents/Elastic/logstash-6.6.0/vendor/bundle/jruby/2.3.0/gems/logstash-input-file-4.1.9/lib/filewatch/observing_base.rb:56:in `initialize'
C:/Users/JOSEGA/Documents/Elastic/logstash-6.6.0/vendor/bundle/jruby/2.3.0/gems/logstash-input-file-4.1.9/lib/logstash/inputs/file.rb:332:in `start_processing'
C:/Users/JOSEGA/Documents/Elastic/logstash-6.6.0/vendor/bundle/jruby/2.3.0/gems/logstash-input-file-4.1.9/lib/logstash/inputs/file.rb:337:in `run'
C:/Users/JOSEGA/Documents/Elastic/logstash-6.6.0/logstash-core/lib/logstash/pipeline.rb:409:in `inputworker'
C:/Users/JOSEGA/Documents/Elastic/logstash-6.6.0/logstash-core/lib/logstash/pipeline.rb:403:in `block in start_input'

The funny thing is why with version 6.2.4 works with /dev/null?

I tried these options but no one worked

input{
	file{
			path => "C:\Users\JOSEGA\Documents\Elastic\1DISTCYBERFINANCIAL.csv" 
			start_position => "beginning"
			sincedb_path => "nul"
	}


input{
    	file{
    			path => "C:\Users\JOSEGA\Documents\Elastic\1DISTCYBERFINANCIAL.csv" 
    			start_position => "beginning"
    			sincedb_path => "\nul"
    	}

input{
file{
path => "C:\Users\JOSEGA\Documents\Elastic\1DISTCYBERFINANCIAL.csv"
start_position => "beginning"
sincedb_path => "C:\nul"
}

1 Like

I put the nul in the version 6.2.4 and it works fine, And now when I change to the version 6.6.0 y doesn't bring me the message, but the tool doesn't do anything just keep like this:

[2019-01-30T12:30:06,095][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2019-01-30T12:30:06,110][INFO ][logstash.runner          ] Starting Logstash {"logstash.version"=>"6.6.0"}
[2019-01-30T12:30:12,619][INFO ][logstash.pipeline        ] Starting pipeline {:pipeline_id=>"main", "pipeline.workers"=>8, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>50}
[2019-01-30T12:30:13,059][INFO ][logstash.pipeline        ] Pipeline started successfully {:pipeline_id=>"main", :thread=>"#<Thread:0x10a0f39 run>"}
[2019-01-30T12:30:13,108][INFO ][logstash.agent           ] Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>[]}
[2019-01-30T12:30:13,115][INFO ][filewatch.observingtail  ] START, creating Discoverer, Watch with file and sincedb collections
[2019-01-30T12:30:13,384][INFO ][logstash.agent           ] Successfully started Logstash API endpoint {:port=>9600}

There is another regression I'm sorry to say. Some users are reporting that backslash based paths in windows are a problem.

Notice how the logging has converted them to forwardslashes

C:/Users/JOSEGA/Documents/Elastic/logstash-6.6.0/vendor/bundle/jruby/2.3.0/gems/logstash-input-file-4.1.9/lib/filewatch/sincedb_collection.rb

Please try with forward slashes.

Sorry about the inconvenience.

2 Likes

Thanks so much! Now it's working.

Best!!

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