What version of Elasticsearch are you trying to connect to?
I do not know of a written description of what is compatible with what. The code is here (that if/elsif/else block is returning false, which can happen in several ways). It hits the Elasticsearch root URL, parses the JSON it gets back, and checks some of the values.