Unable to connect to Opensearch cluster via python client

28 Views Asked by At

I setup an Opensearch managed service on Oracle cloud Infrastructure

I have no unusual security settings, just basic auth setup based on this doc - https://docs.oracle.com/en-us/iaas/Content/search-opensearch/Tasks/ingestingociopensearchdata.htm

A simple ping to my opensearch cluster via python library API will timeout..

es_client = OpenSearch(
   hosts = [{'host': host, 'port': port}],
   http_compress = True, # enables gzip compression for request bodies
   http_auth=("username", "pwd"), 
   use_ssl = False,
   verify_certs = False,
   ssl_assert_hostname = False,
   ssl_show_warn = True,
)
es_client.ping()

However, the curl command to the OpenSearch cluster works properly from the same VM.

Is there something I am missing something in my setup to use a client?

0

There are 0 best solutions below