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

Comments

Projects
None yet
@jeremyplichta
Contributor

jeremyplichta commented May 22, 2015

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

This comment has been minimized.

Show comment
Hide comment
@Tin-Nguyen

Tin-Nguyen May 25, 2015

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

Tin-Nguyen commented May 25, 2015

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

This comment has been minimized.

Show comment
Hide comment
@mgan59

mgan59 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.

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

This comment has been minimized.

Show comment
Hide comment
@jeremyplichta

jeremyplichta May 25, 2015

Contributor

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.

Contributor

jeremyplichta commented May 25, 2015

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

This comment has been minimized.

Show comment
Hide comment
@mgan59

mgan59 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.

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

This comment has been minimized.

Show comment
Hide comment
@Tin-Nguyen

Tin-Nguyen May 25, 2015

👍 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

Tin-Nguyen commented May 25, 2015

👍 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

This comment has been minimized.

Show comment
Hide comment

carlosmmelo commented May 26, 2015

+1

miguel250 added a commit to miguel250/vagrant that referenced this issue May 28, 2015

mattfreer added a commit to mattfreer/vagrant-docker that referenced this issue Jun 5, 2015

fix(bootstrap): update protocol in the sources.list.docker.list
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

This comment has been minimized.

Show comment
Hide comment
@needbaseindia

needbaseindia Jun 17, 2015

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

needbaseindia commented Jun 17, 2015

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

This comment has been minimized.

Show comment
Hide comment
@zebahmad

zebahmad Jun 17, 2015

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.

zebahmad commented Jun 17, 2015

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

This comment has been minimized.

Show comment
Hide comment
@cpswan

cpswan 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

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

This comment has been minimized.

Show comment
Hide comment
@kkiningh

kkiningh Jun 29, 2015

Bump, since I ran into this problem as well.

kkiningh commented Jun 29, 2015

Bump, since I ran into this problem as well.

@mattlo

This comment has been minimized.

Show comment
Hide comment
@mattlo

mattlo Jun 29, 2015

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

mattlo commented Jun 29, 2015

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

@mitchellh

This comment has been minimized.

Show comment
Hide comment
@mitchellh

mitchellh Jul 7, 2015

Member

This is fixed in master!

Member

mitchellh commented Jul 7, 2015

This is fixed in master!

@mitchellh mitchellh closed this Jul 7, 2015

@StatLee

This comment has been minimized.

Show comment
Hide comment
@StatLee

StatLee commented Jul 10, 2015

Useful!@jeremyplichta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment