docker fetch failed: CERT_HAS_EXPIRED #7

Closed
opened 2025-11-11 14:01:43 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @randywreed on GitHub (Oct 22, 2023).

Originally assigned to: @tjbck on GitHub.

Describe the bug
Running the webui the model drop down is empty. Docker logs indicate a TypeError:fetch failed, CODE:'CERT_HAS_EXPIRED'

To Reproduce
Running the docker with ollama server on a different machine.

docker run -d -p 3000:3000 --add-host=host.docker.internal:host-gateway -e OLLAMA_ENDPOINT="http://myserver.org" --name ollama-webui --restart always ollama-webui

connected to localhost:3000, UI appears as expected. Models drop down box is empty.
docker logs:

Listening on 0.0.0.0:3000
http://myserver.org
TypeError: fetch failed
    at fetch (file:///app/build/shims.js:20346:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async load (file:///app/build/server/chunks/2-ee0c419c.js:5:18)
    at async load_server_data (file:///app/build/server/index.js:1930:18)
    at async file:///app/build/server/index.js:3301:18 {
  cause: Error: certificate has expired
      at TLSSocket.onConnectSecure (node:_tls_wrap:1669:34)
      at TLSSocket.emit (node:events:515:28)
      at TLSSocket._finishInit (node:_tls_wrap:1080:8)
      at ssl.onhandshakedone (node:_tls_wrap:866:12) {
    code: 'CERT_HAS_EXPIRED'
  }
}

Ollama functions fine remotely with a langchain python program.
Not sure if this requires a code change or documentation change.

Originally created by @randywreed on GitHub (Oct 22, 2023). Originally assigned to: @tjbck on GitHub. **Describe the bug** Running the webui the model drop down is empty. Docker logs indicate a TypeError:fetch failed, CODE:'CERT_HAS_EXPIRED' **To Reproduce** Running the docker with ollama server on a different machine. ``` docker run -d -p 3000:3000 --add-host=host.docker.internal:host-gateway -e OLLAMA_ENDPOINT="http://myserver.org" --name ollama-webui --restart always ollama-webui ``` connected to localhost:3000, UI appears as expected. Models drop down box is empty. docker logs: ``` Listening on 0.0.0.0:3000 http://myserver.org TypeError: fetch failed at fetch (file:///app/build/shims.js:20346:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async load (file:///app/build/server/chunks/2-ee0c419c.js:5:18) at async load_server_data (file:///app/build/server/index.js:1930:18) at async file:///app/build/server/index.js:3301:18 { cause: Error: certificate has expired at TLSSocket.onConnectSecure (node:_tls_wrap:1669:34) at TLSSocket.emit (node:events:515:28) at TLSSocket._finishInit (node:_tls_wrap:1080:8) at ssl.onhandshakedone (node:_tls_wrap:866:12) { code: 'CERT_HAS_EXPIRED' } } ``` Ollama functions fine remotely with a langchain python program. Not sure if this requires a code change or documentation change.
Author
Owner

@tjbck commented on GitHub (Oct 22, 2023):

Just merged the static build PR to main, could you please try again with the latest commit and see if that fixes your issue? It introduces breaking changes so your command should be replaced with the following instead:

docker build --build-arg OLLAMA_API_BASE_URL='http://myserver.org/api' -t ollama-webui .
docker run -d -p 3000:8080 --name ollama-webui --restart always ollama-webui

Thanks!

@tjbck commented on GitHub (Oct 22, 2023): Just merged the static build PR to main, could you please try again with the latest commit and see if that fixes your issue? It introduces breaking changes so your command should be replaced with the following instead: ```sh docker build --build-arg OLLAMA_API_BASE_URL='http://myserver.org/api' -t ollama-webui . docker run -d -p 3000:8080 --name ollama-webui --restart always ollama-webui ``` Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#7