Sorry I am pretty new to Google Clouds and Elasticsearch but I didn't find any doc on this. Basically we just deployed an Elasticsearch node on Google Clouds using Bitnami. But I am unable to connect with Python to it. I tried a lot of different formulation for the code below (host is the google cloud node external IP, user & password are those asked by Bitnami to connect to my application). Can someone let me know from where is it coming from and what is the correct syntax?
from elasticsearch import Elasticsearch
connection_parameters = [{'host': 'http://104.196.x.x', 'port': 80}]
es = Elasticsearch(connection_parameters, http_auth=('user', 'password'))
print(es.info())
Here is the error:
elasticsearch.exceptions.ConnectionError: ConnectionError(<urllib3.connection.HTTPConnection object at 0x7f72e757a090>: Failed to establish a new connection: [Errno -2] Name or service not known) caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x7f72e757a090>: Failed to establish a new connection: [Errno -2] Name or service not known)
Thanks a lot if you can help me on that!