I can't seem to connect to logstash for some reason?

Dec 20 17:46:32 ELK-Server logstash[690]: [2025-12-20T17:46:32,609][WARN ][logstash.outputs.elasticsearch][main] Attempted to resurrect connection to dead ES instance, but got an error {:url=>"khttp://localhost:9200/", :exception=>LogStash::Outputs::Elasticsearch::HttpClient::Pool::HostUnreachableError, :message=>"Elasticsearch Unreachable: [khttp://localhost:9200/\][Manticore::ClientProtocolException] localhost:9200 failed to respond"}

This is the error I am getting. Not sure what I did wrong. I added “k” in front of the links cause it wouldn’t let me post it.

And here is my beats.conf

input {
  beats {
    port => 5044
  }
}

output {
  elasticsearch {
    hosts => ["https://localhost:9200"]
    user => "elastic"
    password => "***************"
    cacert => "/etc/elasticsearch/certs/http_ca.crt"
    index => "nmap-logs-%{+YYYY.MM.dd}"
  }
}