Sample stdout not working


(Barath Ashokkumar) #1

Hi,
I am using logstash 6.4.1 and a beginner. I am trying to execute the sample tutorial in the introduction blog but I dont get any results and the process doesn't end forcing me to do a ctrl^c to abort. Below is my config file content.
input {
file {
path => "C:\softwares\logstash-6.4.1\data\sample.log"
start_position => "beginning"
sincedb_path => "nul"
}
}
filter { }
output {
stdout{
codec => rubydebug
}}

Below is the content of the cmd prompt before I hit ctrl^c

logstash -f logstash-test.config
Sending Logstash logs to C:/softwares/logstash-6.4.1/logs which is now configured via log4j2.properties
[2018-10-02T10:57:41,482][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2018-10-02T10:57:42,070][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"6.4.1"}
[2018-10-02T10:57:44,913][INFO ][logstash.pipeline ] Starting pipeline {:pipeline_id=>"main", "pipeline.workers"=>8, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>50}
[2018-10-02T10:57:45,654][INFO ][logstash.pipeline ] Pipeline started successfully {:pipeline_id=>"main", :thread=>"#<Thread:0x1c8a008 sleep>"}
[2018-10-02T10:57:45,693][INFO ][filewatch.observingtail ] START, creating Discoverer, Watch with file and sincedb collections
[2018-10-02T10:57:45,726][INFO ][logstash.agent ] Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>[]}
[2018-10-02T10:57:46,344][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}

Kindly request your help to get me started.

Thank you.


(Bardie) #2

Your configuration should work. I have tested it on my end.

Try deleting the nul file created in your sincedb_path (It is on the same location as the configuration) and run logstash again.


(Barath Ashokkumar) #3

hi Bardie,

Thank you for your response. I don't find the nul file in the configuration location. There was no file that was created on yesterday (I tried to get the output on that day).

What puzzles me the most is, I have the same issue whenever I try to get input from a file. jdbc seems to be working fine.

Kindly request your help to figure out what I am doing wrong.


(Magnus Bäck) #4

Try deleting the nul file created in your sincedb_path (It is on the same location as the configuration) and run logstash again.

No. There is no nul file to delete. "nul" is a special and reserved filename on Windows.


(Barath Ashokkumar) #5

Hi Magnus Back,
Thank you for your response. Do you see any problem in the way I have implemented? Would be glad to receive your help.


(Bardie) #6

Oh! I didn't know that. On Linux, it creates a 'nul' file


(Magnus Bäck) #7

On Linux, it creates a 'nul' file

Yes, on Linux "nul" isn't a special file like on Windows. The equivalent file on Linux is /dev/null.


(system) #8

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