# image fails to download 404 no such image

**URL:** <https://forums.balena.io/t/image-fails-to-download-404-no-such-image/61609>\
**Category:** openBalena\
**Created:** [February 5, 2020, 11:15pm UTC](https://forums.balena.io/t/image-fails-to-download-404-no-such-image/61609 "2020-02-05T23:15:30Z")\
**Posts on this page:** 11\
**Page:** 3

<div class="post-metadata">

**Author:** ![Langhalsdino](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/langhalsdino/32/3039_2.png) [@Langhalsdino](https://forums.balena.io/u/Langhalsdino)\
**Post date:** [March 12, 2020, 9:17pm UTC](https://forums.balena.io/t/image-fails-to-download-404-no-such-image/61609/69 "2020-03-12T21:17:32Z")

</div>

I tried it on AWS with the docker-compose guide in production mode and got a similar results.

Randomly it now starts appearing with in a 1hour interval, any thoughts?

```auto
[Logs] [3/12/2020, 9:00:25 PM] Downloading image 'registry.balena/v2/myid@sha'
[Logs] [3/12/2020, 10:13:20 PM] Failed to download image 'registry.balena/v2/myid@sha' due to '(HTTP code 404) no such image - no such image: registry.balena/v2/id@sha: No such image: registry.balena/v2/id@sha '
[Logs] [3/12/2020, 10:13:22 PM] Downloading image 'registry.balena/v2/id@sha'

```

---

<div class="post-metadata">

**Author:** ![Langhalsdino](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/langhalsdino/32/3039_2.png) [@Langhalsdino](https://forums.balena.io/u/Langhalsdino)\
**Post date:** [March 12, 2020, 9:18pm UTC](https://forums.balena.io/t/image-fails-to-download-404-no-such-image/61609/70 "2020-03-12T21:18:54Z")

</div>

Since this is a difficult, but important problem i might be able to share access to the device with the balena team, if it might help to resolve the issue.

---

<div class="post-metadata">

**Author:** ![hedss](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/hedss/32/210_2.png) [@hedss](https://forums.balena.io/u/hedss)\
**Post date:** [March 12, 2020, 9:22pm UTC](https://forums.balena.io/t/image-fails-to-download-404-no-such-image/61609/71 "2020-03-12T21:22:24Z")

</div>

Hi there,

Thank you for testing this and getting back to us. It would be extremely useful for us to be able to access the device, as this would allow us to inspect its state and try and determine what might be causing the issue.

Best regards,

Heds

---

<div class="post-metadata">

**Author:** ![Langhalsdino](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/langhalsdino/32/3039_2.png) [@Langhalsdino](https://forums.balena.io/u/Langhalsdino)\
**Post date:** [March 12, 2020, 9:24pm UTC](https://forums.balena.io/t/image-fails-to-download-404-no-such-image/61609/73 "2020-03-12T21:24:15Z")

</div>

Since i think you are the resident beekeeper at Balena you have probably my [apic.ai](https://apic.ai) mail address. Therefore feel free to contact me and we can sort out how to give you monitored access to the openBalena server and device 🙂

I will share our findings here and try to keep the conversation in the forum. I just dont want to share public keys, … in the forum!

---

<div class="post-metadata">

**Author:** ![hedss](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/hedss/32/210_2.png) [@hedss](https://forums.balena.io/u/hedss)\
**Post date:** [March 12, 2020, 9:39pm UTC](https://forums.balena.io/t/image-fails-to-download-404-no-such-image/61609/74 "2020-03-12T21:39:40Z")

</div>

Yes, I do, I’ll email you there are we can discuss access issues. 🙂 I totally understand your security concerns!

---

<div class="post-metadata">

**Author:** ![hedss](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/hedss/32/210_2.png) [@hedss](https://forums.balena.io/u/hedss)\
**Post date:** [March 12, 2020, 10:55pm UTC](https://forums.balena.io/t/image-fails-to-download-404-no-such-image/61609/75 "2020-03-12T22:55:31Z")

</div>

#summary Customer on OpenBalena on GCP running supervisor version 10.6.27 sees a HTTP code 404 error when downloading a large update on a slow network. They say the download “breaks every 2 hours. They don’t have any other devices to test if related to this specific supervisor version.

Customer has tried this now on AWS EC2 as well, and the same problems are occuring (but at a 1 hour interval). We’ve asked for access to the device so that we can try and diagnose the situation. Customer has got back privately, and we’re discussing how we might be able to help them here as to get access will involve a secure connection to their VPC. I’m summarising this for the moment but would like this to reopen when required.

---

<div class="post-metadata">

**Author:** ![Langhalsdino](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/langhalsdino/32/3039_2.png) [@Langhalsdino](https://forums.balena.io/u/Langhalsdino)\
**Post date:** [March 13, 2020, 9:07am UTC](https://forums.balena.io/t/image-fails-to-download-404-no-such-image/61609/77 "2020-03-13T09:07:28Z")

</div>

Sorry i might have described it a bit off. The 1 hour interval is on GCP present, too.  
It`s just with another code version that is updating on another device.

---

<div class="post-metadata">

**Author:** ![Langhalsdino](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/langhalsdino/32/3039_2.png) [@Langhalsdino](https://forums.balena.io/u/Langhalsdino)\
**Post date:** [April 2, 2020, 8:46am UTC](https://forums.balena.io/t/image-fails-to-download-404-no-such-image/61609/79 "2020-04-02T08:46:55Z")

</div>

# Update: How did i solve my issue

## What was the behavior?

I recurrently saw a failed download attempt every 2 hours. It’s a large update on a very slow connection.

```auto
[logs] [3/3/2020, 6:31:06 AM] Failed to download image ‘registry.balena.me.de/v2/1f5036873524ef1ae144d41f5f1697f4@sha256:7a3f64266578d6b938c396e92f31c6e04f409c5551f8a222438831aea46ff3a5’ due to '(HTTP code 404) no such image - no such image: registry.balena.me.de/v2/1f5036873524ef1ae144d41f5f1697f4@sha256:7a3f64266578d6b938c396e92f31c6e04f409c5551f8a222438831aea46ff3a5: No such image: registry.balena.me.de/v2/1f5036873524ef1ae144d41f5f1697f4@sha256:7a3f64266578d6b938c396e92f31c6e04f409c5551f8a222438831aea46ff3a5 ’
[Logs] [3/3/2020, 6:31:09 AM] Downloading image ‘registry.balena.me.de/v2/1f5036873524ef1ae144d41f5f1697f4@sha256:7a3f64266578d6b938c396e92f31c6e04f409c5551f8a222438831aea46ff3a5’
[Logs] [3/3/2020, 8:27:16 AM] Failed to download image ‘registry.balena.me.de/v2/1f5036873524ef1ae144d41f5f1697f4@sha256:7a3f64266578d6b938c396e92f31c6e04f409c5551f8a222438831aea46ff3a5’ due to '(HTTP code 404) no such image - no such image: registry.balena.me.de/v2/1f5036873524ef1ae144d41f5f1697f4@sha256:7a3f64266578d6b938c396e92f31c6e04f409c5551f8a222438831aea46ff3a5: No such image: registry.balena.me.de/v2/1f5036873524ef1ae144d41f5f1697f4@sha256:7a3f64266578d6b938c396e92f31c6e04f409c5551f8a222438831aea46ff3a5 ’

```

## Environment, background and context:

I have a really slow internet connections. Only a few kb per sec on a mobile data plan. I checked with the carrier and they did not disconnect the devices every 2 hours. Furthermore on there side the connection seems to be open for multiple days.

When using scp to copy files between the device and another client i observed braking connections due to the slow connection, too.

## How did i solve it

I solved it by increasing the timeouts in the haproxy config of open balena.

> [@Langhalsdino](#):
>
> Still not sure if this is the right place to look into, but my current haproxy config defines:
> 
> ```auto
> defaults
> timeout connect 5000
> timeout client 50000
> timeout server 50000
> redis:
> timeout 1h
> postgres:
> timeout 1h
> 
> ```

Since the timeouts are in milliseconds 5 and 50 sec are not a lot. Specially when working with a slow connection. Therefore i increased the timeout to some insane number of 60m. Lastly due to the large timeout i could see a spike in open connections and therefore i set the connection limit manually to `maxconn 5000`.

Lastly i did a pull request on github in order to add units to the timeout, since this would make it easier to read:  
[https://github.com/balena-io/open-balena/pull/75](https://github.com/balena-io/open-balena/pull/75)

My new haproxy.cfg:

```auto
[...]
defaults
  timeout connect 10s
  timeout client 60m
  timeout server 60m
  maxconn 5000
[...]

```

---

<div class="post-metadata">

**Author:** ![nghiant2710](https://avatars.discourse-cdn.com/v4/letter/n/90db22/32.png) [@nghiant2710](https://forums.balena.io/u/nghiant2710)\
**Post date:** [April 2, 2020, 8:57am UTC](https://forums.balena.io/t/image-fails-to-download-404-no-such-image/61609/80 "2020-04-02T08:57:32Z")

</div>

Hi @Langhalsdino,

Thank you for the details, this will be very useful for other users who might have the same issue.

---

<div class="post-metadata">

**Author:** ![dash](https://avatars.discourse-cdn.com/v4/letter/d/7c8e57/32.png) [@dash](https://forums.balena.io/u/dash)\
**Post date:** [January 15, 2021, 2:45am UTC](https://forums.balena.io/t/image-fails-to-download-404-no-such-image/61609/82 "2021-01-15T02:45:27Z")

</div>

Thanks. This worked for me operating in a slow network environment.

---

<div class="post-metadata">

**Author:** ![Alizaa2](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/alizaa2/32/9319_2.png) [@Alizaa2](https://forums.balena.io/u/Alizaa2)\
**Post date:** [October 28, 2023, 7:37am UTC](https://forums.balena.io/t/image-fails-to-download-404-no-such-image/61609/83 "2023-10-28T07:37:13Z")

</div>

The error message you’re encountering, “Failed to download image ‘[xxxxx.com](http://registry.xxxxx.com/v2/xxxxxxxxxx@sha256:a6xxxxxxxxxxxxxx) 1’ due to '(HTTP code 404) no such image - no such image,” indicates that the device is unable to find the specified image in the Docker registry. This error typically occurs when the device requests an image that doesn’t exist in the registry at the specified tag or SHA.

Here are some troubleshooting steps you can follow:

1. Check Image Availability: Confirm that the image with the specified tag or SHA actually exists in your Docker registry. Double-check the image name and tag to ensure they are correct.

2. Image Pull Policy: Ensure that your application or device is not set to pull images from a different registry or a specific version that doesn’t exist.

3. Cached Images: Docker may cache images locally. Clear the local Docker image cache on your device and try the deployment again to ensure it attempts to download the image from the registry.

4. Registry Configuration: Double-check your OpenBalena server configuration to ensure it’s properly configured to store the registry files on S3. Ensure that the registry is correctly configured to pull images from the specified source.

5. BalenaOS Version: It’s worth checking if there are any known issues or updates related to your BalenaOS version. Upgrading to a newer version may resolve potential issues.

6. Network Issues: Network issues can also cause problems with image downloads. Ensure that the device has a stable internet connection and can access the Docker registry.

7. Device Compatibility: Verify that the Raspberry Pi 3 running BalenaOS 2.46.1 is compatible with the images you are trying to download. Ensure that the architecture and platform match.

If redeploying the application resolves the issue temporarily, it could be related to the cache [cursed bed images](https://cursedimages.us/cursed-image-generator/) or a temporary network issue. By following the steps above and ensuring your configuration is correct, you can potentially resolve the problem without needing to redeploy the application each time.

[Previous page](https://forums.balena.io/t/image-fails-to-download-404-no-such-image/61609.md?page=2)
