Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apt installation of the CLI fails on Ubuntu 16.04 #1327

Closed
andrewedstrom opened this issue Feb 16, 2018 · 9 comments
Closed

Apt installation of the CLI fails on Ubuntu 16.04 #1327

andrewedstrom opened this issue Feb 16, 2018 · 9 comments
Labels

Comments

@andrewedstrom
Copy link
Member

andrewedstrom commented Feb 16, 2018

Command

When trying to install on the ubuntu:16.04 Docker image if apt-get upgrade -y is run then the CLI can not be installed. We have also seen timeout failures when running apt-get update when the /etc/apt/sources.list.d/cloudfoundry-cli.list exists, even without an upgrade.

Prepare the environment:

apt-get update && apt-get upgrade -y && apt-get install -y apt-transport-https wget

Run the installation commands:

wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | apt-key add -
echo "deb http://packages.cloudfoundry.org/debian stable main" > /etc/apt/sources.list.d/cloudfoundry-cli.list
apt-get update
apt-get install -y cf-cli

What occurred

The installation fails intermittently. Sometimes while running apt-get update

# apt-get update
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Hit:2 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:5 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [563 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Ign:6 https://cf-cli-debian-repo.s3.amazonaws.com stable InRelease
Ign:7 http://packages.cloudfoundry.org/debian stable Release
Ign:9 http://packages.cloudfoundry.org/debian stable/main all Packages
Get:8 https://cf-cli-debian-repo.s3.amazonaws.com stable/main amd64 Packages [6849 B]
Ign:9 https://cf-cli-debian-repo.s3.amazonaws.com stable/main all Packages
Ign:9 https://cf-cli-debian-repo.s3.amazonaws.com stable/main all Packages
Ign:9 https://cf-cli-debian-repo.s3.amazonaws.com stable/main all Packages
Ign:9 https://cf-cli-debian-repo.s3.amazonaws.com stable/main all Packages
Ign:9 https://cf-cli-debian-repo.s3.amazonaws.com stable/main all Packages
Fetched 313 kB in 10min 3s (519 B/s)
Reading package lists... Done
W: The repository 'http://packages.cloudfoundry.org/debian stable Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Other times while running apt-get install cf-cli

What you expected to occur

apt-get update and apt-get install cf-cli should succeed without needing to specify --allow-unauthenticated

CLI Version

n/a

CC API Endpoint Version

n/a

CF Trace

n/a

Platform & Shell Details

Docker image ubuntu:16.04 using bash 4.3-14ubuntu1.2

Any other relevant information

# apt-get update --print-uris
'http://packages.cloudfoundry.org/debian/dists/stable/InRelease' packages.cloudfoundry.org_debian_dists_stable_InRelease 0
'http://packages.cloudfoundry.org/debian/dists/stable/main/binary-amd64/Packages.gz' packages.cloudfoundry.org_debian_dists_stable_main_binary-amd64_Packages 0
'http://packages.cloudfoundry.org/debian/dists/stable/main/binary-all/Packages.gz' packages.cloudfoundry.org_debian_dists_stable_main_binary-all_Packages 0
[SNIP Ubuntu URIs]

Based on the listing of files at https://cf-cli-debian-repo.s3.amazonaws.com/ it appears that the following files are missing:

  • http://packages.cloudfoundry.org/debian/dists/stable/InRelease
  • http://packages.cloudfoundry.org/debian/dists/stable/main/binary-all/Packages.gz
@cf-gitbot
Copy link
Collaborator

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/155275176

The labels on this github issue will be updated when the story is started.

@ramonskie
Copy link

ramonskie commented Feb 16, 2018

same here

Ign:50 https://cf-cli-debian-repo.s3.amazonaws.com stable InRelease                                                                                                                                                                          
Ign:51 http://packages.cloudfoundry.org/debian stable Release
Ign:53 http://packages.cloudfoundry.org/debian stable/main i386 Packages.diff/Index
Ign:52 https://cf-cli-debian-repo.s3.amazonaws.com stable/main amd64 Packages.diff/Index
Ign:55 http://packages.cloudfoundry.org/debian stable/main Translation-en_US
Ign:54 https://cf-cli-debian-repo.s3.amazonaws.com stable/main all Packages
Ign:57 http://packages.cloudfoundry.org/debian stable/main i386 Packages
Ign:56 https://cf-cli-debian-repo.s3.amazonaws.com stable/main Translation-en
Ign:55 http://packages.cloudfoundry.org/debian stable/main Translation-en_US
Ign:58 https://cf-cli-debian-repo.s3.amazonaws.com stable/main amd64 Packages
Ign:57 http://packages.cloudfoundry.org/debian stable/main i386 Packages
Ign:54 https://cf-cli-debian-repo.s3.amazonaws.com stable/main all Packages
Ign:55 http://packages.cloudfoundry.org/debian stable/main Translation-en_US
Ign:56 https://cf-cli-debian-repo.s3.amazonaws.com stable/main Translation-en
Ign:57 http://packages.cloudfoundry.org/debian stable/main i386 Packages
Ign:58 https://cf-cli-debian-repo.s3.amazonaws.com stable/main amd64 Packages
Ign:55 http://packages.cloudfoundry.org/debian stable/main Translation-en_US
Ign:54 https://cf-cli-debian-repo.s3.amazonaws.com stable/main all Packages
Ign:57 http://packages.cloudfoundry.org/debian stable/main i386 Packages
Ign:56 https://cf-cli-debian-repo.s3.amazonaws.com stable/main Translation-en
Ign:55 http://packages.cloudfoundry.org/debian stable/main Translation-en_US
Ign:58 https://cf-cli-debian-repo.s3.amazonaws.com stable/main amd64 Packages
Ign:57 http://packages.cloudfoundry.org/debian stable/main i386 Packages
Ign:54 https://cf-cli-debian-repo.s3.amazonaws.com stable/main all Packages
Ign:55 http://packages.cloudfoundry.org/debian stable/main Translation-en_US
Ign:56 https://cf-cli-debian-repo.s3.amazonaws.com stable/main Translation-en
Err:57 http://packages.cloudfoundry.org/debian stable/main i386 Packages
  Connection timed out [IP: 34.193.240.80 80]
Ign:58 https://cf-cli-debian-repo.s3.amazonaws.com stable/main amd64 Packages
Ign:56 https://cf-cli-debian-repo.s3.amazonaws.com stable/main Translation-en
Fetched 9523 kB in 30min 7s (5269 B/s)
Reading package lists... Done
W: The repository 'http://packages.cloudfoundry.org/debian stable Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch https://cf-cli-debian-repo.s3.amazonaws.com/dists/stable/main/binary-all/Packages.lz4  404  Not Found
E: Failed to fetch http://packages.cloudfoundry.org/debian/dists/stable/main/binary-i386/Packages  Connection timed out [IP: 34.193.240.80 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

@vitreuz
Copy link
Contributor

vitreuz commented Feb 16, 2018

Are these failures consistent? Or is the reason for failure the inconsistent part?

@ramonskie
Copy link

they are consistent. seems like 34.193.240.80 is down and should be removed from dns records

@sqlsolver
Copy link

sqlsolver commented Feb 20, 2018

+1 this issue:

W: The repository 'http://packages.cloudfoundry.org/debian stable Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch https://cf-cli-debian-repo.s3.amazonaws.com/dists/stable/main/binary-all/Packages.lz4  404  Not Found
E: Failed to fetch http://packages.cloudfoundry.org/debian/dists/stable/main/binary-i386/Packages  Connection timed out [IP: 34.193.240.80 80]

It doesn't work when allowing insecure packages either:

W: The repository 'http://packages.cloudfoundry.org/debian stable Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch https://cf-cli-debian-repo.s3.amazonaws.com/dists/stable/main/binary-all/Packages.lz4  404  Not Found
E: Failed to fetch http://packages.cloudfoundry.org/debian/dists/stable/main/binary-i386/Packages  Connection timed out [IP: 52.3.172.36 80]

Note that the second failed attempt IP is different.

@timriker
Copy link

Working around this, I ended up using the s3 repository directly:
deb https://cf-cli-debian-repo.s3.amazonaws.com stable main

I don't know if this is recommended as a long term solution, but it worked for me in the short term.

@n4wei
Copy link
Member

n4wei commented Feb 22, 2018

It looks like the issue is with a recent update of the apt package manager to v1.2.25. We are further debugging this and considering workarounds. Thank you for your patience, more on this soon.

@vitreuz
Copy link
Contributor

vitreuz commented Feb 22, 2018

@flavorjones has found a solution. It seems that the update to apt is more sensitive to using http vs https for Release files. Please replace the corresponding line with this:

echo "deb https://packages.cloudfoundry.org/debian stable main" > /etc/apt/sources.list.d/cloudfoundry-cli.list

@pramodbiradar89
Copy link

pramodbiradar89 commented Jul 17, 2019

Using following worked for me:

wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | apt-key add -
echo "deb https://cf-cli-debian-repo.s3.amazonaws.com stable main" > /etc/apt/sources.list.d/cloudfoundry-cli.list

apt-get update

apt-get install cf-cli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants