[Docker Ollama] Error: pull model manifest: Get "https://registry.ollama.ai/v2/library/llama2/manifests/latest"

Environment: Linux ubuntu

  1. docker run -d --gpus=all -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama

  2. sudo docker exec -it ollama /bin/bas h

  3. ollama pull llama2

result: pulling manifest 
Error: pull model manifest: Get "https://registry.ollama.ai/v2/library/llama2/manifests/latest": dial tcp: lookup registry.ollama.ai on 219.250.36.130:53: read udp 172.17.0.2:59484->219.250.36.130:53: i/o timeout

I am getting this error again and again. Does anyone have idea for it?

Issue: Unable to Pull Model Manifest from Ollama Registry

Description:
When attempting to run the command ollama run llama2 on the Raspberry Pi, an error occurred during the process of pulling the model manifest from the Ollama registry. The error message indicates a timeout while attempting to establish a TLS handshake with the Ollama server.

Steps to Reproduce:

  1. Run the command ollama run llama2 on the Raspberry Pi.

Expected Behavior:
The command should pull the model manifest from the Ollama registry successfully, allowing the specified model (llama2) to be executed.

Actual Behavior:
The command failed with the following error:

Error: pull model manifest: Get "https://registry.ollama.ai/v2/library/llama2/manifests/latest": net/http: TLS handshake timeout

Troubleshooting Steps Taken:

  1. Checked the network connection on the Raspberry Pi by pinging external servers.
  2. Verified firewall settings to ensure outgoing connections to the Ollama server on port 443 are allowed.
  3. Attempted the command again after some time to rule out temporary issues.

Did you manage to solve it @atlasyang ?

@samprincefranklin what does this command return?

docker run --rm nicolaka/netshoot curl --head google.com

I solved it by using host network when running container(–network host), but I am not sure this is proper way.

Not a solution, but a workaround.

How did you installed Docker? Can you share a link to the followed instructions?
The following commands can give us some idea and recognize incorrectly installed Docker:

docker info
docker version

Review the output before sharing and remove confidential data if any appears (public IP for example)

dpkg -l | grep docker
snap list docker

When you share the outputs, always format your posts according to the following guide: How to format your forum posts

1 Like