Closed sunx0766 closed 1 year ago
Let's start with a basic sample without the langchain stack? Want to try to run https://github.com/dblock/opensearch-python-client-demo?
I wold also enable more logging:
import logging
logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.INFO)
I am 100% sure this is not a client problem and something to do with the host name/network, so I am going to close this.
@sunx0766 Let us know if curl
works successfully against your server, and if so enable logging. If there's a client bug we'll reopen of course.
For anyone else having issues to connect to their AWS OpenSearch domain, make sure that:
host
is copied from your OpenSearch domain endpoint
https://
prefixsearch-[domain-name]-[random].aos.[region].on.aws
port
is 443
use_ssl
is set to True
@Mdelaf it would be great to update docs/guides, maybe https://github.com/opensearch-project/opensearch-py/blob/main/guides/auth.md?
What is the bug?
I have an Amazon OpenSearch instance. When I try to connect to it with opensearchpy on a jupyter notebook .ipynb I get this error:
How can one reproduce the bug?
_I ran this code in a jyputer notebook. I have an amazon OpenSearch instance that is up and running on the VPC. For the aws_opensearchurl, I got it from AWS --> Amazon OpenSearch Service --> Domains --> Domain endpoint (VPC) and copied the URL from there.
What is the expected behavior?
a print statement of the version info
What is your host/environment?
LangChain: 0.0.330 opensearachpy: (2, 3, 2) OS Type: Darwin Python Version: 3.10.13
Do you have any additional context?
To double check that the instance is up and running, I ran
curl awe_opensearch_url -u 'username:password'
and I was able to get the cluster information_I tried changing the parameters of
use_ssl = True
,verify_certs=True
, with or without port, all didn't work__I also tried with all 3 connection classes as described in the connection_classes.md, still had no luck_