http://elasticsearch:9200/ is the default URL for logstash internal monitoring.
The warning probably means that connection is not possible because there is no host called elasticsearch listening on port 9200, you can test the connection with curl http://elasticsearch:9200/ and will probably get a similar failure (or just ping elasticsearch)
If you do not use monitoring and have no hostname called elasticsearch, you can disable monitoring or change the destination hosts.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.