Logstash Error with configuration

Hi,

Can anyone please help with this issue, I am running logstack. I made lesson on Udemy course (https://www.udemy.com/course/elasticsearch-7-and-elastic-stack/learn/lecture/14729000#announcements)

data: wget http://media.sundog-soft.com/es/access_log

there is my logstash.conf file:

        input {
                file {
                path => "/home/student/access_log“
                start_position => "beginning"
                }
        }

        filter {
                grok {
                match => { "message" => "%{COMBINEDAPACHELOG}" }
                }
                date {
                match => [ "timestamp", "dd/MMM/yyyy:HH:mm:ss Z" ]
                }
        }
        output {
                elasticsearch {
                        hosts => ["localhost:9200"]
                }
                stdout {
                codec => rubydebug
                }
        }

And below is error respont

sudo bin/logstash -f /etc/logstash/conf.d/logstash.conf

[ERROR] 2020-04-19 18:59:12.963 [Converge PipelineAction::Create<main>] agent - Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Expected one of [ \\t\\r\\n], \"#\", \"{\", \"}\" at line 4, column 21 (byte 73) after input {\n\tfile {\n\tpath => \"/home/student/access_log“\n\tstart_position => \"", :backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:41:in `compile_imperative'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:49:in `compile_graph'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:11:in `block in compile_sources'", "org/jruby/RubyArray.java:2580:in `map'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:10:in `compile_sources'", "org/logstash/execution/AbstractPipelineExt.java:161:in `initialize'", "org/logstash/execution/JavaBasePipelineExt.java:47:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:27:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline_action/create.rb:36:in `execute'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:326:in `block in converge_state'"]}

You cannot use curly quotes. Use regular double quotes. With curly quotes there you are setting the path to

"/home/student/access_log“
            start_position => "

That is why the error message complains about

after input {\n\tfile {\n\tpath => \"/home/student/access_log“\n\tstart_position => \"

It does not know how to parse the word beginning.

It was really bad typo..

thank you so much

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