Cannot connect to elastic cluster on VPN machine

Hi, I am new to Elasticsearch. What I managed to do so far is to bring up ElasticSearch container and successfully connect to it using both http connection(via Postman) and using python client.

However, now I want to bring up such a container not on my machine. And I managed to bring this machine up and connect using http call. But when I try to connect through python client I get this error:

elastic_transport.TlsError: TLS error caused by: TlsError(TLS error caused by: SSLError(hostname '34.116.***.***' doesn't match either of 'localhost', '', '', 'bde723133f75'))

How I connect:

   es = Elasticsearch(
        basic_auth=(elastic_user, elastic_password),

Error occurres on this line res ="pdf-documents", query=query)

Welcome to our community! :smiley:

What are your Elasticsearch and docker config?

I am using docker-compose:

    container_name: elastic
      - "9200:9200"
      - "9300:9300"

And I did not configure anything more in Elastichsearch just copied cert and resetted password

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.