[GH-ISSUE #795] Unable to download any models on Amazon Linux 2023 on EC2 #62417

Closed
opened 2026-05-03 08:51:55 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @drnushooz on GitHub (Oct 16, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/795

I am trying to download LLama2 and Medllama2 on Amazon Linux 2023. I have verified the security group to check if it has permissions to reach outside world and it does. Ollama installation was successful by using

curl https://ollama.ai/install.sh | sh

However, when I try to run ollama pull medllama2 it errors out with the following.

Error: Head "https://dd20bb891979d25aebc8bec07b2b3bbc.r2.cloudflarestorage.com/ollama/docker/registry/v2/blobs/sha256/7d/7da0afc1bbe70f988bc3c7f07d7dfcd16230d0214724a6dc1c639a56657a385f/data?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=66040c77ac1b787c3af820529859349a%!F(MISSING)20231016%!F(MISSING)auto%!F(MISSING)s3%!F(MISSING)aws4_request&X-Amz-Date=20231016T010928Z&X-Amz-Expires=1200&X-Amz-SignedHeaders=host&X-Amz-Signature=76b083752834ca2f16ba864c9aa146a90d0ec203696e415f6ff20eca3ea74f20": read tcp 10.220.8.84:38428->104.18.9.90:443: read: connection reset by peer

I have tried multiple models and everything fails. Here is Openssl version information.

OpenSSL 3.0.8 7 Feb 2023 (Library: OpenSSL 3.0.8 7 Feb 2023)
ollama version 0.1.3
Originally created by @drnushooz on GitHub (Oct 16, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/795 I am trying to download LLama2 and Medllama2 on Amazon Linux 2023. I have verified the security group to check if it has permissions to reach outside world and it does. Ollama installation was successful by using ``` curl https://ollama.ai/install.sh | sh ``` However, when I try to run `ollama pull medllama2` it errors out with the following. ``` Error: Head "https://dd20bb891979d25aebc8bec07b2b3bbc.r2.cloudflarestorage.com/ollama/docker/registry/v2/blobs/sha256/7d/7da0afc1bbe70f988bc3c7f07d7dfcd16230d0214724a6dc1c639a56657a385f/data?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=66040c77ac1b787c3af820529859349a%!F(MISSING)20231016%!F(MISSING)auto%!F(MISSING)s3%!F(MISSING)aws4_request&X-Amz-Date=20231016T010928Z&X-Amz-Expires=1200&X-Amz-SignedHeaders=host&X-Amz-Signature=76b083752834ca2f16ba864c9aa146a90d0ec203696e415f6ff20eca3ea74f20": read tcp 10.220.8.84:38428->104.18.9.90:443: read: connection reset by peer ``` I have tried multiple models and everything fails. Here is Openssl version information. ``` OpenSSL 3.0.8 7 Feb 2023 (Library: OpenSSL 3.0.8 7 Feb 2023) ollama version 0.1.3 ```
Author
Owner

@mxyng commented on GitHub (Oct 16, 2023):

I'm not able to reproduce this on an Amazon Linux 2023 instance in EC2 with default settings.

Here's the complete test run:

$ ssh -i ~/Downloads/key.pem ec2-user@aws-instance-address
Warning: Permanently added '54.183.9.87' (ED25519) to the list of known hosts.
   ,     #_
   ~\_  ####_        Amazon Linux 2023
  ~~  \_#####\
  ~~     \###|
  ~~       \#/ ___   https://aws.amazon.com/linux/amazon-linux-2023
   ~~       V~' '->
    ~~~         /
      ~~._.   _/
         _/ _/
       _/m/'
[ec2-user@ip-172-31-15-228 ~]$ curl https://ollama.ai/install.sh | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  7494    0  7494    0     0  54589      0 --:--:-- --:--:-- --:--:-- 55102
>>> Downloading ollama...
######################################################################## 100.0%##O#-#
>>> Installing ollama to /usr/local/bin...
>>> Creating ollama user...
>>> Creating ollama systemd service...
>>> Enabling and starting ollama service...
Created symlink /etc/systemd/system/default.target.wants/ollama.service → /etc/systemd/system/ollama.service.
WARNING: No NVIDIA GPU detected. Ollama will run in CPU-only mode.
[ec2-user@ip-172-31-15-228 ~]$ ollama list
NAME    ID      SIZE    MODIFIED
[ec2-user@ip-172-31-15-228 ~]$ ollama pull orca-mini
pulling manifest
pulling e84705205f71... 100% |█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| (1.9/1.9 GB, 264 MB/s)
pulling e7214e2f1a0f... 100% |██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| (66/66 B, 44 B/s)
pulling 93ca9b3d83dc... 100% |████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████���█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| (89/89 B, 67 B/s)
pulling 65009e4e7fee... 100% |███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| (359/359 B, 272 B/s)
verifying sha256 digest
writing manifest
removing any unused layers
success
[ec2-user@ip-172-31-15-228 ~]$ ollama pull medllama2
pulling manifest
pulling 7da0afc1bbe7... 100% |████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| (3.8/3.8 GB, 189 MB/s)
pulling 63c450f30aa0... 100% |██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| (31/31 B, 25 B/s)
pulling 0bad320f2b29... 100% |██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████���████████████████████████████████████████████████████████████████████████████████████████████████████| (285/285 B, 216 B/s)
verifying sha256 digest
writing manifest
removing any unused layers
success
[ec2-user@ip-172-31-15-228 ~]$ ollama -v
ollama version 0.1.3

Is it possible there's a firewall upstream that's blocking requests specifically to Cloudflare? It's also possible, though less likely, Cloudflare was temporarily down. If that's the case, please retry.

<!-- gh-comment-id:1765067381 --> @mxyng commented on GitHub (Oct 16, 2023): I'm not able to reproduce this on an Amazon Linux 2023 instance in EC2 with default settings. Here's the complete test run: ``` $ ssh -i ~/Downloads/key.pem ec2-user@aws-instance-address Warning: Permanently added '54.183.9.87' (ED25519) to the list of known hosts. , #_ ~\_ ####_ Amazon Linux 2023 ~~ \_#####\ ~~ \###| ~~ \#/ ___ https://aws.amazon.com/linux/amazon-linux-2023 ~~ V~' '-> ~~~ / ~~._. _/ _/ _/ _/m/' [ec2-user@ip-172-31-15-228 ~]$ curl https://ollama.ai/install.sh | sh % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 7494 0 7494 0 0 54589 0 --:--:-- --:--:-- --:--:-- 55102 >>> Downloading ollama... ######################################################################## 100.0%##O#-# >>> Installing ollama to /usr/local/bin... >>> Creating ollama user... >>> Creating ollama systemd service... >>> Enabling and starting ollama service... Created symlink /etc/systemd/system/default.target.wants/ollama.service → /etc/systemd/system/ollama.service. WARNING: No NVIDIA GPU detected. Ollama will run in CPU-only mode. [ec2-user@ip-172-31-15-228 ~]$ ollama list NAME ID SIZE MODIFIED [ec2-user@ip-172-31-15-228 ~]$ ollama pull orca-mini pulling manifest pulling e84705205f71... 100% |█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| (1.9/1.9 GB, 264 MB/s) pulling e7214e2f1a0f... 100% |██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| (66/66 B, 44 B/s) pulling 93ca9b3d83dc... 100% |████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████���█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| (89/89 B, 67 B/s) pulling 65009e4e7fee... 100% |███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| (359/359 B, 272 B/s) verifying sha256 digest writing manifest removing any unused layers success [ec2-user@ip-172-31-15-228 ~]$ ollama pull medllama2 pulling manifest pulling 7da0afc1bbe7... 100% |████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| (3.8/3.8 GB, 189 MB/s) pulling 63c450f30aa0... 100% |██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| (31/31 B, 25 B/s) pulling 0bad320f2b29... 100% |██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████���████████████████████████████████████████████████████████████████████████████████████████████████████| (285/285 B, 216 B/s) verifying sha256 digest writing manifest removing any unused layers success [ec2-user@ip-172-31-15-228 ~]$ ollama -v ollama version 0.1.3 ``` Is it possible there's a firewall upstream that's blocking requests specifically to Cloudflare? It's also possible, though less likely, Cloudflare was temporarily down. If that's the case, please retry.
Author
Owner

@drnushooz commented on GitHub (Oct 16, 2023):

Thank you for confirming. Looks like this is an issue with our environment. I will discuss it internally with my team.

<!-- gh-comment-id:1765204960 --> @drnushooz commented on GitHub (Oct 16, 2023): Thank you for confirming. Looks like this is an issue with our environment. I will discuss it internally with my team.
Author
Owner

@PriyaranjanMaratheDish commented on GitHub (Dec 19, 2023):

Is there a way to download to my mac and then upload to S3 and then take on EC2?

<!-- gh-comment-id:1863486783 --> @PriyaranjanMaratheDish commented on GitHub (Dec 19, 2023): Is there a way to download to my mac and then upload to S3 and then take on EC2?
Author
Owner

@drnushooz commented on GitHub (Dec 20, 2023):

Yes. If you look at the .ollama directory in your home directory under mac, that's where all the model binaries and metadata are maintained. You can upload this directory to your ec2 box and confirm with ollama list. In Amazon Linux case it will be /home/ec2-user and in Ubuntu, it will be /home/ubuntu.

<!-- gh-comment-id:1863693158 --> @drnushooz commented on GitHub (Dec 20, 2023): Yes. If you look at the .ollama directory in your home directory under mac, that's where all the model binaries and metadata are maintained. You can upload this directory to your ec2 box and confirm with ollama list. In Amazon Linux case it will be /home/ec2-user and in Ubuntu, it will be /home/ubuntu.
Author
Owner

@PriyaranjanMaratheDish commented on GitHub (Dec 20, 2023):

I have setup ollama on Ubuntu - using this guide.

https://github.com/jmorganca/ollama/blob/main/docs/linux

and copied the models from my mac to /home/ubuntu/ directory

Following is the content of the blobs folder

/home/ubuntu/models

/home/ubuntu/models/blobs

root@ip-10-211-58-17:/home/ubuntu/models/blobs# ls -ltrh
total 7.4G
-rw-r--r-- 1 root root 3.6G Dec 13 09:17 sha256:22f7f8ef5f4c791c1b03d7eb414399294764d7cc82c7e94aa81a1feb80a983a2
-rw-r--r-- 1 root root 6.9K Dec 13 09:17 sha256:8c17c2ebb0ea011be9981cc3922db8ca8fa61e828c5d3f44cb6ae342bf80460b
-rw-r--r-- 1 root root 4.7K Dec 13 09:17 sha256:7c23fb36d80141c4ab8cdbb61ee4790102ebd2bf7aeff414453177d4f2110e5d
-rw-r--r-- 1 root root 59 Dec 13 09:18 sha256:2e0493f67d0c8c9c68a8aeacdf6a38a2151cb3c4c1d42accf296e19810527988
-rw-r--r-- 1 root root 105 Dec 13 09:18 sha256:2759286baa875dc22de5394b4a925701b1896a7e3f8e53275c36f75a877a82c9
-rw-r--r-- 1 root root 529 Dec 13 09:18 sha256:5407e3188df9a34504e2071e0743682d859b68b6128f5c90994d0eafae29f722
-rw------- 1 root root 122 Dec 14 14:17 sha256:964e9bdbb6fb105d58f198128593b125a97cd7b71d5dfc04dab93e3a0f82fead
-rw------- 1 root root 631 Dec 14 15:06 sha256:03df611f6c23fb1f98aa0df732553741c9755f6e9b3a72c880fdf4a122b65cb3
-rw------- 1 root root 4.2K Dec 14 15:06 sha256:0247c64bcb1000ca15e22efc4c2baffe64ee90c97d67c5bcd778fe7c5f35f27d
-rw-r--r-- 1 root root 3.9G Dec 15 14:39 sha256:bd9d5f911cb214dba65cc678b115d022b042da77507429bd24c5082262209a20
-rw-r--r-- 1 root root 36 Dec 15 14:39 sha256:1576480a555b59e5aaa3aee3c5f34420121152cb3892cd9f1119125668301267
-rw-r--r-- 1 root root 307 Dec 15 14:39 sha256:97d541da52f7603c1266159463e7d2ec952cf0d98e02e7d4952de5b091eb63be
-rw------- 1 root root 631 Dec 18 11:26 sha256:ea9cfed2bf7bb776a347d86d668163957e1fa8925cd098c9528a7f2aef7a6d44
-rw------- 1 root root 25K Dec 18 11:26 sha256:2254c1a2e4411d6afc7d9d3fc2f24fbc8d22dceb2f21ba2e2a20409f95f29d5a

and /home/ubuntu/models/manifests

root@ip-10-211-58-17:/home/ubuntu/models/manifests# ls -ltrh
total 0
drwxr-xr-x 3 root root 21 Dec 13 09:18 registry.ollama.ai

Not able to see in ollama list models
see the following -

root@ip-10-211-58-17:/home/ubuntu/models/manifests# ollama list models
NAME ID SIZE MODIFIED

<!-- gh-comment-id:1865185564 --> @PriyaranjanMaratheDish commented on GitHub (Dec 20, 2023): I have setup ollama on Ubuntu - using this guide. https://github.com/jmorganca/ollama/blob/main/docs/linux and copied the models from my mac to /home/ubuntu/ directory Following is the content of the blobs folder /home/ubuntu/models /home/ubuntu/models/blobs root@ip-10-211-58-17:/home/ubuntu/models/blobs# ls -ltrh total 7.4G -rw-r--r-- 1 root root 3.6G Dec 13 09:17 sha256:22f7f8ef5f4c791c1b03d7eb414399294764d7cc82c7e94aa81a1feb80a983a2 -rw-r--r-- 1 root root 6.9K Dec 13 09:17 sha256:8c17c2ebb0ea011be9981cc3922db8ca8fa61e828c5d3f44cb6ae342bf80460b -rw-r--r-- 1 root root 4.7K Dec 13 09:17 sha256:7c23fb36d80141c4ab8cdbb61ee4790102ebd2bf7aeff414453177d4f2110e5d -rw-r--r-- 1 root root 59 Dec 13 09:18 sha256:2e0493f67d0c8c9c68a8aeacdf6a38a2151cb3c4c1d42accf296e19810527988 -rw-r--r-- 1 root root 105 Dec 13 09:18 sha256:2759286baa875dc22de5394b4a925701b1896a7e3f8e53275c36f75a877a82c9 -rw-r--r-- 1 root root 529 Dec 13 09:18 sha256:5407e3188df9a34504e2071e0743682d859b68b6128f5c90994d0eafae29f722 -rw------- 1 root root 122 Dec 14 14:17 sha256:964e9bdbb6fb105d58f198128593b125a97cd7b71d5dfc04dab93e3a0f82fead -rw------- 1 root root 631 Dec 14 15:06 sha256:03df611f6c23fb1f98aa0df732553741c9755f6e9b3a72c880fdf4a122b65cb3 -rw------- 1 root root 4.2K Dec 14 15:06 sha256:0247c64bcb1000ca15e22efc4c2baffe64ee90c97d67c5bcd778fe7c5f35f27d -rw-r--r-- 1 root root 3.9G Dec 15 14:39 sha256:bd9d5f911cb214dba65cc678b115d022b042da77507429bd24c5082262209a20 -rw-r--r-- 1 root root 36 Dec 15 14:39 sha256:1576480a555b59e5aaa3aee3c5f34420121152cb3892cd9f1119125668301267 -rw-r--r-- 1 root root 307 Dec 15 14:39 sha256:97d541da52f7603c1266159463e7d2ec952cf0d98e02e7d4952de5b091eb63be -rw------- 1 root root 631 Dec 18 11:26 sha256:ea9cfed2bf7bb776a347d86d668163957e1fa8925cd098c9528a7f2aef7a6d44 -rw------- 1 root root 25K Dec 18 11:26 sha256:2254c1a2e4411d6afc7d9d3fc2f24fbc8d22dceb2f21ba2e2a20409f95f29d5a and /home/ubuntu/models/manifests root@ip-10-211-58-17:/home/ubuntu/models/manifests# ls -ltrh total 0 drwxr-xr-x 3 root root 21 Dec 13 09:18 registry.ollama.ai Not able to see in ollama list models see the following - root@ip-10-211-58-17:/home/ubuntu/models/manifests# ollama list models NAME ID SIZE MODIFIED
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#62417