[GH-ISSUE #627] webui is able to connect to server ollama but after it uploads a model it gets a "Server connection failed" error #82890

Closed
opened 2026-05-15 07:44:20 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @noknownerrors on GitHub (Feb 3, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/627

Bug Report

Description

I can connect to the server and use the webui without error unless the server has models on it. Then I get network errors.

Bug Summary:
[Provide a brief but clear summary of the bug]
I can connect to the server and use the webui without error unless the server has models on it. Then I get network errors.

Steps to Reproduce:
[Outline the steps to reproduce the bug. Be as detailed as possible.]
Have server on runpod, with ollama/ollama container.
My env variables there:
OLLAMA_API_BASE_URL=http://127.0.0.1:11434/api
OLLAMA_MODELS=/workspace/models
30 GB container, 100GB volume

On my PC:
have most recent ollama: ollama version is 0.1.23
Use command: sudo docker run -d -p 3000:8080 -e OLLAMA_API_BASE_URL=https://myrunpod.proxy.net/api -v ollama-webui:/app/backend/data --name ollama-webui --restart always ghcr.io/ollama-webui/ollama-webui:main
Goto webui: localhost:3000
Connects
Webui settings show correct url, the server.net/api
I can go to this url, server.net/api/tags and I can see the model I had sent from the webui to the server there.
Can't select the model, get Server connection failed

Expected Behavior:
[Describe what you expected to happen.]
To select a model and use it

Actual Behavior:
[Describe what actually happened.]
Can't select the model, get Server connection failed

Environment

  • Operating System: Server is ollama container running in runpod. Webui is ran on WSL2 debian
  • Browser (if applicable): Latest Chrome

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:

Unchecked runtime.lastError: The message port closed before a response was received.
inject.js:1 [Deprecation] Listener added for a synchronous 'DOMNodeInserted' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.
s @ inject.js:1
setInterval (async)
(anonymous) @ inject.js:1
Show 2 more frames
Show less
0.774406c0.js:1 {status: true, version: 'v1.0.0-alpha.61', auth: true, default_models: null, default_prompt_suggestions: Array(4)}
13Fetch finished loading: GET "<URL>".
2.6c7a82a2.js:50 IDB Not Found
2.6c7a82a2.js:50 0.1.23
2.6c7a82a2.js:33 settings true
3.2a435b0c.js:1 initNewChat
3.2a435b0c.js:1 
3.2a435b0c.js:1 {status: true, version: 'v1.0.0-alpha.61', auth: true, default_models: null, default_prompt_suggestions: Array(4)}auth: truedefault_models: nulldefault_prompt_suggestions: (4) [{…}, {…}, {…}, {…}]status: trueversion: "v1.0.0-alpha.61"[[Prototype]]: Object
start.8904e59f.js:1 
        
        
       GET http://localhost:3000/ollama/api/tags net::ERR_CONTENT_DECODING_FAILED 200 (OK)
window.fetch @ start.8904e59f.js:1
u @ index.528c5811.js:1
_ @ 2.6c7a82a2.js:50
(anonymous) @ 2.6c7a82a2.js:50
b @ index.e77a7b6a.js:1
(anonymous) @ 2.6c7a82a2.js:50
await in (anonymous) (async)
z @ scheduler.d56c9999.js:1
(anonymous) @ index.2a7aa547.js:4
lt @ scheduler.d56c9999.js:1
Promise.then (async)
it @ scheduler.d56c9999.js:1
ht @ index.2a7aa547.js:4
(anonymous) @ index.2a7aa547.js:4
(anonymous) @ 0.774406c0.js:1
await in (anonymous) (async)
z @ scheduler.d56c9999.js:1
(anonymous) @ index.2a7aa547.js:4
lt @ scheduler.d56c9999.js:1
Ot @ index.2a7aa547.js:4
ue @ app.e40644ab.js:1
Pe @ start.8904e59f.js:1
ce @ start.8904e59f.js:1
await in ce (async)
re @ start.8904e59f.js:1
goto @ start.8904e59f.js:1
Nt @ start.8904e59f.js:3
(anonymous) @ (index):47
Promise.then (async)
(anonymous) @ (index):46
index.528c5811.js:1 TypeError: Failed to fetch
    at index.528c5811.js:1:1450
    at async u (index.528c5811.js:1:1250)
    at async _ (2.6c7a82a2.js:50:2208)
    at async 2.6c7a82a2.js:50:3148
start.8904e59f.js:1 Fetch failed loading: GET "http://localhost:3000/ollama/api/tags".
window.fetch @ start.8904e59f.js:1
u @ index.528c5811.js:1
_ @ 2.6c7a82a2.js:50
(anonymous) @ 2.6c7a82a2.js:50
b @ index.e77a7b6a.js:1
(anonymous) @ 2.6c7a82a2.js:50
await in (anonymous) (async)
z @ scheduler.d56c9999.js:1
(anonymous) @ index.2a7aa547.js:4
lt @ scheduler.d56c9999.js:1
Promise.then (async)
it @ scheduler.d56c9999.js:1
ht @ index.2a7aa547.js:4
(anonymous) @ index.2a7aa547.js:4
(anonymous) @ 0.774406c0.js:1
await in (anonymous) (async)
z @ scheduler.d56c9999.js:1
(anonymous) @ index.2a7aa547.js:4
lt @ scheduler.d56c9999.js:1
Ot @ index.2a7aa547.js:4
ue @ app.e40644ab.js:1
Pe @ start.8904e59f.js:1
ce @ start.8904e59f.js:1
await in ce (async)
re @ start.8904e59f.js:1
goto @ start.8904e59f.js:1
Nt @ start.8904e59f.js:3
(anonymous) @ (index):47
Promise.then (async)
(anonymous) @ (index):46
start.8904e59f.js:1 
        
        
       GET http://localhost:3000/openai/api/models 401 (Unauthorized)
window.fetch @ start.8904e59f.js:1
y @ index.2dec9879.js:1
_ @ 2.6c7a82a2.js:50
await in _ (async)
(anonymous) @ 2.6c7a82a2.js:50
b @ index.e77a7b6a.js:1
(anonymous) @ 2.6c7a82a2.js:50
await in (anonymous) (async)
z @ scheduler.d56c9999.js:1
(anonymous) @ index.2a7aa547.js:4
lt @ scheduler.d56c9999.js:1
Promise.then (async)
it @ scheduler.d56c9999.js:1
ht @ index.2a7aa547.js:4
(anonymous) @ index.2a7aa547.js:4
(anonymous) @ 0.774406c0.js:1
await in (anonymous) (async)
z @ scheduler.d56c9999.js:1
(anonymous) @ index.2a7aa547.js:4
lt @ scheduler.d56c9999.js:1
Ot @ index.2a7aa547.js:4
ue @ app.e40644ab.js:1
Pe @ start.8904e59f.js:1
ce @ start.8904e59f.js:1
await in ce (async)
re @ start.8904e59f.js:1
goto @ start.8904e59f.js:1
Nt @ start.8904e59f.js:3
(anonymous) @ (index):47
Promise.then (async)
(anonymous) @ (index):46
index.2dec9879.js:1 {detail: "Oops! It looks like there's a hiccup. The API key …o provide a valid API key to access this feature."}detail: "Oops! It looks like there's a hiccup. The API key is missing. Please make sure to provide a valid API key to access this feature."[[Prototype]]: Object
start.8904e59f.js:1 Fetch failed loading: GET "http://localhost:3000/openai/api/models".
window.fetch @ start.8904e59f.js:1
y @ index.2dec9879.js:1
_ @ 2.6c7a82a2.js:50
await in _ (async)
(anonymous) @ 2.6c7a82a2.js:50
b @ index.e77a7b6a.js:1
(anonymous) @ 2.6c7a82a2.js:50
await in (anonymous) (async)
z @ scheduler.d56c9999.js:1
(anonymous) @ index.2a7aa547.js:4
lt @ scheduler.d56c9999.js:1
Promise.then (async)
it @ scheduler.d56c9999.js:1
ht @ index.2a7aa547.js:4
(anonymous) @ index.2a7aa547.js:4
(anonymous) @ 0.774406c0.js:1
await in (anonymous) (async)
z @ scheduler.d56c9999.js:1
(anonymous) @ index.2a7aa547.js:4
lt @ scheduler.d56c9999.js:1
Ot @ index.2a7aa547.js:4
ue @ app.e40644ab.js:1
Pe @ start.8904e59f.js:1
ce @ start.8904e59f.js:1
await in ce (async)
re @ start.8904e59f.js:1
goto @ start.8904e59f.js:1
Nt @ start.8904e59f.js:3
(anonymous) @ (index):47
Promise.then (async)
(anonymous) @ (index):46
2.6c7a82a2.js:50 OpenAI: Network Problem
2.6c7a82a2.js:33 {}

Docker Container Logs:
Logs from runpod:

2024-02-03T05:46:27.141205760Z [GIN] 2024/02/03 - 05:46:27 | 200 |     408.144µs |  10xxxxxxx86 | GET      "/api/tags"
2024-02-03T05:46:27.324590225Z [GIN] 2024/02/03 - 05:46:27 | 200 |       42.56µs |  10xxxxxxx86 | GET      "/api/version"

Screenshots (if applicable):
image

Installation Method

Server is runpod, used ollama/ollama container

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!

Originally created by @noknownerrors on GitHub (Feb 3, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/627 # Bug Report ## Description I can connect to the server and use the webui without error unless the server has models on it. Then I get network errors. **Bug Summary:** [Provide a brief but clear summary of the bug] I can connect to the server and use the webui without error unless the server has models on it. Then I get network errors. **Steps to Reproduce:** [Outline the steps to reproduce the bug. Be as detailed as possible.] Have server on runpod, with ollama/ollama container. My env variables there: OLLAMA_API_BASE_URL=http://127.0.0.1:11434/api OLLAMA_MODELS=/workspace/models 30 GB container, 100GB volume On my PC: have most recent ollama: `ollama version is 0.1.23` Use command: ` sudo docker run -d -p 3000:8080 -e OLLAMA_API_BASE_URL=https://myrunpod.proxy.net/api -v ollama-webui:/app/backend/data --name ollama-webui --restart always ghcr.io/ollama-webui/ollama-webui:main` Goto webui: `localhost:3000` Connects Webui settings show correct url, the server.net/api I can go to this url, server.net/api/tags and I can see the model I had sent from the webui to the server there. Can't select the model, get Server connection failed **Expected Behavior:** [Describe what you expected to happen.] To select a model and use it **Actual Behavior:** [Describe what actually happened.] Can't select the model, get Server connection failed ## Environment - **Operating System:** Server is ollama container running in runpod. Webui is ran on WSL2 debian - **Browser (if applicable):** Latest Chrome **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:** ``` Unchecked runtime.lastError: The message port closed before a response was received. inject.js:1 [Deprecation] Listener added for a synchronous 'DOMNodeInserted' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead. s @ inject.js:1 setInterval (async) (anonymous) @ inject.js:1 Show 2 more frames Show less 0.774406c0.js:1 {status: true, version: 'v1.0.0-alpha.61', auth: true, default_models: null, default_prompt_suggestions: Array(4)} 13Fetch finished loading: GET "<URL>". 2.6c7a82a2.js:50 IDB Not Found 2.6c7a82a2.js:50 0.1.23 2.6c7a82a2.js:33 settings true 3.2a435b0c.js:1 initNewChat 3.2a435b0c.js:1 3.2a435b0c.js:1 {status: true, version: 'v1.0.0-alpha.61', auth: true, default_models: null, default_prompt_suggestions: Array(4)}auth: truedefault_models: nulldefault_prompt_suggestions: (4) [{…}, {…}, {…}, {…}]status: trueversion: "v1.0.0-alpha.61"[[Prototype]]: Object start.8904e59f.js:1 GET http://localhost:3000/ollama/api/tags net::ERR_CONTENT_DECODING_FAILED 200 (OK) window.fetch @ start.8904e59f.js:1 u @ index.528c5811.js:1 _ @ 2.6c7a82a2.js:50 (anonymous) @ 2.6c7a82a2.js:50 b @ index.e77a7b6a.js:1 (anonymous) @ 2.6c7a82a2.js:50 await in (anonymous) (async) z @ scheduler.d56c9999.js:1 (anonymous) @ index.2a7aa547.js:4 lt @ scheduler.d56c9999.js:1 Promise.then (async) it @ scheduler.d56c9999.js:1 ht @ index.2a7aa547.js:4 (anonymous) @ index.2a7aa547.js:4 (anonymous) @ 0.774406c0.js:1 await in (anonymous) (async) z @ scheduler.d56c9999.js:1 (anonymous) @ index.2a7aa547.js:4 lt @ scheduler.d56c9999.js:1 Ot @ index.2a7aa547.js:4 ue @ app.e40644ab.js:1 Pe @ start.8904e59f.js:1 ce @ start.8904e59f.js:1 await in ce (async) re @ start.8904e59f.js:1 goto @ start.8904e59f.js:1 Nt @ start.8904e59f.js:3 (anonymous) @ (index):47 Promise.then (async) (anonymous) @ (index):46 index.528c5811.js:1 TypeError: Failed to fetch at index.528c5811.js:1:1450 at async u (index.528c5811.js:1:1250) at async _ (2.6c7a82a2.js:50:2208) at async 2.6c7a82a2.js:50:3148 start.8904e59f.js:1 Fetch failed loading: GET "http://localhost:3000/ollama/api/tags". window.fetch @ start.8904e59f.js:1 u @ index.528c5811.js:1 _ @ 2.6c7a82a2.js:50 (anonymous) @ 2.6c7a82a2.js:50 b @ index.e77a7b6a.js:1 (anonymous) @ 2.6c7a82a2.js:50 await in (anonymous) (async) z @ scheduler.d56c9999.js:1 (anonymous) @ index.2a7aa547.js:4 lt @ scheduler.d56c9999.js:1 Promise.then (async) it @ scheduler.d56c9999.js:1 ht @ index.2a7aa547.js:4 (anonymous) @ index.2a7aa547.js:4 (anonymous) @ 0.774406c0.js:1 await in (anonymous) (async) z @ scheduler.d56c9999.js:1 (anonymous) @ index.2a7aa547.js:4 lt @ scheduler.d56c9999.js:1 Ot @ index.2a7aa547.js:4 ue @ app.e40644ab.js:1 Pe @ start.8904e59f.js:1 ce @ start.8904e59f.js:1 await in ce (async) re @ start.8904e59f.js:1 goto @ start.8904e59f.js:1 Nt @ start.8904e59f.js:3 (anonymous) @ (index):47 Promise.then (async) (anonymous) @ (index):46 start.8904e59f.js:1 GET http://localhost:3000/openai/api/models 401 (Unauthorized) window.fetch @ start.8904e59f.js:1 y @ index.2dec9879.js:1 _ @ 2.6c7a82a2.js:50 await in _ (async) (anonymous) @ 2.6c7a82a2.js:50 b @ index.e77a7b6a.js:1 (anonymous) @ 2.6c7a82a2.js:50 await in (anonymous) (async) z @ scheduler.d56c9999.js:1 (anonymous) @ index.2a7aa547.js:4 lt @ scheduler.d56c9999.js:1 Promise.then (async) it @ scheduler.d56c9999.js:1 ht @ index.2a7aa547.js:4 (anonymous) @ index.2a7aa547.js:4 (anonymous) @ 0.774406c0.js:1 await in (anonymous) (async) z @ scheduler.d56c9999.js:1 (anonymous) @ index.2a7aa547.js:4 lt @ scheduler.d56c9999.js:1 Ot @ index.2a7aa547.js:4 ue @ app.e40644ab.js:1 Pe @ start.8904e59f.js:1 ce @ start.8904e59f.js:1 await in ce (async) re @ start.8904e59f.js:1 goto @ start.8904e59f.js:1 Nt @ start.8904e59f.js:3 (anonymous) @ (index):47 Promise.then (async) (anonymous) @ (index):46 index.2dec9879.js:1 {detail: "Oops! It looks like there's a hiccup. The API key …o provide a valid API key to access this feature."}detail: "Oops! It looks like there's a hiccup. The API key is missing. Please make sure to provide a valid API key to access this feature."[[Prototype]]: Object start.8904e59f.js:1 Fetch failed loading: GET "http://localhost:3000/openai/api/models". window.fetch @ start.8904e59f.js:1 y @ index.2dec9879.js:1 _ @ 2.6c7a82a2.js:50 await in _ (async) (anonymous) @ 2.6c7a82a2.js:50 b @ index.e77a7b6a.js:1 (anonymous) @ 2.6c7a82a2.js:50 await in (anonymous) (async) z @ scheduler.d56c9999.js:1 (anonymous) @ index.2a7aa547.js:4 lt @ scheduler.d56c9999.js:1 Promise.then (async) it @ scheduler.d56c9999.js:1 ht @ index.2a7aa547.js:4 (anonymous) @ index.2a7aa547.js:4 (anonymous) @ 0.774406c0.js:1 await in (anonymous) (async) z @ scheduler.d56c9999.js:1 (anonymous) @ index.2a7aa547.js:4 lt @ scheduler.d56c9999.js:1 Ot @ index.2a7aa547.js:4 ue @ app.e40644ab.js:1 Pe @ start.8904e59f.js:1 ce @ start.8904e59f.js:1 await in ce (async) re @ start.8904e59f.js:1 goto @ start.8904e59f.js:1 Nt @ start.8904e59f.js:3 (anonymous) @ (index):47 Promise.then (async) (anonymous) @ (index):46 2.6c7a82a2.js:50 OpenAI: Network Problem 2.6c7a82a2.js:33 {} ``` **Docker Container Logs:** Logs from runpod: ``` 2024-02-03T05:46:27.141205760Z [GIN] 2024/02/03 - 05:46:27 | 200 | 408.144µs | 10xxxxxxx86 | GET "/api/tags" 2024-02-03T05:46:27.324590225Z [GIN] 2024/02/03 - 05:46:27 | 200 | 42.56µs | 10xxxxxxx86 | GET "/api/version" ``` **Screenshots (if applicable):** ![image](https://github.com/ollama-webui/ollama-webui/assets/148412263/59f1d6c4-6e05-4508-9135-4ac8accdf766) ## Installation Method Server is runpod, used ollama/ollama container ## 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!
Author
Owner

@noknownerrors commented on GitHub (Feb 3, 2024):

I am able to curl the server from my WSL where the webui is hosted:

$ curl https://obscurename.proxy.runpod.net/api/generate -d '{
  "model": "mistral:7b-instruct-q4_K_M",
  "prompt": "Why is the sky blue?",
  "stream": false
}'
{"model":"mistral:7b-instruct-q4_K_M","created_at":"2024-02-03T06:02:31.155961407Z","response":"
<!-- gh-comment-id:1925153027 --> @noknownerrors commented on GitHub (Feb 3, 2024): I am able to curl the server from my WSL where the webui is hosted: ``` $ curl https://obscurename.proxy.runpod.net/api/generate -d '{ "model": "mistral:7b-instruct-q4_K_M", "prompt": "Why is the sky blue?", "stream": false }' {"model":"mistral:7b-instruct-q4_K_M","created_at":"2024-02-03T06:02:31.155961407Z","response":" ```
Author
Owner

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

Hi, could you try connecting to ollama directly without the proxy? https://myrunpod.proxy.net most likely is causing the issue here.

<!-- gh-comment-id:1925155649 --> @tjbck commented on GitHub (Feb 3, 2024): Hi, could you try connecting to ollama directly without the proxy? `https://myrunpod.proxy.net` most likely is causing the issue here.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#82890