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

docker provisioner fails during apt-get update on precise64 box #5748

Closed
jeremyplichta opened this issue May 22, 2015 · 13 comments
Closed

docker provisioner fails during apt-get update on precise64 box #5748

jeremyplichta opened this issue May 22, 2015 · 13 comments

Comments

@jeremyplichta
Copy link
Contributor

vagrant up gives this error (Vagrant 1.7.2):
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

apt-get update

Stdout from the command:

Ign http://us.archive.ubuntu.com precise InRelease
Ign http://security.ubuntu.com precise-security InRelease
Ign http://us.archive.ubuntu.com precise-updates InRelease
Ign http://us.archive.ubuntu.com precise-backports InRelease
Hit http://security.ubuntu.com precise-security Release.gpg
Hit http://us.archive.ubuntu.com precise Release.gpg
Hit http://us.archive.ubuntu.com precise-updates Release.gpg
Hit http://security.ubuntu.com precise-security Release
Hit http://us.archive.ubuntu.com precise-backports Release.gpg
Hit http://us.archive.ubuntu.com precise Release
Hit http://us.archive.ubuntu.com precise-updates Release
Hit http://us.archive.ubuntu.com precise-backports Release
Hit http://security.ubuntu.com precise-security/main Sources
Ign http://ppa.launchpad.net precise InRelease
Hit http://us.archive.ubuntu.com precise/main Sources
Hit http://us.archive.ubuntu.com precise/restricted Sources
Hit http://us.archive.ubuntu.com precise/universe Sources
Hit http://us.archive.ubuntu.com precise/multiverse Sources
Hit http://us.archive.ubuntu.com precise/main amd64 Packages
Hit http://security.ubuntu.com precise-security/restricted Sources
Hit http://security.ubuntu.com precise-security/universe Sources
Hit http://security.ubuntu.com precise-security/multiverse Sources
Hit http://security.ubuntu.com precise-security/main amd64 Packages
Hit http://security.ubuntu.com precise-security/restricted amd64 Packages
Ign http://get.docker.io docker InRelease
Hit http://us.archive.ubuntu.com precise/restricted amd64 Packages
Hit http://us.archive.ubuntu.com precise/universe amd64 Packages
Hit http://us.archive.ubuntu.com precise/multiverse amd64 Packages
Hit http://us.archive.ubuntu.com precise/main i386 Packages
Hit http://us.archive.ubuntu.com precise/restricted i386 Packages
Hit http://us.archive.ubuntu.com precise/universe i386 Packages
Hit http://us.archive.ubuntu.com precise/multiverse i386 Packages
Hit http://security.ubuntu.com precise-security/universe amd64 Packages
Hit http://security.ubuntu.com precise-security/multiverse amd64 Packages
Hit http://security.ubuntu.com precise-security/main i386 Packages
Hit http://security.ubuntu.com precise-security/restricted i386 Packages
Hit http://security.ubuntu.com precise-security/universe i386 Packages
Hit http://us.archive.ubuntu.com precise/main TranslationIndex
Hit http://us.archive.ubuntu.com precise/multiverse TranslationIndex
Hit http://us.archive.ubuntu.com precise/restricted TranslationIndex
Hit http://us.archive.ubuntu.com precise/universe TranslationIndex
Hit http://us.archive.ubuntu.com precise-updates/main Sources
Hit http://us.archive.ubuntu.com precise-updates/restricted Sources
Hit http://us.archive.ubuntu.com precise-updates/universe Sources
Hit http://us.archive.ubuntu.com precise-updates/multiverse Sources
Hit http://security.ubuntu.com precise-security/multiverse i386 Packages
Hit http://security.ubuntu.com precise-security/main TranslationIndex
Hit http://security.ubuntu.com precise-security/multiverse TranslationIndex
Hit http://security.ubuntu.com precise-security/restricted TranslationIndex
Hit http://security.ubuntu.com precise-security/universe TranslationIndex
Hit http://ppa.launchpad.net precise Release.gpg
Hit http://us.archive.ubuntu.com precise-updates/main amd64 Packages
Hit http://us.archive.ubuntu.com precise-updates/restricted amd64 Packages
Hit http://us.archive.ubuntu.com precise-updates/universe amd64 Packages
Hit http://us.archive.ubuntu.com precise-updates/multiverse amd64 Packages
Hit http://us.archive.ubuntu.com precise-updates/main i386 Packages
Hit http://security.ubuntu.com precise-security/main Translation-en
Hit http://security.ubuntu.com precise-security/multiverse Translation-en
Hit http://security.ubuntu.com precise-security/restricted Translation-en
Hit http://us.archive.ubuntu.com precise-updates/restricted i386 Packages
Hit http://us.archive.ubuntu.com precise-updates/universe i386 Packages
Hit http://us.archive.ubuntu.com precise-updates/multiverse i386 Packages
Hit http://us.archive.ubuntu.com precise-updates/main TranslationIndex
Hit http://us.archive.ubuntu.com precise-updates/multiverse TranslationIndex
Hit http://us.archive.ubuntu.com precise-updates/restricted TranslationIndex
Hit http://us.archive.ubuntu.com precise-updates/universe TranslationIndex
Hit http://security.ubuntu.com precise-security/universe Translation-en
Hit http://us.archive.ubuntu.com precise-backports/main Sources
Hit http://us.archive.ubuntu.com precise-backports/restricted Sources
Hit http://us.archive.ubuntu.com precise-backports/universe Sources
Hit http://us.archive.ubuntu.com precise-backports/multiverse Sources
Hit http://us.archive.ubuntu.com precise-backports/main amd64 Packages
Hit http://us.archive.ubuntu.com precise-backports/restricted amd64 Packages
Hit http://us.archive.ubuntu.com precise-backports/universe amd64 Packages
Hit http://us.archive.ubuntu.com precise-backports/multiverse amd64 Packages
Hit http://ppa.launchpad.net precise Release
Hit http://us.archive.ubuntu.com precise-backports/main i386 Packages
Hit http://us.archive.ubuntu.com precise-backports/restricted i386 Packages
Hit http://us.archive.ubuntu.com precise-backports/universe i386 Packages
Hit http://us.archive.ubuntu.com precise-backports/multiverse i386 Packages
Hit http://us.archive.ubuntu.com precise-backports/main TranslationIndex
Hit http://us.archive.ubuntu.com precise-backports/multiverse TranslationIndex
Hit http://us.archive.ubuntu.com precise-backports/restricted TranslationIndex
Hit http://us.archive.ubuntu.com precise-backports/universe TranslationIndex
Hit http://us.archive.ubuntu.com precise/main Translation-en
Hit http://us.archive.ubuntu.com precise/multiverse Translation-en
Hit http://us.archive.ubuntu.com precise/restricted Translation-en
Hit http://us.archive.ubuntu.com precise/universe Translation-en
Hit http://us.archive.ubuntu.com precise-updates/main Translation-en
Hit http://us.archive.ubuntu.com precise-updates/multiverse Translation-en
Hit http://us.archive.ubuntu.com precise-updates/restricted Translation-en
Hit http://us.archive.ubuntu.com precise-updates/universe Translation-en
Hit http://us.archive.ubuntu.com precise-backports/main Translation-en
Hit http://us.archive.ubuntu.com precise-backports/multiverse Translation-en
Hit http://us.archive.ubuntu.com precise-backports/restricted Translation-en
Ign http://get.docker.io docker Release.gpg
Hit http://ppa.launchpad.net precise/main Sources
Hit http://us.archive.ubuntu.com precise-backports/universe Translation-en
Hit http://ppa.launchpad.net precise/main amd64 Packages
Hit http://ppa.launchpad.net precise/main i386 Packages
Hit http://ppa.launchpad.net precise/main TranslationIndex
Hit http://ppa.launchpad.net precise/main Translation-en
Ign http://get.docker.io docker Release
Ign http://get.docker.io docker/main TranslationIndex
Err http://get.docker.io docker/main amd64 Packages
Undetermined Error
Err http://get.docker.io docker/main i386 Packages
Undetermined Error
Ign http://get.docker.io docker/main Translation-en_US
Ign http://get.docker.io docker/main Translation-en

Stderr from the command:

stdin: is not a tty
W: Failed to fetch http://get.docker.io/ubuntu/dists/docker/main/binary-amd64/Packages Undetermined Error

W: Failed to fetch http://get.docker.io/ubuntu/dists/docker/main/binary-i386/Packages Undetermined Error

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

Editing the file /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/provisioners/docker/cap/debian/docker_install.rb and changing http to https in the sources.list.d/docker.list seems to fix the problem.

@Tin-Nguyen
Copy link

Hi @jeremyplichta ,

Has this issue has been fixed yet? My team is pacing this issue when working with vagrant and docker provisioner. Please update to me once the issue has been fixed.

Thanks

@mgan59
Copy link

mgan59 commented May 25, 2015

Tried the proposed solution but I'm still receiving the error. Is there any work/escalation on this issue? It is a MAJOR blocker for several dev teams at my organization that use the docker provisioner.

@jeremyplichta
Copy link
Contributor Author

I believe the pull request was peer reviewed but has not been pulled yet. To see if you are really having the same problem try this:

  1. go into your project with the vagrant box having the issue
  2. vagrant ssh
  3. sudo apt-get update
    verify the problem is there (as described in comments)
  4. sudo bash -c 'echo "deb https://get.docker.com/ubuntu docker main" > /etc/apt/sources.list.d/docker.list'
  5. sudo apt-get update
    the command should complete without an error this time

If you are seeing different behavior then it may be a different issue. I would note what version of vagrant you are using and the base box being used.

If step 5 works ok then the patch described above (editing /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/provisioners/docker/cap/debian/docker_install.rb) should work as a temporary workaround.

@mgan59
Copy link

mgan59 commented May 25, 2015

K lack of sleep and crazy deadlines, I was editing the wrong line in the plugin provisioner file. 😵 All good now and verifying this works on vagrant 1.7.2 for ubuntu 12.04 LTS 👍

thanks @jeremyplichta for following up with suggestions, helped me align when I came back to this.

@Tin-Nguyen
Copy link

👍 yesterday, I did lots of things. So that, I cannot remember what did I try. Looks like I missed to note some steps about sudo apt-get update. Anyway, thanks @jeremyplichta

@carlosmmelo
Copy link

+1

mattfreer added a commit to mattfreer/vagrant-docker that referenced this issue Jun 5, 2015
A problem was observed with the docker provisioner failing during
`apt-get update` on precise64 box. The problem is described in the
following issue:

 * hashicorp/vagrant#5748

The issue was fixed by updating the url for `get.docker.io` to be
`https` rather than `http` in the `sources.list.d/docker.list`.
@needbaseindia
Copy link

Was this issue fixed? We are building a devex system based on this and manual fix is not feasible for us. So appreciate if the actual fix can be provided

@zebahmad
Copy link

Was this issue fixed? We are building a devex system based on this and manual fix is not feasible for us. So appreciate if the actual fix can be provided.
Sorry for the duplicate comment above, was logged in incorrectly.

@cpswan
Copy link

cpswan commented Jun 23, 2015

I just hit something very similar to this.

On an ancient VM I use for Docker I find this in /etc/apt/sources.list.d/docker.list

deb http://get.docker.io/ubuntu docker main

apt-get update doesn't seem to be working with that source any more.

On a newer box I see:

deb https://get.docker.com/ubuntu docker main

apt-get update does work with that, though in my case I had to do apt-get install apt-transport-https first

@kkiningh
Copy link

Bump, since I ran into this problem as well.

@mattlo
Copy link

mattlo commented Jun 29, 2015

Using HTTPS instead of HTTP worked for me, as noted by @cpswan and @jeremyplichta
👍

@mitchellh
Copy link
Contributor

This is fixed in master!

@StatLee
Copy link

StatLee commented Jul 10, 2015

Useful!@jeremyplichta

@ghost ghost locked and limited conversation to collaborators Apr 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.