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

"Couldn't connect to Weaviate, check your URL/API KEY" #335

Closed
4 tasks
e-p-armstrong opened this issue Dec 2, 2024 · 3 comments
Closed
4 tasks

"Couldn't connect to Weaviate, check your URL/API KEY" #335

e-p-armstrong opened this issue Dec 2, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@e-p-armstrong
Copy link

Description

I am running into inconsistent errors regarding not being able to connect to weaviate. This is when I am attempting to run locally with Ollama. The error only appears occasionally; often, regenerating the message will be enough to fix it, but it is occurring very often and is quite annoying:

INFO:     127.0.0.1:61907 - "POST /api/get_suggestions HTTP/1.1" 200 OK
✔ Received query: somequery
✔ Connecting new Client
ℹ Connecting to Weaviate Embedded
✘ Couldn't connect to Weaviate, check your URL/API KEY: Embedded DB did
not start because processes are already listening on ports http:8079 and
grpc:50050use weaviate.connect_to_local(port=8079, grpc_port=50050) to connect
to the existing instance
⚠ Query failed: Couldn't connect to Weaviate, check your URL/API KEY:
Embedded DB did not start because processes are already listening on ports
http:8079 and grpc:50050use weaviate.connect_to_local(port=8079,
grpc_port=50050) to connect to the existing instance
INFO:     127.0.0.1:61898 - "POST /api/query HTTP/1.1" 200 OK
✔ Succesfully Connected to Weaviate

I tried checking out what is at port 8079, it seems to be weaviate?
image

So I don't know why this is failing

image

^ Example of two failed tries and one success, the only difference between them being the time of the submission

Installation

  • [ x ] pip install goldenverba
  • pip install from source
  • Docker installation

If you installed via pip, please specify the version:

Python version? 3.11
package version? Whatever's latest on pip

Weaviate Deployment

  • [x ] Local Deployment
  • Docker Deployment
  • Cloud Deployment

Configuration

Reader: ?
Chunker: ?
Embedder: Ollama (nomic embed text)
Retriever: Advanced
Generator: Ollama (custom finetuned llama 3)

Steps to Reproduce

Pip install;
Run both embedding and generator with ollama
Upload 47 .md documents
chat a few times
experience issue

Additional context

For some reason Verba does not seem to be working when offline either, even though I assume local deployment is just that -- local. What's going on and how do I force this to 1) run locally and 2) correctly connect to the server so I don't get this issue?

@thomashacker
Copy link
Collaborator

Thanks for the issue. When you start Verba in local mode, it will run Weaviate Embedded in the background.(https://weaviate.io/developers/weaviate/installation/embedded).

Looks like a Weaviate Instance is already running on a specific port of yours, and it might be the issue that there is a problem with the way Verba is closing and opening the client everytime you start the application. Are you running any Docker deployed Weaviate instances that make create this conflict?

@thomashacker thomashacker added the investigating Bugs that are still being investigated whether they are valid label Dec 7, 2024
@thomashacker
Copy link
Collaborator

Ok I found out the source of the issue, there was a race condition when creating the client. Multiple requests would try to build the same client with the same credentials, resulting in an error that the client already exists. I've built in an async lock mechanism and it should work in the next version. Thanks a lot for the issue, this was a huge bug!

@thomashacker thomashacker added bug Something isn't working and removed bug Something isn't working investigating Bugs that are still being investigated whether they are valid labels Dec 7, 2024
@thomashacker
Copy link
Collaborator

Should be fixed in the newest v2.1 version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants