No logs for current timestamp shown in Disover tab

Hello,

I have verified on the same and below is the logstash conf.

input {
  beats {
    port => 5044
  }
}

output {
    elasticsearch {
        hosts => [ "http://localhost:9200" ]
        ssl_certificate_verification => false
        user => "elastic"
        password => "wakfgtqwJYKgYdYsKkE8"
  }
}

Also with the above user and password details I am able to run the curl and which give me output as below.

# curl -X GET -u elastic:wakfgtqwJYKgYdYsKkE8 "localhost:9200/"
{
  "name" : "ip-192-168-135-26",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "6Vzvcn7yTduloVhwrkG1jA",
  "version" : {
    "number" : "7.17.15",
    "build_flavor" : "default",
    "build_type" : "deb",
    "build_hash" : "0b8ecfb4378335f4689c4223d1f1115f16bef3ba",
    "build_date" : "2023-11-10T22:03:46.987399016Z",
    "build_snapshot" : false,
    "lucene_version" : "8.11.1",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

I tried restarting the logstash but it seen freezes and no response at all on the console.

Also the logs still reflecting as below.

root@ip-192-168-x-x:~# systemctl restart logstash

[2024-03-08T17:53:45,885][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::BadResponseCodeError, :message=>"Got response code '401' contacting Elasticsearch at URL 'http://localhost:9200/'"}

Just a ask if I am missing anything here.

Thanks,
Ravi