Hi. I'm trying to follow the "Parsing Logs with Logstash" (Tutorial), and I am having trouble when I try to connect my pipeline to Elasticsearch. My first-pipeline.conf file looks like this:
input {
    beats {
        port => "5044"
    }
}
filter {
    grok {
        match => { "message" => "%{COMBINEDAPACHELOG}"}
    }
}
output {
    elasticsearch {
        hosts => [ "localhost:9200" ]
    }
}
In the terminal where Logstash is running, I'm seeing this error printed to the console:
[2023-02-18T16:09:15,351][WARN ][logstash.outputs.elasticsearch][main] Attempted to resurrect connection to dead ES instance, but got an error {:url=>"http://localhost:9200/", :exception=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :message=>"Elasticsearch Unreachable: [http://localhost:9200/][Manticore::ClientProtocolException] localhost:9200 failed to respond"}
My Elasticsearch is running in a separate terminal, but I'm not even able to access it when I try to visit http://localhost:9200 in my browser.
I seem to only be able to connect to Elasticsearch via Kibana, which asks for the "elastic" username and a password that was generated by Elasticsearch when I first ran it.
Any help on trying to troubleshoot why I am unable to connect to Elasticsearch would be greatly appreciated. Thanks!