Unable to join ES server on port 9200

Hello, I am running elasticsearch and logstash on two different machines, the port 9200 and 9300 are "open" on the server running ES but it seems that the server running logstash doesn't have the rights to send data to the ES server. Here's some of my Logstash's logs.

`[2019-11-26T14:02:09,029][WARN ][logstash.outputs.elasticsearch][main] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"http://XX.XX.XX.XX:9200/", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [http://XX.XXX.XXX.XX:9200/][Manticore::SocketException] Connexion refusée (Connection refused)"}
Did i forgot something ?

`

Is your Elasticsearch cluster secured? If not I would suspect a network/firewall problem. Are you able to telnet to port 9200 on the Elasticsearch host from the Logtstash host?

I wasn't able to telnet it but it was a network problem I solved it thank you.