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

Exposed Ollama on local network, still get connection errors #501

Open
ikidd opened this issue Dec 2, 2024 · 4 comments
Open

Exposed Ollama on local network, still get connection errors #501

ikidd opened this issue Dec 2, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@ikidd
Copy link

ikidd commented Dec 2, 2024

I've added Environment="OLLAMA_HOST=0.0.0.0" to the ollama.service file, daemon-reload and restart. Changed config.toml to reflect the IP:Port of the Ollama host URL.

If I attach to the perplixica_backend container, install curl and run:

curl http://<IP_of_Ollama_Host>:11434/api/generate -d '{ "model": "llama3.2", "prompt": "Why is the sky blue?" }'

I get the appropriate response back from the ollama service.

But I still get errors in the docker log for Ollama connection from the backend container.

perplexica-backend_1 | error: Unhandled Rejection at: [object Promise], reason: TypeError [ERR_INVALID_URL]: Invalid URL

Perplexed.

@ikidd ikidd added the bug Something isn't working label Dec 2, 2024
@ItzCrazyKns
Copy link
Owner

What URL are you using for Ollama in the settings?

@ikidd
Copy link
Author

ikidd commented Dec 6, 2024

http://10.10.251.50:11434 which is the host IP address. Hitting it with curl from within the container works as above.

@ItzCrazyKns
Copy link
Owner

http://10.10.251.50:11434 which is the host IP address. Hitting it with curl from within the container works as above.

What is your config.toml file? you can hide the keys.

@ikidd
Copy link
Author

ikidd commented Dec 10, 2024

`❯ cat config.toml
[API_KEYS]

[API_ENDPOINTS]
OLLAMA = "http://10.10.251.50:11434"
SEARXNG = "http://localhost:32768"

[GENERAL]
PORT = 3001
SIMILARITY_MEASURE = "cosine"
KEEP_ALIVE = "5m"
`

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