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

http://localhost:11434/api/embeddings": dial tcp [::1]:11434: connect: connection refused #252

Open
1 of 2 tasks
vbogdanro opened this issue Aug 2, 2024 · 3 comments
Open
1 of 2 tasks
Labels
investigating Bugs that are still being investigated whether they are valid

Comments

@vbogdanro
Copy link

vbogdanro commented Aug 2, 2024

Description

Hi, nice application :)

I try to use it with local ollama & weaviate vector DB

Seems to be an default communication issue, verba try to connect on IPV6 tcp [::1] and receive this error

✘ {'errors': {'error': [{'message': 'send POST request: Post
"http://localhost:11434/api/embeddings": dial tcp [::1]:11434: connect:
connection refused'}]}, 'status': 'FAILED'}

IPV4 request
curl -X POST http://localhost:11434/api/embeddings -d '{
"model": "mxbai-embed-large",
"prompt": "Why is the sky blue?"
}'
{"embedding":[-0.2021758258342743....

IPV6 request
curl -X POST http://[::1]:11434/api/embeddings -d '{
"model": "mxbai-embed-large",
"prompt": "Why is the sky blue?"
}' -H "Content-Type: application/json"
{"embedding":[-0.2021758258342743,

cat /etc/redhat-release
Fedora release 40 (Forty)
uname -a
Linux fedora-lab 6.9.11-200.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jul 25 18:17:34 UTC 2024 x86_64 GNU/Linux

I tried to disable IPV6 from OS, the same issue

Is this a bug or a feature?

  • Bug
  • Feature

Steps to Reproduce

goldenverba==1.0.4

grep -i host /etc/systemd/system/ollama.service
Environment="OLLAMA_HOST=0.0.0.0:11434"

netstat -tulpn | grep 11434
tcp6 0 0 :::11434 :::* LISTEN 21062/ollama


cat .env
WEAVIATE_URL_VERBA=http://WEAVIATE_LOCAL_IP:8080

OLLAMA_URL=http://localhost:11434
OLLAMA_MODEL=codestral:22b-v0.1-q5_0
OLLAMA_EMBED_MODEL=mxbai-embed-large


verba start
INFO: Will watch for changes in these directories: ['/home/bogdan/codeVB/weaviate/verba']
INFO: Uvicorn running on http://localhost:8000 (Press CTRL+C to quit)
INFO: Started reloader process [23724] using WatchFiles
/home/bogdan/venvs/verba/lib64/python3.12/site-packages/pypdf/_crypt_providers/_cryptography.py:32: CryptographyDeprecationWarning: ARC4 has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.ARC4 and will be removed from this module in 48.0.0.
from cryptography.hazmat.primitives.ciphers.algorithms import AES, ARC4
ℹ Setting up client
ℹ No Auth information provided
✔ Connected to Weaviate
✘ Schema initialization failed Create class! Unexpected status code:
422, with response body: {'error': [{'message': 'vectorizer: no module with name
"text2vec-openai" present'}]}.
✘ Schema initialization failed Create class! Unexpected status code:
422, with response body: {'error': [{'message': 'vectorizer: no module with name
"text2vec-cohere" present'}]}.
ℹ Setting up components
✔ Config Saved in Weaviate
✘ {'errors': {'error': [{'message': 'send POST request: Post
"http://localhost:11434/api/embeddings": dial tcp [::1]:11434: connect:
connection refused'}]}, 'status': 'FAILED'}
ℹ Setting READER to BasicReader
ℹ Setting CHUNKER to TokenChunker
ℹ Setting EMBEDDER to ADAEmbedder
ℹ Setting RETRIEVER to WindowRetriever
ℹ Setting GENERATOR to GPT3
INFO: Started server process [23726]
INFO: Waiting for application startup.
INFO: Application startup complete.

GUI side:

If i try to import a document i revive this errors
(INFO) Importing...
(INFO) Importing 1 files with BasicReader
(INFO) Importing cerere_vieriu_bogdan_serviciul_politiei_rutiere_bac_u-1.pdf
(SUCCESS) Loaded 1 documents in 0.5s
(INFO) Starting Chunking with TokenChunker
(SUCCESS) Chunking completed with 30 chunks in 0.0s
(INFO) Starting Embedding with OllamaEmbedder
(ERROR) Embedding not successful: Document 4429dadd-7701-4865-adea-a009451e8ddd not found None
(ERROR) Unexpected error: Document 4429dadd-7701-4865-adea-a009451e8ddd not found None

server side:

✔ Loaded 1 documents in 0.5s
Chunking documents: 100%|████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 1014.59it/s]
✔ Chunking completed with 30 chunks in 0.0s
Vectorizing Chunks: 100%|████████████████████████████████████████████████████████| 30/30 [00:03<00:00, 8.70it/s]
Vectorizing document chunks: 100%|█████████████████████████████████████████████████| 1/1 [00:03<00:00, 3.45s/it]
ℹ (1/1) Importing document
xyz.pdf with 1 batches
✘ {'errors': {'error': [{'message': 'send POST request: Post
"http://localhost:11434/api/embeddings": dial tcp [::1]:11434: connect:
connection refused'}]}, 'status': 'FAILED'}
Importing batches: 100%|███████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 28.31it/s]
INFO: 127.0.0.1:39730 - "POST /api/import HTTP/1.1" 200 OK

Additional context

@vbogdanro vbogdanro changed the title http://OLLAMA_IP:11434/api/embeddings": dial tcp [::1]:11434: connect: connection refused http://localhost:11434/api/embeddings": dial tcp [::1]:11434: connect: connection refused Aug 2, 2024
@thomashacker
Copy link
Collaborator

Thanks for the issue! Can you communicate with Ollama through the terminal? We just released the new v2 version, maybe upgrading might fix the issue

@geeman11
Copy link

Im having the same issue, even after updating to v2!

@thomashacker
Copy link
Collaborator

Are you receiving the same error?

@thomashacker thomashacker added the investigating Bugs that are still being investigated whether they are valid label Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating Bugs that are still being investigated whether they are valid
Projects
None yet
Development

No branches or pull requests

3 participants