Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Could not reach any registry endpoint #88

Open
karlingen opened this issue Dec 27, 2015 · 7 comments
Open

Could not reach any registry endpoint #88

karlingen opened this issue Dec 27, 2015 · 7 comments

Comments

@karlingen
Copy link

I'm getting this error all of a sudden when running vagrant up

My Vagrantfile:

VAGRANTFILE_API_VERSION = "2"
ENV['VAGRANT_DEFAULT_PROVIDER'] ||= 'docker'

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

  config.ssh.insert_key = false

  config.vm.define "db" do |app|
    app.vm.provider "docker" do |d|
      d.image = "postgres"
      d.name = "myapp_db"
      d.ports  = ['5432:5432']
      d.vagrant_vagrantfile = "Vagrantfile.host"
    end
  end

  config.vm.define "redis" do |v|
    v.vm.provider "docker" do |d|
      d.image = "redis"
      d.name = 'myapp_redis'
      d.ports = ["6379:6379"]
      d.vagrant_vagrantfile = "Vagrantfile.host"
    end
  end
end

Vagrantfile.host:

Vagrant.configure("2") do |config|
  config.ssh.insert_key = false
  config.vm.box = "mitchellh/boot2docker"
  config.vm.provider "virtualbox" do |v|
    v.check_guest_additions = false
    v.functional_vboxsf     = false
    v.customize ['modifyvm', :id, '--memory', 4096]
    v.customize ['modifyvm', :id, '--acpi', 'on']
    v.customize ['modifyvm', :id, '--cpus', 4]
    v.customize ['modifyvm', :id, '--cpuexecutioncap', '100']
    v.customize ['modifyvm', :id, '--natdnshostresolver1', 'on']
    v.customize ['modifyvm', :id, '--natdnsproxy1', 'on']
  end

  config.nfs.functional = false

  config.vm.network :forwarded_port, guest: 5432, host: 5432
  config.vm.network :forwarded_port, guest: 6379, host: 6379
end

Here is the log:

$ vagrant up
Bringing machine 'db' up with 'docker' provider...
Bringing machine 'redis' up with 'docker' provider...
==> db: Removing hosts
==> db: No machine id, nothing removed from /etc/hosts
==> db: Docker host is required. One will be created if necessary...
==> redis: Removing hosts
==> redis: No machine id, nothing removed from /etc/hosts
==> redis: Docker host is required. One will be created if necessary...
    db: Vagrant will now create or start a local VM to act as the Docker
    db: host. You'll see the output of the `vagrant up` for this VM below.
    db:
    db: Removing hosts
    db: No machine id, nothing removed from /etc/hosts
    db: Importing base box 'mitchellh/boot2docker'...
    db: Matching MAC address for NAT networking...
    db: Checking if box 'mitchellh/boot2docker' is up to date...
    db: Setting the name of the VM: myapp_default_1451202150495_66425
    db: Clearing any previously set network interfaces...
    db: Preparing network interfaces based on configuration...
    db: Adapter 1: nat
    db: Forwarding ports...
    db: 2375 => 2375 (adapter 1)
    db: 5432 => 5432 (adapter 1)
    db: 6379 => 6379 (adapter 1)
    db: 22 => 2222 (adapter 1)
    db: Checking for host entries
    db: Running 'pre-boot' VM customizations...
    db: Booting VM...
    db: Waiting for machine to boot. This may take a few minutes...
    db: SSH address: 127.0.0.1:2222
    db: SSH username: docker
    db: SSH auth method: private key
    db: Warning: Connection timeout. Retrying...
    db: Warning: Authentication failure. Retrying...
    db: Machine booted and ready!
No installation found.
The guest's platform ("tinycore") is currently not supported, will try generic Linux method...
Copy iso file /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso
Installing Virtualbox Guest Additions 5.0.4 - guest version is unknown
mkdir: can't create directory '/tmp/selfgz7981531': No such file or directory
Cannot create target directory /tmp/selfgz7981531
You should try option --target OtherDirectory
An error occurred during installation of VirtualBox Guest Additions 5.0.4. Some functionality may not work as intended.
In most cases it is OK that the "Window System drivers" installation failed.
    redis: Docker host VM is already ready.
==> db: Syncing folders to the host VM...
    db: Installing rsync to the VM...
    db: Rsyncing folder: /Users/karlingen/myapp/ => /var/lib/docker/docker_1451202177_17507
==> redis: Syncing folders to the host VM...
==> db: Warning: When using a remote Docker host, forwarded ports will NOT be
==> db: immediately available on your machine. They will still be forwarded on
==> db: the remote machine, however, so if you have a way to access the remote
==> db: machine, then you should be able to access those ports there. This is
==> db: not an error, it is only an informational message.
==> db: Creating the container...
    db:   Name: myapp_db
    db:  Image: postgres:9.4.1
    db: Volume: /var/lib/docker/docker_1451202177_17507:/vagrant
    db:   Port: 5432:5432
    redis: Rsyncing folder: /Users/karlingen/myapp/ => /var/lib/docker/docker_1451202182_3829
==> redis: Warning: When using a remote Docker host, forwarded ports will NOT be
==> redis: immediately available on your machine. They will still be forwarded on
==> redis: the remote machine, however, so if you have a way to access the remote
==> redis: machine, then you should be able to access those ports there. This is
==> redis: not an error, it is only an informational message.
==> redis: Fixed port collision for 22 => 2222. Now on port 2200.
==> redis: Creating the container...
    redis:   Name: myapp_redis
    redis:  Image: library/redis
    redis: Volume: /var/lib/docker/docker_1451202182_3829:/vagrant
    redis:   Port: 6379:6379
==> db: An error occurred. The error will be shown after all tasks complete.
==> redis: An error occurred. The error will be shown after all tasks complete.
An error occurred while executing multiple actions in parallel.
Any errors that occurred are shown below.
​
An error occurred while executing the action on the 'db'
machine. Please handle this error then try again:
​
A Docker command executed by Vagrant didn't complete successfully!
The command run along with the output from the command is shown
below.
​
Command: "docker" "run" "--name" "myapp_db" "-d" "-p" "5432:5432" "-v" "/var/lib/docker/docker_1451202177_17507:/vagrant" "postgres:9.4.1"
​
Stderr: Unable to find image 'postgres:9.4.1' locally
Pulling repository postgres
2015/12/27 07:43:04 Could not reach any registry endpoint
​
Stdout:
​
An error occurred while executing the action on the 'redis'
machine. Please handle this error then try again:
​
A Docker command executed by Vagrant didn't complete successfully!
The command run along with the output from the command is shown
below.
​
Command: "docker" "run" "--name" "myapp_redis" "-d" "-p" "6379:6379" "-v" "/var/lib/docker/docker_1451202182_3829:/vagrant" "library/redis"
​
Stderr: Unable to find image 'library/redis' locally
Pulling repository library/redis
2015/12/27 07:43:06 Could not reach any registry endpoint

I tried destroying and rebuilding a couple of times.

Any ideas what this might be?

@karlingen
Copy link
Author

I don't get the same problem with another box:
config.vm.box = "williamyeh/ubuntu-trusty64-docker"

@nonameolsson
Copy link

+1

@rgarrigue
Copy link

rgarrigue commented Apr 21, 2016

👍

I'm not doing anything big, just vagrant init, up, ssh, git clone, docker build

docker@boot2docker:~/docker-ytdl$ docker build .
Sending build context to Docker daemon 546.3 kB
Sending build context to Docker daemon
Step 0 : FROM alpine:latest
Pulling repository alpine
2016/04/21 13:49:20 Could not reach any registry endpoint

/var/log/docker.log say

root@boot2docker:/var/log# cat docker.log

[debug] server.go:1036 Calling POST /build
[info] POST /build?rm=1&t=
[2408df38] +job build()
[debug] archive.go:88 [tar autodetect] n: [46 47 0 0 0 0 0 0 0 0]
[debug] archive.go:88 [tar autodetect] n: [46 47 0 0 0 0 0 0 0 0]
[2408df38] +job pull(alpine, latest)
[debug] session.go:259 [registry] Calling GET https://index.docker.io/v1/repositories/alpine/images
[debug] http.go:162 https://index.docker.io/v1/repositories/alpine/images -- HEADERS: map[User-Agent:[docker/1.2.0 go/go1.3.1 git-commit/fa7b24f kernel/3.16.1-tinycore64 os/linux arch/amd64]]
[debug] pull.go:89 Retrieving the tag list
[debug] http.go:162 https://registry-1.docker.io/v1/repositories/library/alpine/tags -- HEADERS: map[User-Agent:[docker/1.2.0 go/go1.3.1 git-commit/fa7b24f kernel/3.16.1-tinycore64 os/linux arch/amd64]]
[debug] session.go:214 Got status code 403 from https://registry-1.docker.io/v1/repositories/library/alpine/tags
[error] pull.go:92 Could not reach any registry endpoint
Could not reach any registry endpoint
[2408df38] -job pull(alpine, latest) = ERR (1)
Could not reach any registry endpoint
[2408df38] -job build() = ERR (1)

A curl on the ".../tags" url give me a

{"error": "Requires authorization"}

Reading this post I guess this boot2docker is missing some auth token.

@ambition-consulting
Copy link

Same problem here.

Makes me wonder if you added docker support on vagrant just for marketing?

@ambition-consulting
Copy link

docker registry killed support for docker clients v1.5. Is this built with docker client version above 1.5?

@Gisleburt
Copy link

Gisleburt commented Jun 4, 2016

docker@boot2docker:~$ docker --version
Docker version 1.2.0, build fa7b24f

It's a shame, I need a very light weight VM that only needs to run docker, and I'd like it from someone I trust. This would have fit the bill nicely. I might try building my own at some point 😃

@dhartford
Copy link

Still an open issue for those trying to use config.vm.box = "mitchellh/boot2docker"
2017/03/23 17:42:06 Could not reach any registry endpoint

 root@boot2docker:~$ docker --version
Docker version 1.2.0, build fa7b24f

However, if you instead use:
hashicorp/boot2docker
getting docker 1.7.0 as of 3/23/2017 and no longer have that issue.

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

No branches or pull requests

6 participants