Ollama pull "Error: 403:" behind a company proxy, and the four other errors the same block prints

By MV2 of Munim, Inc., with AI agents. Tested on 12 November 2026: the official Ollama v0.40.16 Linux release binary pulled a tiny model from a local stand-in registry that answered one kind of request with HTTP 403 and a block page, the way a filtering company proxy does. Read the limits before relying on it.

A web filter or proxy that refuses one of the requests ollama pull makes doesn't always produce an error with "403" in it. In our test, the same 403 block page gave five different results, depending on which request it hit. Two of them never mention 403 at all, and in three the server log (even with OLLAMA_DEBUG=1) has no line with the 403 in it either. Retrying doesn't help: a 403 is a policy decision, and it gives the same answer every time.

Which blocked request prints which error

The 403 hit…ollama pull printedAfterServer log (OLLAMA_DEBUG=1)
the manifest (GET /v2/<repo>/manifests/<tag>), block page in the bodyError: pull model manifest: 403: <html><head><title>Access Denied</title>…: the whole block page, HTML and allat onceno 403 line
the manifest, empty bodyError: pull model manifest: 403:at onceno 403 line
the registry's token request (the registry answered 401 and Ollama went to fetch a token)the same Error: pull model manifest: 403: <html>… as a manifest blockat onceno 403 line
the HEAD of a model file (blob) that Ollama sends to learn its sizeError: 403: with nothing after the colon: a HEAD answer has no body, so the block page never reaches youat onceno 403 line; the pull is logged as POST "/api/pull" with status 200
the GET of a blob on the registry (the step that should answer with a redirect to the download host)Error: context deadline exceededabout 30 srepeated level=WARN … msg="failed to get direct URL; backing off and retrying" err="403: <html>…"
the download host the registry redirects to (blob registry GET answered 307, the target answered 403)Error: max retries exceeded: EOFabout 64 s<digest> part 0 attempt 0 failed: EOF, retrying in 1s … attempt 5 failed: EOF, retrying in 32s. The only hint is one DEBUG line, skipping requires check: config fetch failed … error="max retries exceeded: status 403" (it appeared in the registry-GET row too)

The HTTP API answered each of these with status 500 and the same text in {"error": "…"}, so Open WebUI and other front ends that call /api/pull should show the same messages. In a control run with nothing blocked and blobs redirected to a second host, the way Ollama's own registry works, the pull succeeded.

Why the messages differ (Ollama v0.40.16 source)

So "max retries exceeded: EOF" isn't always a flaky connection. Most advice for it is about dropped connections and says to run the pull again. If it fails the same way every time, and the log shows attempt 0 failed: EOF within a second or so of starting, suspect a proxy refusing the download host. A pull that resumes and makes progress between failures is the flaky-connection kind.

What this looks like in a real report

Per ollama/ollama#19604 (opened 8 November 2026, now closed): behind a corporate proxy, every pull failed with Error: 403:, while curl to the registry worked through the same proxy. The debug log ended with POST "/api/pull" and status 200, with no 403 in it. A curl -sI of the blob URL through the proxy then returned HTTP/2 403 with a 17,518-byte HTML page saying Your system policy has denied access to the requested site. That matches our HEAD row exactly: bare 403:, silent log. The block page only showed up when the request was made with curl.

The same thread also shows that ollama pull --insecure doesn't get around a proxy. It switches the registry requests to plain http://, and there it failed with connection reset by peer.

Find the blocked request

  1. Match your message to the table. A bare Error: 403: means a HEAD request. An HTML page after pull model manifest: 403: is the block page itself; read its title and policy text. context deadline exceeded plus failed to get direct URL warnings means the registry's blob URL. max retries exceeded: EOF plus attempt N failed: EOF lines means the download host.
  2. For the silent cases, make the same request with curl through the proxy the Ollama server uses and save what comes back, as in #19604. We have not run these commands against the real registry:
    P="$HTTPS_PROXY"   # the value set for the Ollama *server* (e.g. in its systemd unit)
    curl -sS -x "$P" -o /tmp/reg.txt -w '%{http_code} %{content_type}\n' https://registry.ollama.ai/v2/
    curl -sS -x "$P" -o /tmp/manifest.txt -w '%{http_code} %{content_type}\n' \
      https://registry.ollama.ai/v2/library/llama3.2/manifests/latest
    grep -io '<title>[^<]*' /tmp/reg.txt /tmp/manifest.txt
    A 403 with text/html is the proxy talking. A 401 with a JSON body means the proxy let you through to the registry, which wants a token (Ollama fetches the token itself). For the download host, ask whoever runs the proxy which host it refused for your machine: Ollama doesn't log that host name, and it changes per file.

Fixes

SituationWhat to do
The block page names a policy or categoryAsk for the registry and its download host to be allowed. Ollama v0.40.16's redirect check has special handling for cloudflarestorage.com, hf.co and huggingface.co hosts (see our redirect page), so the refused download host is likely under one of those; the proxy's own log will name it. Allowing only registry.ollama.ai leaves you with the max retries exceeded: EOF row.
curl works but Ollama gets 403The proxy settings must be in the server's environment (systemctl edit ollama.service, or the environment of ollama serve); the ollama pull command only talks to the local server. Also compare user agents and source accounts: a filter can treat Ollama's requests (user agents ollama/<version>, ollama-transfer/1.0 and Go's default in our logs) differently from curl's, or treat the service account differently from your own.
Hugging Face is allowed but Ollama's registry isn'tPull a GGUF from Hugging Face directly (ollama pull hf.co/<user>/<repo>), which was the way out in #8533.
Nothing can be unblocked in timePull on another network and copy the models folder (~/.ollama/models, or the folder in OLLAMA_MODELS) across, keeping its manifests/ and blobs/ layout.
Thinking about --insecureDon't. It switches to plain HTTP and skips address checks, and per #19604 it doesn't get past a proxy anyway.

Self-hosted registry: "Error: http: no Location header in response"

Our test caught one more message by accident. Our first stand-in registry served blob bytes straight back with 200 OK, the way a plain Docker/OCI registry or a simple mirror does, and Ollama v0.40.16 failed at once with:

Error: http: no Location header in response

The reason is the blob GET in blobDownload.run. It follows redirects only within the registry's own scheme, host and port, then takes the download address from the last response's Location header, even when that response is a 200. A registry that serves the bytes itself has no Location, so the pull stops there. With the same registry answering 307 to a second host, the pull succeeded. This matches #7244 (pulling from a local Docker registry, open since October 2024) and weightkeep PR #14 (September 2026), whose author fixed their Ollama-compatible server by answering blob GETs with 200 plus a Location header. A same-host 307 was not enough, because Ollama follows that and then still needs a Location on the final answer.

So a registry or mirror for Ollama has to answer blob GETs with a redirect to another host or port, or with a Location header. That target must also pass Ollama's redirect checks (see "redirect target not allowed"); our local test only passed because it used --insecure.

How this was made, and its limits

AI agents working for MV2 of Munim, Inc. built a small Python registry stand-in and ran the official Ollama v0.40.16 Linux amd64 release binary (checksum verified) against it in a sealed container on 12 November 2026, with a fresh models folder and server for each case. Each case was run once through the CLI and once through /api/pull, and every request was logged. All traffic stayed on 127.0.0.1 over plain HTTP with --insecure. The model was a tiny two-file stand-in (blobs of 23 and 278 bytes), not a real model. Limits:

Corrections are welcome as issues at github.com/munimtechnologies/local-ai-checkup.

Check the rest of your setup

The free local-ai-checkup script shows which AI ports on your machine other computers can reach. The CVE checker tells you which security advisories affect your Ollama or Open WebUI version. Both are read-only and send nothing off the machine.

Want someone to check it for you?

MV2 of Munim, Inc. does a $49 local AI health check for one machine, or a $199 small-office check for up to 5 machines or one shared Ollama, vLLM or Open WebUI server. You get a written report of what's exposed, risky or slow and what to fix first, with exact commands for your OS. See a sample report. Pay $49 or pay $199 on Stripe, then email mv2@munimtech.com the output of python3 local_ai_checkup.py --json, your OS, and what you use it for. MV2 never asks for passwords, keys or remote access.