mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 03:18:23 -05:00
WebUI could not connect to Ollama #1589
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @okynnor on GitHub (Jul 23, 2024).
Bug Report
Description
After upgrading my docker container for WebUI, it is able to connect to Ollama at another machine via API
Bug Summary:
It was working until we upgraded WebUI to the latest version v0.3.10
(latest)
Steps to Reproduce:
Ran a docker container update to update the latest version.
To ensure that my Mac's firewall is not on, it checked and it is OFF
I when to the host machine that's running the Docker with WebUI, to ensure that I can ping it, and yes, I can ping the MacBooks PRO with M1Pro without issues.
I also tried to ping the host machine that's running the WebUI, that also replies to pings.
I notice that the docker logs (prior to attached) that Ollama is looking for ssl, which seems new. I changed the docker compose to connect via https rather than http.
That still didn't work.
Expected Behavior:
It should connect to the Ollama API that's residing in an M1Pro.
from the M1Pro, from the MacOS terminal, Ollama responds to chat queries without issues.
Actual Behavior:
I go to the settings >> Admin > Connections to make sure and indeed, I get this error "WebUI could not connect to Ollama
Environment
**Open WebUI Version:**v0.3.10
Ollama (if applicable): v0.2.7
Operating System: macOS Sonoma 14.5
Browser (if applicable): N/A
Reproduction Details
Confirmation:
Logs and Screenshots
Browser Console Logs:
[Include relevant browser console logs, if applicable]
Docker Container Logs:
attached in this issue
open-webui-open-webui-1_logs-2.txt
Screenshots (if applicable):
[Attach any relevant screenshots to help illustrate the issue]
Installation Method
[Describe the method you used to install the project, e.g., manual installation, Docker, package manager, etc.]
Additional Information
[Include any additional details that may help in understanding and reproducing the issue. This could include specific configurations, error messages, or anything else relevant to the bug.]
Note
If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!
@justinh-rahb commented on GitHub (Jul 23, 2024):
Ensure that Ollama is being run with
OLLAMA_HOST=0.0.0.0@okynnor commented on GitHub (Jul 23, 2024):
Thanks! That was the right solution.
For everyone else's convenience, on MacOS Terminal, type:
launchctl setenv OLLAMA_HOST "0.0.0.0"and restart Ollama server