[GH-ISSUE #560] Server connection failed: but Ollama server receives and responds to WebUI requests #27647

Closed
opened 2026-04-25 02:23:26 -05:00 by GiteaMirror · 9 comments
Owner

Originally created by @peperunas on GitHub (Jan 24, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/560

Bug Report

I am encountering a strange bug as the WebUI returns "Server connection failed:" while I can see that the server receives the requests and responds as well (with 200 status code). The same I can see in the browser's console, as the WebUI receives back the 200s.

Environment

  • Operating System: Linux, Docker
  • Browser (if applicable): Firefox

Reproduction Details

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I have reviewed the troubleshooting.md document.
  • I have included the browser console logs.
  • I have included the Docker container logs.

Logs and Screenshots

Browser Console Logs:
[Include relevant browser console logs, if applicable]

Docker Container Logs:

ollama:

Jan 24 19:16:20 architect docker-ollama-start[621082]: [GIN] 2024/01/24 - 18:16:20 | 200 |     302.748µs |      100.64.0.2 | GET      "/api/tags"
Jan 24 19:16:20 architect docker-ollama-start[621082]: [GIN] 2024/01/24 - 18:16:20 | 200 |     283.732µs |      100.64.0.2 | GET      "/api/tags"
Jan 24 19:19:04 architect docker-ollama-start[621082]: [GIN] 2024/01/24 - 18:19:04 | 200 |      37.931µs |      100.64.0.2 | GET      "/api/version"
Jan 24 19:19:04 architect docker-ollama-start[621082]: [GIN] 2024/01/24 - 18:19:04 | 200 |     283.472µs |      100.64.0.2 | GET      "/api/tags"
Jan 24 19:19:04 architect docker-ollama-start[621082]: [GIN] 2024/01/24 - 18:19:04 | 200 |        31.7µs |      100.64.0.2 | GET      "/api/version"

ollama-webui:

Jan 24 19:19:04 architect docker-ollama-webui-start[624702]: INFO:     100.64.0.2:0 - "GET /ollama/api/version HTTP/1.1" 200 OK
Jan 24 19:19:04 architect docker-ollama-webui-start[624702]: INFO:     100.64.0.2:0 - "GET /ollama/api/tags HTTP/1.1" 200 OK
Jan 24 19:19:04 architect docker-ollama-webui-start[624702]: INFO:     100.64.0.2:0 - "GET /api/v1/chats/ HTTP/1.1" 200 OK
Jan 24 19:19:04 architect docker-ollama-webui-start[624702]: INFO:     100.64.0.2:0 - "GET /ollama/api/url HTTP/1.1" 200 OK
Jan 24 19:19:04 architect docker-ollama-webui-start[624702]: https://api.openai.com/v1/models
Jan 24 19:19:04 architect docker-ollama-webui-start[624702]: INFO:     100.64.0.2:0 - "GET /openai/api/models HTTP/1.1" 401 Unauthorized
Jan 24 19:19:04 architect docker-ollama-webui-start[624702]: INFO:     100.64.0.2:0 - "GET /api/v1/chats/ HTTP/1.1" 200 OK
Jan 24 19:19:04 architect docker-ollama-webui-start[624702]: INFO:     100.64.0.2:0 - "GET /openai/api/url HTTP/1.1" 200 OK
Jan 24 19:19:04 architect docker-ollama-webui-start[624702]: INFO:     100.64.0.2:0 - "GET /openai/api/key HTTP/1.1" 200 OK
Jan 24 19:19:04 architect docker-ollama-webui-start[624702]: INFO:     100.64.0.2:0 - "GET /ollama/api/version HTTP/1.1" 200 OK

EDIT:

I can even pull a new model from the WebUI successfully - but not use (or list) any model.

EDIT 2:

When refreshing the models, the console outputs:

TypeError: Decoding failed.
Originally created by @peperunas on GitHub (Jan 24, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/560 # Bug Report I am encountering a strange bug as the WebUI returns "Server connection failed:" while I can see that the server receives the requests and responds as well (with 200 status code). The same I can see in the browser's console, as the WebUI receives back the 200s. ## Environment - **Operating System:** Linux, Docker - **Browser (if applicable):** Firefox ## Reproduction Details **Confirmation:** - [X] I have read and followed all the instructions provided in the README.md. - [X] I have reviewed the troubleshooting.md document. - [X] I have included the browser console logs. - [X] I have included the Docker container logs. ## Logs and Screenshots **Browser Console Logs:** [Include relevant browser console logs, if applicable] **Docker Container Logs:** `ollama`: ``` Jan 24 19:16:20 architect docker-ollama-start[621082]: [GIN] 2024/01/24 - 18:16:20 | 200 | 302.748µs | 100.64.0.2 | GET "/api/tags" Jan 24 19:16:20 architect docker-ollama-start[621082]: [GIN] 2024/01/24 - 18:16:20 | 200 | 283.732µs | 100.64.0.2 | GET "/api/tags" Jan 24 19:19:04 architect docker-ollama-start[621082]: [GIN] 2024/01/24 - 18:19:04 | 200 | 37.931µs | 100.64.0.2 | GET "/api/version" Jan 24 19:19:04 architect docker-ollama-start[621082]: [GIN] 2024/01/24 - 18:19:04 | 200 | 283.472µs | 100.64.0.2 | GET "/api/tags" Jan 24 19:19:04 architect docker-ollama-start[621082]: [GIN] 2024/01/24 - 18:19:04 | 200 | 31.7µs | 100.64.0.2 | GET "/api/version" ``` `ollama-webui`: ``` Jan 24 19:19:04 architect docker-ollama-webui-start[624702]: INFO: 100.64.0.2:0 - "GET /ollama/api/version HTTP/1.1" 200 OK Jan 24 19:19:04 architect docker-ollama-webui-start[624702]: INFO: 100.64.0.2:0 - "GET /ollama/api/tags HTTP/1.1" 200 OK Jan 24 19:19:04 architect docker-ollama-webui-start[624702]: INFO: 100.64.0.2:0 - "GET /api/v1/chats/ HTTP/1.1" 200 OK Jan 24 19:19:04 architect docker-ollama-webui-start[624702]: INFO: 100.64.0.2:0 - "GET /ollama/api/url HTTP/1.1" 200 OK Jan 24 19:19:04 architect docker-ollama-webui-start[624702]: https://api.openai.com/v1/models Jan 24 19:19:04 architect docker-ollama-webui-start[624702]: INFO: 100.64.0.2:0 - "GET /openai/api/models HTTP/1.1" 401 Unauthorized Jan 24 19:19:04 architect docker-ollama-webui-start[624702]: INFO: 100.64.0.2:0 - "GET /api/v1/chats/ HTTP/1.1" 200 OK Jan 24 19:19:04 architect docker-ollama-webui-start[624702]: INFO: 100.64.0.2:0 - "GET /openai/api/url HTTP/1.1" 200 OK Jan 24 19:19:04 architect docker-ollama-webui-start[624702]: INFO: 100.64.0.2:0 - "GET /openai/api/key HTTP/1.1" 200 OK Jan 24 19:19:04 architect docker-ollama-webui-start[624702]: INFO: 100.64.0.2:0 - "GET /ollama/api/version HTTP/1.1" 200 OK ``` EDIT: I can even pull a new model from the WebUI successfully - but not use (or list) any model. EDIT 2: When refreshing the models, the console outputs: ``` TypeError: Decoding failed. ```
Author
Owner

@tjbck commented on GitHub (Jan 24, 2024):

Hi, Could you tell us with installation method you used to install the webui? Also, please check out our troubleshooting guide if you haven't so already: https://github.com/ollama-webui/ollama-webui/blob/main/TROUBLESHOOTING.md Thanks!

One other thing, please verify that you're on the latest version of your web browser as well!

<!-- gh-comment-id:1908907446 --> @tjbck commented on GitHub (Jan 24, 2024): Hi, Could you tell us with installation method you used to install the webui? Also, please check out our troubleshooting guide if you haven't so already: https://github.com/ollama-webui/ollama-webui/blob/main/TROUBLESHOOTING.md Thanks! One other thing, please verify that you're on the latest version of your web browser as well!
Author
Owner

@peperunas commented on GitHub (Jan 24, 2024):

Hello,

I am using the upstream Docker image (latest).

As shown in the logs, the UI and the backend are connected and communicate. The endooints are also hit properly (200 status codes).

Thanks.

<!-- gh-comment-id:1908912486 --> @peperunas commented on GitHub (Jan 24, 2024): Hello, I am using the upstream Docker image (latest). As shown in the logs, the UI and the backend are connected and communicate. The endooints are also hit properly (200 status codes). Thanks.
Author
Owner

@tjbck commented on GitHub (Jan 24, 2024):

The issue seems to be resolved, I'll close this issue for now. Feel free to reach out if you're still experiencing connection problems, Thanks!

<!-- gh-comment-id:1908987632 --> @tjbck commented on GitHub (Jan 24, 2024): The issue seems to be resolved, I'll close this issue for now. Feel free to reach out if you're still experiencing connection problems, Thanks!
Author
Owner

@Ashok93 commented on GitHub (Feb 12, 2024):

@tjbck I still have the same issue, I am using the latest docker image and using ollama in a server locally.

<!-- gh-comment-id:1938420171 --> @Ashok93 commented on GitHub (Feb 12, 2024): @tjbck I still have the same issue, I am using the latest docker image and using ollama in a server locally.
Author
Owner

@Ashok93 commented on GitHub (Feb 12, 2024):

Here is my browser log from Chrome. My ollama server responds for /api/tags and also the log in ollama-webui docker container says 200 OK for tags INFO: 127.0.0.1:58090 - "GET /ollama/api/tags HTTP/1.1" 200 OK

Screenshot from 2024-02-12 11-41-31

<!-- gh-comment-id:1938431928 --> @Ashok93 commented on GitHub (Feb 12, 2024): Here is my browser log from Chrome. My ollama server responds for `/api/tags` and also the log in ollama-webui docker container says 200 OK for tags `INFO: 127.0.0.1:58090 - "GET /ollama/api/tags HTTP/1.1" 200 OK` ![Screenshot from 2024-02-12 11-41-31](https://github.com/ollama-webui/ollama-webui/assets/14112515/7b774aa5-e135-4aad-bfea-d3d93ff0f5f1)
Author
Owner

@peperunas commented on GitHub (Feb 12, 2024):

That's the same issue I had encountered. I haven't found a fix yet.

<!-- gh-comment-id:1938580151 --> @peperunas commented on GitHub (Feb 12, 2024): That's the same issue I had encountered. I haven't found a fix yet.
Author
Owner

@Ashok93 commented on GitHub (Feb 12, 2024):

@tjbck Can you please reopen the issue? The author of the issue reports that they haven't found the fix yet.

<!-- gh-comment-id:1938940522 --> @Ashok93 commented on GitHub (Feb 12, 2024): @tjbck Can you please reopen the issue? The author of the issue reports that they haven't found the fix yet.
Author
Owner

@tjbck commented on GitHub (Feb 12, 2024):

@Ashok93 @peperunas Could you guys confirm that Ollama is running from the same machine as the webui? I'm unable to reproduce this issue on all three of my machines (mac, ubuntu, windows)

FYI, the settings page should look something like this:

image

<!-- gh-comment-id:1939481527 --> @tjbck commented on GitHub (Feb 12, 2024): @Ashok93 @peperunas Could you guys confirm that Ollama is running from the same machine as the webui? I'm unable to reproduce this issue on all three of my machines (mac, ubuntu, windows) FYI, the settings page should look something like this: ![image](https://github.com/ollama-webui/ollama-webui/assets/25473318/f437972f-8b4a-412a-bbef-b750a30d4f51)
Author
Owner

@Ashok93 commented on GitHub (Feb 13, 2024):

@tjbck Thanks for the response. No, my Ollama webserver is running on a separate server inside Kubernetes in my local network. But I can access this ollama server from the server where ollama webui is running. I can curl all endpoints and I get responses there.

<!-- gh-comment-id:1940758767 --> @Ashok93 commented on GitHub (Feb 13, 2024): @tjbck Thanks for the response. No, my Ollama webserver is running on a separate server inside Kubernetes in my local network. But I can access this ollama server from the server where ollama webui is running. I can `curl` all endpoints and I get responses there.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#27647