Search Guard and other security plugins, like Open Distro for Elasticsearch's security plugin, require authentication and HTTPS for connections to Elasticsearch. The script does not pass authentication information or support SSL certificate verification for self-signed SSL certificates, which is not an uncommon setup for Search Guard or other security plugins for Elasticsearch.