SSL error when using python api


(Ella Gati) #1

Hi,
I'm able to run queries to my elasticsearch cluster using sense and command line.
However, when I try to use the python api to run the same queries, I keep getting the following error:

elasticsearch.exceptions.SSLError: ConnectionError(EOF occurred in violation of protocol (_ssl.c:581)) caused by: SSLError(EOF occurred in violation of protocol (_ssl.c:581))

This is how I create the elasticsearch object:

es = Elasticsearch(
      'myhostadress:9200',
       use_ssl=True,
       verify_certs=True
)

which returns with no errors, but every function I try to run on it (es.search(...), es.count(...), es.cluster.health(...)) fails with the SSL error. I tried not using ssl and changing the ssl version, but the result is the same.
I also tries using the elasticsearch-DSL api, same error occured/
Any help is appreciated!


(Mark Walkom) #2

What handles the SSL on the ES side?


(Ella Gati) #3

So, apparently nothing does (I'm not managing the es cluster, just querying it)
After changing myhostaddress from https to http and changing use_ssl=False I am able to run my queries
Thanks for the response!


(system) #4