Fix it
- Read the server log right after the failure (the client only shows the last error):
On Windows, open# macOS cat ~/.ollama/logs/server.log # Linux (systemd) journalctl -u ollama --no-pager --follow --pager-end # Docker docker logs <container-name>%LOCALAPPDATA%\Ollamaand readserver.log. - Retry the pull (
ollama pull <model>). In issue #17361 the reporter's error stopped on its own and was put down to a short outage. - Behind a proxy, set
HTTPS_PROXYfor the Ollama server, not your shell, and install the proxy's certificate as a system certificate. Don't setHTTP_PROXY: Ollama pulls only over HTTPS, and that variable can interrupt client connections to the server. - Restart the server after changing variables:
launchctl setenvthen restart the app on macOS;systemctl edit ollama.service,systemctl daemon-reload,systemctl restart ollamaon Linux; on Windows, quit Ollama from the taskbar, edit the variable, start it again. - Update Ollama: "Restart to update" in the menu bar or taskbar app, or re-run
curl -fsSL https://ollama.com/install.sh | shon Linux.
What the errors look like
Error: context deadline exceeded
Error: pull model manifest: Get "https://ollama.com/token?...": net/http: TLS handshake timeout
Error: pull model manifest: Get "https://ollama.com/token?...": read tcp ...: read: connection reset by peer
Error: pull model manifest: realm host "ollama.com" does not match original host "registry.ollama.ai"
context deadline exceeded is Go's standard error text for an operation whose deadline passed (Ollama is written in Go). It tells you something timed out, not what; the server log does.
Causes, and how to tell them apart
| Clue in the log or output | Likely cause | Fix |
|---|---|---|
TLS handshake timeout or connection reset by peer on the manifest request | Network, firewall or proxy between you and ollama.com | Steps 2 to 4; try another network to confirm |
| Pulls fail only behind a corporate network | Proxy not set for the server, or its certificate not trusted | HTTPS_PROXY plus system certificate |
| Downloads crawl inside WSL2 on Windows 10 | Known WSL2 networking slowdown | Disable Large Send Offload (below) |
hf.co/... model downloads to 100%, then context deadline exceeded | Open issue #17484 with Hugging Face pulls | See below |
| Docker container can't pull but the host can | Proxy not passed into the container | docker run -e HTTPS_PROXY=https://proxy.example.com ... |
Slow downloads in WSL2 (Windows 10)
Ollama's FAQ: open Control Panel → Networking and Internet → View network status and tasks → Change adapter settings, right-click vEthernet (WSL) → Properties → Configure → Advanced, and disable Large Send Offload Version 2 (IPv4) and (IPv6).
Hugging Face (hf.co) pulls that fail at the end
Issue #17484 (open as of 29 Nov 2026) reports ollama run hf.co/... downloading every layer and then failing with context deadline exceeded. Until it is fixed, one documented route avoids the pull entirely: download the .gguf file yourself and import it.
# Modelfile
FROM /path/to/model.gguf
ollama create my-model -f Modelfile
Ollama does not quantize GGUF files on import, so download the quantization you want. If you work with partly downloaded files, OLLAMA_NOPRUNE=1 stops the server from pruning model blobs on startup.
Timeouts while loading, not downloading
If the log shows the model load stalling rather than a download, the relevant setting is OLLAMA_LOAD_TIMEOUT: how long a model load may stall before Ollama gives up (default 5 minutes).
Running Claude Code, Codex or Cursor on real repos, or shipping an AI agent? A Quick Review ($149 / ₹13,900, 1 working day) checks one repo, config or setup for leaked keys, risky agent permissions and MCP servers. Request a Quick Review
FAQ
What does 'context deadline exceeded' mean in Ollama?
It is Go's standard error for an operation whose deadline passed. In Ollama it usually appears when a network request during a pull times out; the server log shows which request.
Should I set HTTP_PROXY or HTTPS_PROXY for Ollama?
HTTPS_PROXY. Ollama's FAQ says it pulls only over HTTPS and that setting HTTP_PROXY may interrupt client connections to the server.
Where are Ollama's logs?
macOS: ~/.ollama/logs/server.log. Linux with systemd: journalctl -u ollama. Windows: %LOCALAPPDATA%\Ollama\server.log. Docker: docker logs <container>.
Can I add a model to Ollama without ollama pull?
Yes. Download a GGUF file, create a Modelfile with FROM /path/to/file.gguf, and run ollama create <name> -f Modelfile.
Related errors
Sources
Read 29 Nov 2026. These tools change often: if a step no longer matches, the linked page wins.
- Ollama docs: Troubleshooting: docs.ollama.com/troubleshooting
- Ollama docs: FAQ: docs.ollama.com/faq
- Ollama docs: Importing a model: docs.ollama.com/import
- ollama/ollama source: envconfig/config.go: github.com/ollama/ollama/blob/main/envconfig/config.go
- ollama/ollama issue #17484 (Error: context deadline exceeded): github.com/ollama/ollama/issues/17484
- ollama/ollama issue #3504 (pull model manifest: TLS handshake timeout): github.com/ollama/ollama/issues/3504
- ollama/ollama issue #4976 (pull model manifest: connection reset by peer): github.com/ollama/ollama/issues/4976
- ollama/ollama issue #17361 (realm host does not match original host): github.com/ollama/ollama/issues/17361
- Go standard library: package context: pkg.go.dev/context
- MCP config checker: scan your mcp.json for hard-coded tokens, unpinned servers and risky access
- LLM API cost checker: find LLM calls with no limits or retries capped
- reviewready CLI: one command that checks an AI app repo before it ships