Elasticsearch error: There was an issue communicating with your datasource.

Hello guys, I am facing a problem with Grafana datasource.

I am running elasticsearch and logstash on a windows server. On the same windows server I installed Grafana because I would like to visualise elastic search logs into grafana. I am able to curl localhost:9200 and the response is 200 and everything is working. I configured my logstash configuration and ran it (it created a index name logstash_index). I installed grafana, went to data sources and selected `elasticsearch. I filled all the fields, but when I try to save and test I get the error that there is an issue communicating with the datasource. Can anyone help me to address this issue?

This issue has been solved. thank you so much