CircleCI failing when using sudo apt-get update

I am using circleci/ruby:2.2.10-node

#!/bin/bash -eo pipefail
sudo apt-get update
Ign http://http.us.debian.org jessie-backports InRelease

Ign http://http.us.debian.org jessie-backports Release.gpg

Ign http://http.us.debian.org jessie-backports Release

Err http://http.us.debian.org jessie-backports/main Sources
  404  Not Found [IP: 208.80.154.15 80]

Err http://http.us.debian.org jessie-backports/main amd64 Packages
  404  Not Found [IP: 208.80.154.15 80]

Get:1 http://security.debian.org jessie/updates InRelease [44.9 kB]
Ign http://deb.debian.org jessie InRelease

Ign http://deb.debian.org jessie-updates InRelease

Get:2 http://deb.debian.org jessie Release.gpg [2420 B]

Get:3 http://security.debian.org jessie/updates/main amd64 Packages [822 kB]

Ign http://deb.debian.org jessie-updates Release.gpg

Get:4 http://deb.debian.org jessie Release [148 kB]

Ign http://deb.debian.org jessie-updates Release

100% [Waiting for headers]Get:5 http://deb.debian.org jessie/main amd64 Packages [9098 kB]

Err http://deb.debian.org jessie-updates/main amd64 Packages
  

Err http://deb.debian.org jessie-updates/main amd64 Packages
  

Err http://deb.debian.org jessie-updates/main amd64 Packages
  

100% [5 Packages 9098 kB]Err http://deb.debian.org jessie-updates/main amd64 Packages
  

Err http://deb.debian.org jessie-updates/main amd64 Packages
  404  Not Found

Fetched 10.1 MB in 1s (6160 kB/s)
W: Failed to fetch http://http.us.debian.org/debian/dists/jessie-backports/main/source/Sources  404  Not Found [IP: 208.80.154.15 80]

W: Failed to fetch http://http.us.debian.org/debian/dists/jessie-backports/main/binary-amd64/Packages  404  Not Found [IP: 208.80.154.15 80]

W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages  404  Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.
Exited with code 100

I’m seeing the same with circleci/node:10.12.0.

Looks like it could be an issue with debian mirrors, though it’s hard to tell which one.



https://mirror-master.debian.org/status/mirror-status.html

This was covered here Apt-get update failing on Debian 8 (Jessie) based Convenience Images

Still error, FYI there aren’t any circleci/ruby:2.2.10-stretch-node

====>> Update Chromedriver
  #!/bin/bash -eo pipefail
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update
sudo apt-get install google-chrome-stable

OK
Ign http://dl.google.com stable InRelease
Get:1 http://dl.google.com stable Release.gpg [819 B]                          
Get:2 http://dl.google.com stable Release [943 B]                              
Get:3 http://security.debian.org jessie/updates InRelease [44.9 kB]
Get:4 http://dl.google.com stable/main amd64 Packages [1110 B]                 
Ign http://deb.debian.org jessie InRelease                                     
Ign http://deb.debian.org jessie-updates InRelease                             
Get:5 http://security.debian.org jessie/updates/main amd64 Packages [824 kB]
Get:6 http://deb.debian.org jessie Release.gpg [2420 B]
Ign http://deb.debian.org jessie-updates Release.gpg                           
Get:7 http://deb.debian.org jessie Release [148 kB]
Ign http://deb.debian.org jessie-updates Release       
Get:8 http://deb.debian.org jessie/main amd64 Packages [9098 kB]
Err http://deb.debian.org jessie-updates/main amd64 Packages
  
Err http://deb.debian.org jessie-updates/main amd64 Packages
  
Err http://deb.debian.org jessie-updates/main amd64 Packages
  
Err http://deb.debian.org jessie-updates/main amd64 Packages
  
Err http://deb.debian.org jessie-updates/main amd64 Packages
  404  Not Found
Fetched 10.1 MB in 3s (2888 kB/s)
W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages  404  Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.
Error: Exited with code 100
Step failed
Error: runner failed
{"Runner":true,"level":"error","msg":"runner failed","task-id":"localbuild-1553727512","time":"2019-03-27T23:04:14Z"}
Task failed
Error: task failed

Can someone from the CircleCI team please post an update on when can a Ruby:2.2.x image based on Debian Stretch will be available or alternatively change the mirrors in the current Ruby:2.2-node that’s based on Debian Jessie?

Ruby is not being maintained upstream https://hub.docker.com/_/ruby

Therefore we will not be updating it. 2.3-stretch-node-browsers-legacy is the oldest tag currently, and it has been updated.

If you need to use 2.2 and can not make your own image, you can add the changes from Apt-get update return 404 as a step prior to running apt update

@drazisil, kindly excuse my typo as I meant circleci/ruby:2.2.x based on Debian stretch instead of plain ruby & thanks for letting us know stretch versions are available only since ruby-2.3

Will look to implement the suggested workaround & post here regardless of success / failure so that it’ll help anyone with a similar use-case.

1 Like

Ah, no, I was unclear. What I meant was that we only update images that are maintained upstream, and since Ruby is not updating 2.2, CircleCI will not be updating any of our 2.2 tags as well.

So, yes, you will need to update to 2.3. Hopefully, this works for you, I look forward to your results :slight_smile:

1 Like

I ended up adding the following lines to my config.yml:

        sudo sed -i '/jessie-backports/d' /etc/apt/sources.list
        sudo sed -i '/jessie-updates/d' /etc/apt/sources.list

ZZ

3 Likes

@zeninfinity as a hot-fix, that worked for me too compared to the more elaborate changes mentioned by @drazisil, cheers guys :+1:

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.