Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SycamoreQueryClient.get_opensearch_schema returning ConnectionError #1186

Open
andrewbowen19 opened this issue Feb 14, 2025 · 3 comments
Open

Comments

@andrewbowen19
Copy link

andrewbowen19 commented Feb 14, 2025

Describe the bug
Running through the code in the query demo notebook and hitting a ConnectionRefusedError

To Reproduce
Here's the code used

from sycamore.query.client import SycamoreQueryClient
# from sycamore.query.visualize import visualize_plan
from rich.console import Console

console = Console()
client = SycamoreQueryClient()

# This is the index name to query.
OS_INDEX = "const_ntsb"

# Here is your query text.
QUERY = "How many airplane incidents were there in Washington in 2023?"

schema = client.get_opensearch_schema(OS_INDEX)
console.print(schema)

Here's the error stacktrace:


ConnectionRefusedError: [Errno 61] Connection refused

During handling of the above exception, another exception occurred:


ConnectionError: ConnectionError(<urllib3.connection.HTTPSConnection object at 0x338650b50>: Failed to establish a new connection: [Errno 61] Connection refused) caused by: NewConnectionError(<urllib3.connection.HTTPSConnection object at 0x338650b50>: Failed to establish a new connection: [Errno 61] Connection refused)

Deskltop:

  • Device: Macbook pro
  • OS: Sequoia 15.3

Additional context
Add any other context about the problem here.

@baitsguy
Copy link
Contributor

Hey, do you have opensearch running locally? It tries to use localhost:9200 as the default endpoint:

DEFAULT_OS_CLIENT_ARGS = {

You probably want to pass in a custom config the query client if you have a different cluster running, or spin up a local opensearch docker image (https://opensearch.org/docs/latest/install-and-configure/install-opensearch/docker/#run-opensearch-in-a-docker-container)

@austintlee
Copy link
Contributor

@andrewbowen19 are you still having an issue? Can we close this one?

@andrewbowen19
Copy link
Author

Hey yeah good to close this one out thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants