Pipeline errors on apt-get update && apt-get -y install awscli

Issue #14962 resolved
Nadi created an issue

Our Pipeline worked great for months, and it broke just now with the following error:

Screen Shot 2017-10-08 at 01.10.05.png

+ apt-get update && apt-get -y install awscli
Get:1 http://security.debian.org jessie/updates InRelease [63.1 kB]
Get:2 http://security.debian.org jessie/updates/main amd64 Packages [547 kB]
Ign http://deb.debian.org jessie InRelease
Ign http://deb.debian.org jessie-updates InRelease
Ign http://deb.debian.org jessie Release.gpg
Ign http://deb.debian.org jessie-updates Release.gpg
Ign http://deb.debian.org jessie Release
Ign http://deb.debian.org jessie-updates Release
Err http://deb.debian.org jessie/main amd64 Packages

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

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

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

Err http://deb.debian.org jessie/main amd64 Packages
404 Not Found [IP: 151.101.32.204 80]
Err http://deb.debian.org jessie-updates/main amd64 Packages
404 Not Found [IP: 151.101.32.204 80]
Fetched 610 kB in 3s (172 kB/s)
W: Failed to fetch http://deb.debian.org/debian/dists/jessie/main/binary-amd64/Packages 404 Not Found [IP: 151.101.32.204 80]
W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages 404 Not Found [IP: 151.101.32.204 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

Comments (54)

  1. Gianpaolo Papa

    Having this now when I try a pipeline that always worked, right after its "apt-get update" command.:

  2. Manpreet Singh

    I tried another debian image (didn't worked either), I think its something to do with debian CDN today (outrage).

    I just changed my pipeline to use centos7 image (image: quozd/centos7-python36) instead and changed apt-get commands to yum install:

    • yum -y install epel-release
      #- yum -y update
      - yum -y install python-pip
      - pip -V
      - yum -y install zip
      #- apt-get update # required to install zip
      #- apt-get install -y zip # required for packaging up the application
      - pip install boto3==1.3.0

    It works :)

  3. Manpreet Singh

    This is the most non sense text editor I have ever used. Sorry , it removed the newlines.

      • yum -y install epel-release
    • - yum -y update

          * - yum -y install python-pip
          * - pip -V
         *  - yum -y install zip
           *  #- apt-get update # required to install zip
        *     #- apt-get install -y zip # required for packaging up the application
         *  - pip install boto3==1.3.0 # required for codedeploy_deploy.py
         *  - zip -r /tmp/artifact.zip * # package up the application for deployment
         *  - python codedeploy_deploy.py # run the deployment script
      
  4. Henry Tait

    Last time this happened it got fixed after a while (couple of hours) - think it's a package deployment issue

  5. Chris Foster

    Does anyone know if there is a forum for the issue, with a timescale or something. Just so I can inform my colleagues.

  6. Miroslaw Gordon

    I got problems with installing ZIP.

    I just use this command as temporary fix, maybe you can adjust it for your problems.

    apt-get update || true && apt-get install zip

  7. Jeroen Reumkens

    @LeonardoRTeixeira Your solution unfortunately didn't work for me. The only thing you did was specify image: atlassian/default-image:2 at the top of your pipeline?

  8. Amirson Baybin

    @JeroenReumkens if your your pipeline is something like in the below code. You have to replace ALL the image: with atlassian/default-image:2 (or remove the others and use the default)

    image: mydefault/image
    
    pipelines:
      default:
        - step:
             name: Build and Test
             image: other/image
     branches
       develop
         - step:
              name:  Build and Deploy
              image: another/image
    

    UPDATE: Better to use the solution of @Darren Hodges below.

  9. Selami Cetinguney

    using the 'atlassian/default-image:2' image works as well over here, PHP image doesnt work anymore

  10. Airrick Dunfield

    Currently, I have a version of node on the image line of my pipelines file. Does anyone know how changing the line to atlassian/default-image:2 will effect that setup?

    Thanks,

    Edit: The docs say...
    node: 8.9.4
    npm: 5.6.0

  11. Bruce Ledbetter

    I'm using a code deploy pipeline that used:
    image: python:3.5.1
    I updated to
    image: python:3.5.7
    And all is well. Still kinda disconcerting that this breaks without advance notice.

  12. Samantha Adrichem

    Debian jessie has been moved to archive. If you use a custom image and still need jessie . I've fixed it by adding these lines to the top of my steps

            - echo "deb http://deb.debian.org/debian/ jessie main" > /etc/apt/sources.list
            - echo "deb-src http://deb.debian.org/debian/ jessie main" >> /etc/apt/sources.list
            - echo "deb http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list
            - echo "deb-src http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list
            - echo "deb [check-valid-until=no] http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list
            - echo "deb-src [check-valid-until=no] http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list
    

    Then eventough the config should already work, added this after every apt-get

    -o Acquire::Check-Valid-Until=false 
    

    so

    apt-get update && apt-get install -y git-ftp
    

    becomes

    apt-get -o Acquire::Check-Valid-Until=false update && apt-get install -y git-ftp
    
  13. Fazle Tanjil

    People who are working on python based project, go to docker hub official python repository and put the latest stable Debian stretch based python image in the pipeline YAML instead of Jessie based python image.

  14. Brian Adams

    Hi Bitbucket, I don't quite understand. I'm getting the same error on our pipeline but I don't know what I can change that tells BitBucket to build this differently. I'm seeing the Debian 404 missing file Jessie build:
    Here is the Pipeline that's failing:

    This is a sample build configuration for JavaScript.

    Check our guides at https://confluence.atlassian.com/x/14UWN for more examples.

    Only use spaces to indent your .yml configuration.

    -----

    You can specify a custom docker image from Docker Hub as your build environment.

    image: node:8.9.4

    pipelines:
    default:
    - step:
    name: Angular Build
    caches:
    - node
    script: # Modify the commands below to build your repository.
    - npm install
    - mkdir wwwrootadmin
    - npm install -g @angular/cli
    - ng build --prod
    - apt-get update . <-- this is the fail line....

    Im only referencing Node 8.9.4 so what should I change so this doesn't reach out to debian Jessie???

  15. Darren Hodges

    Adding the following line just before apt-get update resolved the issue for me:

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

    For example:

    script:
      - sed -i '/jessie-updates/d' /etc/apt/sources.list
      - apt-get update && apt-get install -y zip
    
  16. Brandon Williams

    I have dozens and dozens of repos that are failing as a result of this. Is the solution sincerely to update each one of the pipeline yamls to accommodate this? The package is still there - this seems exclusively related to a CDN config change on the part of Bitbucket.

  17. Nadi

    If anyone new comes to this question:

    1. This ticket was initially created a few years ago. At that time the issue was resolved automatically in a day.

    2. The new issue with Debian jessie-updates can be successfully resolved by @Darren Hodges advise (see above).

    Thanks, @Darren Hodges!

  18. Kevin Szabó

    Hello everyone!
    this issue is come live today, i think, resolve this problem automaticaly, that's correct?

    Thanks!

  19. Alvin Chettiar

    The following command resolved the issue of building a zip for S3

    apt-get update || true && apt-get install -y zip

    Complete Script

    pipelines:
      branches:
        master:
          - step:
              name: Deploy
              image: python:3.5.1
              script:
                - apt-get update || true && apt-get install -y zip
                - pip install boto3==1.3.0
                - zip -r /tmp/artifact.zip *
                - python codedeploy_deploy.py
    
  20. Log in to comment